|
|
@@ -1,252 +1,289 @@
|
|
|
-<config>
|
|
|
-{
|
|
|
-'backgroundColorTop': '#DBECF3',
|
|
|
-'backgroundColor': '#fff',
|
|
|
-'navigationStyle':'custom',
|
|
|
-'backgroundTextStyle':'light',
|
|
|
-'navigationBarTextStyle':'black'
|
|
|
-}
|
|
|
-</config>
|
|
|
-<template>
|
|
|
- <div class="my pageBottom">
|
|
|
- <div class="top">
|
|
|
- <van-image
|
|
|
- width="100%"
|
|
|
- :height="70 + barHeight + 'px'"
|
|
|
- src="http://imttech.oss-cn-hangzhou.aliyuncs.com/micro/info_top_bg.jpg"
|
|
|
- fit="cover"
|
|
|
- :radius="4"
|
|
|
- />
|
|
|
- <van-button class="btn1" color="#0F264D" plain @click="choose" :style="{ top: barTop + 'px' }">
|
|
|
- {{ getName(language) }}
|
|
|
- <van-icon name="arrow-down" size="10px" color="#0F264D" />
|
|
|
- </van-button>
|
|
|
-
|
|
|
- <div class="btn-content">
|
|
|
- <van-button
|
|
|
- v-if="!userInfo"
|
|
|
- open-type="getUserInfo"
|
|
|
- :color="$colors.warn"
|
|
|
- :radius="4"
|
|
|
- @getuserinfo="login"
|
|
|
- >{{ $t('wei-xin-kuai-jie-deng-lu') }}</van-button
|
|
|
- >
|
|
|
- <van-button
|
|
|
- v-else
|
|
|
- size="small"
|
|
|
- :color="$colors.warn"
|
|
|
- :radius="4"
|
|
|
- plain
|
|
|
- @click="navigateTo('/pagesHome/Edit', true, false)"
|
|
|
- >{{ $t('bian-ji-zi-liao') }}</van-button
|
|
|
- >
|
|
|
- </div>
|
|
|
-
|
|
|
- <div class="userInfo">
|
|
|
- <van-image :src="icon" width="96" height="96" :radius="4" fit="cover" />
|
|
|
- <h2>{{ name }}</h2>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
-
|
|
|
- <div class="ad" @click="navigateTo('/pagesMine/Enter')">
|
|
|
- <van-image :src="getName(enterImg)" fit="widthFix" width="100%" :radius="4" />
|
|
|
- </div>
|
|
|
-
|
|
|
- <van-cell-group :border="false">
|
|
|
- <!-- <van-cell
|
|
|
- custom-class="my-cell"
|
|
|
- title="我的积分"
|
|
|
- icon="http://imttech.oss-cn-hangzhou.aliyuncs.com/micro/info_icon_collect(1).png"
|
|
|
- is-link
|
|
|
- @click="navigateTo('scroe')"
|
|
|
- /> -->
|
|
|
- <van-cell
|
|
|
- custom-class="my-cell"
|
|
|
- :title="$t('wo-de-shou-cang')"
|
|
|
- icon="http://imttech.oss-cn-hangzhou.aliyuncs.com/micro/info_icon_collect.png"
|
|
|
- is-link
|
|
|
- @click="navigateTo('/pagesMine/Collect')"
|
|
|
- />
|
|
|
-
|
|
|
- <van-cell
|
|
|
- custom-class="my-cell"
|
|
|
- :title="$t('liu-lan-ji-lu')"
|
|
|
- @click="navigateTo('/pagesMine/ReadRecords')"
|
|
|
- icon="http://imttech.oss-cn-hangzhou.aliyuncs.com/micro/info_icon_collect(2).png"
|
|
|
- is-link
|
|
|
- />
|
|
|
-
|
|
|
- <van-cell
|
|
|
- custom-class="my-cell"
|
|
|
- :title="$t('wo-de-huo-dong')"
|
|
|
- @click="navigateTo('/pagesMine/Activity')"
|
|
|
- icon="http://imttech.oss-cn-hangzhou.aliyuncs.com/micro/info_icon_collect(5).png"
|
|
|
- is-link
|
|
|
- />
|
|
|
-
|
|
|
- <van-cell
|
|
|
- custom-class="my-cell"
|
|
|
- :title="$t('chan-pin-xu-qiu-cheng-jiao-dan')"
|
|
|
- @click="navigateTo('/pagesMine/Order')"
|
|
|
- icon="http://imttech.oss-cn-hangzhou.aliyuncs.com/micro/info_icon_collect(3).png"
|
|
|
- is-link
|
|
|
- />
|
|
|
-
|
|
|
- <van-cell
|
|
|
- custom-class="my-cell"
|
|
|
- :title="$t('zhang-hu-yu-an-quan')"
|
|
|
- @click="navigateTo('/pagesMine/Account')"
|
|
|
- icon="http://imttech.oss-cn-hangzhou.aliyuncs.com/micro/info_icon_collect(4).png"
|
|
|
- is-link
|
|
|
- />
|
|
|
- </van-cell-group>
|
|
|
-
|
|
|
- <auth-phone ref="auth" :info="wxInfo" :show.sync="showPhone"></auth-phone>
|
|
|
-
|
|
|
- <robot id="robot" @chatAdmin="chatAdmin" />
|
|
|
- </div>
|
|
|
-</template>
|
|
|
-
|
|
|
-<script>
|
|
|
-import { mapState } from 'vuex';
|
|
|
-import AuthPhone from '../components/AuthPhone.vue';
|
|
|
-import pages from '../mixins/pages';
|
|
|
-export default {
|
|
|
- data() {
|
|
|
- return {
|
|
|
- color: '#007d37',
|
|
|
- acc: 'hello bigMeow',
|
|
|
- language: {
|
|
|
- chName: '中文',
|
|
|
- enName: 'English'
|
|
|
- },
|
|
|
- locale: 'zh',
|
|
|
- showPhone: false,
|
|
|
- wxInfo: {},
|
|
|
- enterImg: {
|
|
|
- chName: 'http://imttech.oss-cn-hangzhou.aliyuncs.com/micro/info_zhanshangruzhu_new.png',
|
|
|
- enName: 'http://imttech.oss-cn-hangzhou.aliyuncs.com/micro/info_zhanshangruzhu_eln.png'
|
|
|
- }
|
|
|
- };
|
|
|
- },
|
|
|
- mixins: [pages],
|
|
|
- computed: {
|
|
|
- ...mapState(['userInfo', 'barTop', 'barHeight', 'nodeEnv']),
|
|
|
- icon() {
|
|
|
- return this.userInfo && this.userInfo.avatar
|
|
|
- ? this.userInfo.avatar
|
|
|
- : 'http://imttech.oss-cn-hangzhou.aliyuncs.com/micro/info_img_touxiang_01.png';
|
|
|
- },
|
|
|
- name() {
|
|
|
- return this.userInfo ? this.userInfo.nickname : this.$t('wei-deng-lu');
|
|
|
- }
|
|
|
- },
|
|
|
- onShow() {
|
|
|
- this.$store.dispatch('getUnreadNumber');
|
|
|
- },
|
|
|
- onLoad(options) {
|
|
|
- if (this.nodeEnv && options.local) {
|
|
|
- this.$i18n.set('en');
|
|
|
- this.checkTabBar();
|
|
|
- }
|
|
|
- },
|
|
|
- components: {
|
|
|
- AuthPhone
|
|
|
- },
|
|
|
- methods: {
|
|
|
- choose() {
|
|
|
- const _this = this;
|
|
|
- wx.showActionSheet({
|
|
|
- itemList: ['中文', 'English'],
|
|
|
- success(res) {
|
|
|
- if (res.tapIndex == 0) {
|
|
|
- _this.$i18n.set('zh');
|
|
|
- } else {
|
|
|
- _this.$i18n.set('en');
|
|
|
- }
|
|
|
- _this.checkTabBar();
|
|
|
- },
|
|
|
- fail(res) {
|
|
|
- console.log(res.errMsg);
|
|
|
- }
|
|
|
- });
|
|
|
- },
|
|
|
- login(e) {
|
|
|
- if (e.detail.iv) {
|
|
|
- this.wxInfo = e.detail.userInfo;
|
|
|
- this.$http
|
|
|
- .post('/user/getMaUserInfo', {
|
|
|
- sessionKey: this.$store.state.sessionKey,
|
|
|
- rawData: e.detail.rawData,
|
|
|
- signature: e.detail.signature,
|
|
|
- encryptedData: e.detail.encryptedData,
|
|
|
- iv: e.detail.iv
|
|
|
- })
|
|
|
- .then(() => {
|
|
|
- this.showPhone = true;
|
|
|
- });
|
|
|
- }
|
|
|
- }
|
|
|
- },
|
|
|
- onShareAppMessage(from, target) {
|
|
|
- return this.shareInfo();
|
|
|
- }
|
|
|
-};
|
|
|
-</script>
|
|
|
-<style lang="less" scoped>
|
|
|
-.btn-content {
|
|
|
- padding: 39px 15px 15px;
|
|
|
- display: flex;
|
|
|
- justify-content: flex-end;
|
|
|
- align-items: flex-start;
|
|
|
-}
|
|
|
-
|
|
|
-.userInfo {
|
|
|
- position: absolute;
|
|
|
- left: 30px;
|
|
|
- bottom: 15px;
|
|
|
- h2 {
|
|
|
- text-align: center;
|
|
|
- height: 26px;
|
|
|
- margin-top: 6px;
|
|
|
- }
|
|
|
-}
|
|
|
-.ad {
|
|
|
- padding: 0 15px;
|
|
|
-}
|
|
|
-</style>
|
|
|
-<style lang="less">
|
|
|
-.top {
|
|
|
- position: relative;
|
|
|
- // padding-bottom: 15px;
|
|
|
- .btn1 {
|
|
|
- position: absolute;
|
|
|
- top: 20px;
|
|
|
- left: 0px;
|
|
|
- .van-button {
|
|
|
- border-width: 0px;
|
|
|
- }
|
|
|
- }
|
|
|
- .btn-content {
|
|
|
- --button-small-height: 38px;
|
|
|
- // .van-button--normal {
|
|
|
-
|
|
|
- // }
|
|
|
- }
|
|
|
-}
|
|
|
-.my-cell.van-cell {
|
|
|
- padding: 21px 16px;
|
|
|
- .van-cell__left-icon-wrap {
|
|
|
- font-size: 24px;
|
|
|
- margin-right: 14px;
|
|
|
- }
|
|
|
-
|
|
|
- .van-cell__right-icon-wrap {
|
|
|
- color: #cfd3de;
|
|
|
- }
|
|
|
-
|
|
|
- &::after {
|
|
|
- left: 54px;
|
|
|
- }
|
|
|
-}
|
|
|
-</style>
|
|
|
+<config>
|
|
|
+{
|
|
|
+'backgroundColorTop': '#DBECF3',
|
|
|
+'backgroundColor': '#fff',
|
|
|
+'navigationStyle':'custom',
|
|
|
+'backgroundTextStyle':'light',
|
|
|
+'navigationBarTextStyle':'black'
|
|
|
+}
|
|
|
+</config>
|
|
|
+<template>
|
|
|
+ <div class="my pageBottom">
|
|
|
+ <div class="top">
|
|
|
+ <van-image
|
|
|
+ width="100%"
|
|
|
+ :height="70 + barHeight + 'px'"
|
|
|
+ src="http://imttech.oss-cn-hangzhou.aliyuncs.com/micro/info_top_bg.jpg"
|
|
|
+ fit="cover"
|
|
|
+ :radius="4"
|
|
|
+ />
|
|
|
+ <!-- <van-button class="btn1" color="#0F264D" plain @click="choose" :style="{ top: barTop + 'px' }">
|
|
|
+ {{ getName(language) }}
|
|
|
+ <van-icon name="arrow-down" size="10px" color="#0F264D" />
|
|
|
+ </van-button> -->
|
|
|
+
|
|
|
+ <div class="language" :style="{ top: barTop + 'px' }">
|
|
|
+ <div class="language-item" :class="{ active: isChinese }" @click="setLaguage('zh')">中文</div>
|
|
|
+ <div class="language-item" :class="{ active: !isChinese }" @click="setLaguage('en')">English</div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="btn-content">
|
|
|
+ <van-button
|
|
|
+ v-if="!userInfo"
|
|
|
+ open-type="getUserInfo"
|
|
|
+ :color="$colors.warn"
|
|
|
+ :radius="4"
|
|
|
+ @getuserinfo="login"
|
|
|
+ >{{ $t('wei-xin-kuai-jie-deng-lu') }}</van-button
|
|
|
+ >
|
|
|
+ <van-button
|
|
|
+ v-else
|
|
|
+ size="small"
|
|
|
+ :color="$colors.warn"
|
|
|
+ :radius="4"
|
|
|
+ plain
|
|
|
+ @click="navigateTo('/pagesHome/Edit', true, false)"
|
|
|
+ >{{ $t('bian-ji-zi-liao') }}</van-button
|
|
|
+ >
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="userInfo">
|
|
|
+ <van-image :src="icon" width="96" height="96" :radius="4" fit="cover" />
|
|
|
+ <h2>{{ name }}</h2>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="ad" @click="navigateTo('/pagesMine/Enter')">
|
|
|
+ <van-image :src="getName(enterImg)" fit="widthFix" width="100%" :radius="4" />
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <van-cell-group :border="false">
|
|
|
+ <!-- <van-cell
|
|
|
+ custom-class="my-cell"
|
|
|
+ title="我的积分"
|
|
|
+ icon="http://imttech.oss-cn-hangzhou.aliyuncs.com/micro/info_icon_collect(1).png"
|
|
|
+ is-link
|
|
|
+ @click="navigateTo('scroe')"
|
|
|
+ /> -->
|
|
|
+ <van-cell
|
|
|
+ custom-class="my-cell"
|
|
|
+ :title="$t('wo-de-shou-cang')"
|
|
|
+ icon="http://imttech.oss-cn-hangzhou.aliyuncs.com/micro/info_icon_collect.png"
|
|
|
+ is-link
|
|
|
+ @click="navigateTo('/pagesMine/Collect')"
|
|
|
+ />
|
|
|
+
|
|
|
+ <van-cell
|
|
|
+ custom-class="my-cell"
|
|
|
+ :title="$t('liu-lan-ji-lu')"
|
|
|
+ @click="navigateTo('/pagesMine/ReadRecords')"
|
|
|
+ icon="http://imttech.oss-cn-hangzhou.aliyuncs.com/micro/info_icon_collect(2).png"
|
|
|
+ is-link
|
|
|
+ />
|
|
|
+
|
|
|
+ <van-cell
|
|
|
+ custom-class="my-cell"
|
|
|
+ :title="$t('wo-de-huo-dong')"
|
|
|
+ @click="navigateTo('/pagesMine/Activity')"
|
|
|
+ icon="http://imttech.oss-cn-hangzhou.aliyuncs.com/micro/info_icon_collect(5).png"
|
|
|
+ is-link
|
|
|
+ />
|
|
|
+
|
|
|
+ <van-cell
|
|
|
+ custom-class="my-cell"
|
|
|
+ :title="$t('chan-pin-xu-qiu-cheng-jiao-dan')"
|
|
|
+ @click="navigateTo('/pagesMine/Order')"
|
|
|
+ icon="http://imttech.oss-cn-hangzhou.aliyuncs.com/micro/info_icon_collect(3).png"
|
|
|
+ is-link
|
|
|
+ />
|
|
|
+
|
|
|
+ <van-cell
|
|
|
+ custom-class="my-cell"
|
|
|
+ :title="$t('zhang-hu-yu-an-quan')"
|
|
|
+ @click="navigateTo('/pagesMine/Account')"
|
|
|
+ icon="http://imttech.oss-cn-hangzhou.aliyuncs.com/micro/info_icon_collect(4).png"
|
|
|
+ is-link
|
|
|
+ />
|
|
|
+ </van-cell-group>
|
|
|
+
|
|
|
+ <auth-phone ref="auth" :info="wxInfo" :show.sync="showPhone"></auth-phone>
|
|
|
+
|
|
|
+ <robot id="robot" @chatAdmin="chatAdmin" />
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+import { mapState } from 'vuex';
|
|
|
+import AuthPhone from '../components/AuthPhone.vue';
|
|
|
+import pages from '../mixins/pages';
|
|
|
+export default {
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ color: '#007d37',
|
|
|
+ acc: 'hello bigMeow',
|
|
|
+ language: {
|
|
|
+ chName: '中文',
|
|
|
+ enName: 'English'
|
|
|
+ },
|
|
|
+ locale: 'zh',
|
|
|
+ showPhone: false,
|
|
|
+ wxInfo: {},
|
|
|
+ enterImg: {
|
|
|
+ chName: 'http://imttech.oss-cn-hangzhou.aliyuncs.com/micro/info_zhanshangruzhu_new.png',
|
|
|
+ enName: 'http://imttech.oss-cn-hangzhou.aliyuncs.com/micro/info_zhanshangruzhu_eln.png'
|
|
|
+ }
|
|
|
+ };
|
|
|
+ },
|
|
|
+ mixins: [pages],
|
|
|
+ computed: {
|
|
|
+ ...mapState(['userInfo', 'barTop', 'barHeight', 'nodeEnv']),
|
|
|
+ icon() {
|
|
|
+ return this.userInfo && this.userInfo.avatar
|
|
|
+ ? this.userInfo.avatar
|
|
|
+ : 'http://imttech.oss-cn-hangzhou.aliyuncs.com/micro/info_img_touxiang_01.png';
|
|
|
+ },
|
|
|
+ name() {
|
|
|
+ return this.userInfo ? this.userInfo.nickname : this.$t('wei-deng-lu');
|
|
|
+ }
|
|
|
+ },
|
|
|
+ onShow() {
|
|
|
+ this.$store.dispatch('getUnreadNumber');
|
|
|
+ },
|
|
|
+ onLoad(options) {
|
|
|
+ if (this.nodeEnv && options.local) {
|
|
|
+ this.$i18n.set('en');
|
|
|
+ this.checkTabBar();
|
|
|
+ }
|
|
|
+ },
|
|
|
+ components: {
|
|
|
+ AuthPhone
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ choose() {
|
|
|
+ const _this = this;
|
|
|
+ wx.showActionSheet({
|
|
|
+ itemList: ['中文', 'English'],
|
|
|
+ success(res) {
|
|
|
+ if (res.tapIndex == 0) {
|
|
|
+ _this.$i18n.set('zh');
|
|
|
+ } else {
|
|
|
+ _this.$i18n.set('en');
|
|
|
+ }
|
|
|
+ _this.checkTabBar();
|
|
|
+ },
|
|
|
+ fail(res) {
|
|
|
+ console.log(res.errMsg);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ setLaguage(language) {
|
|
|
+ this.$i18n.set(language);
|
|
|
+ this.checkTabBar();
|
|
|
+ },
|
|
|
+ login(e) {
|
|
|
+ if (e.detail.iv) {
|
|
|
+ this.wxInfo = e.detail.userInfo;
|
|
|
+ this.$http
|
|
|
+ .post('/user/getMaUserInfo', {
|
|
|
+ sessionKey: this.$store.state.sessionKey,
|
|
|
+ rawData: e.detail.rawData,
|
|
|
+ signature: e.detail.signature,
|
|
|
+ encryptedData: e.detail.encryptedData,
|
|
|
+ iv: e.detail.iv
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ this.showPhone = true;
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ onShareAppMessage(from, target) {
|
|
|
+ return this.shareInfo();
|
|
|
+ }
|
|
|
+};
|
|
|
+</script>
|
|
|
+<style lang="less" scoped>
|
|
|
+.btn-content {
|
|
|
+ padding: 39px 15px 15px;
|
|
|
+ display: flex;
|
|
|
+ justify-content: flex-end;
|
|
|
+ align-items: flex-start;
|
|
|
+}
|
|
|
+
|
|
|
+.userInfo {
|
|
|
+ position: absolute;
|
|
|
+ left: 30px;
|
|
|
+ bottom: 15px;
|
|
|
+ h2 {
|
|
|
+ text-align: center;
|
|
|
+ height: 26px;
|
|
|
+ margin-top: 6px;
|
|
|
+ }
|
|
|
+}
|
|
|
+.ad {
|
|
|
+ padding: 0 15px;
|
|
|
+}
|
|
|
+</style>
|
|
|
+<style lang="less">
|
|
|
+.top {
|
|
|
+ position: relative;
|
|
|
+ // padding-bottom: 15px;
|
|
|
+ .btn1 {
|
|
|
+ position: absolute;
|
|
|
+ top: 20px;
|
|
|
+ left: 10px;
|
|
|
+ .van-button {
|
|
|
+ border-width: 0px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .btn-content {
|
|
|
+ --button-small-height: 38px;
|
|
|
+ // .van-button--normal {
|
|
|
+
|
|
|
+ // }
|
|
|
+ }
|
|
|
+ .language {
|
|
|
+ position: absolute;
|
|
|
+ left: 10px;
|
|
|
+ display: flex;
|
|
|
+ .language-item {
|
|
|
+ padding: 6px;
|
|
|
+ font-size: 14px;
|
|
|
+ color: #0f264d44;
|
|
|
+ line-height: 20px;
|
|
|
+ position: relative;
|
|
|
+
|
|
|
+ &:not(:first-child) {
|
|
|
+ &::before {
|
|
|
+ content: '';
|
|
|
+ width: 1px;
|
|
|
+ height: 6px;
|
|
|
+ top: 12px;
|
|
|
+ background-color: #0f264d44;
|
|
|
+ position: absolute;
|
|
|
+ left: 0;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ &.active {
|
|
|
+ color: #0f264d;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+.my-cell.van-cell {
|
|
|
+ padding: 21px 16px;
|
|
|
+ .van-cell__left-icon-wrap {
|
|
|
+ font-size: 24px;
|
|
|
+ margin-right: 14px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .van-cell__right-icon-wrap {
|
|
|
+ color: #cfd3de;
|
|
|
+ }
|
|
|
+
|
|
|
+ &::after {
|
|
|
+ left: 54px;
|
|
|
+ }
|
|
|
+}
|
|
|
+</style>
|