panhui 4 éve
szülő
commit
09d69ddbba
5 módosított fájl, 607 hozzáadás és 552 törlés
  1. 54 53
      package.json
  2. 225 213
      src/App.vue
  3. 34 34
      src/mixins/commont.js
  4. 289 252
      src/pages/My.vue
  5. 5 0
      yarn.lock

+ 54 - 53
package.json

@@ -1,53 +1,54 @@
-{
-    "name": "imt-mini",
-    "version": "1.0.0",
-    "private": true,
-    "scripts": {
-        "build:wechat": "megalo-cli-service build",
-        "build:alipay": "megalo-cli-service build --platform alipay",
-        "build:swan": "megalo-cli-service build --platform swan",
-        "build:toutiao": "megalo-cli-service build --platform toutiao",
-        "dev:alipay": "megalo-cli-service serve --platform alipay",
-        "dev:swan": "megalo-cli-service serve --platform swan",
-        "dev:wechat": "megalo-cli-service serve",
-        "dev:toutiao": "megalo-cli-service serve --platform toutiao",
-        "lint": "megalo-cli-service lint"
-    },
-    "license": "ISC",
-    "babel": {
-        "presets": [
-            "@megalo/app"
-        ]
-    },
-    "devDependencies": {
-        "@megalo/babel-preset-app": "latest",
-        "@megalo/cli-plugin-eslint": "latest",
-        "@megalo/cli-service": "latest",
-        "@megalo/eslint-config-standard": "latest",
-        "@megalo/target": "latest",
-        "@megalo/template-compiler": "latest",
-        "@vue/eslint-config-prettier": "^5.0.0",
-        "babel-eslint": "^10.1.0",
-        "eslint": "^5.15.3",
-        "eslint-plugin-prettier": "^3.1.1",
-        "eslint-plugin-vue": "^5.0.0",
-        "less": "^3.8.1",
-        "less-loader": "^4.1.0"
-    },
-    "dependencies": {
-        "@megalo/api": "latest",
-        "@megalo/vhtml-plugin": "latest",
-        "@vant/weapp": "^1.4.4",
-        "countup.js": "^2.0.7",
-        "dayjs": "^1.9.6",
-        "megalo": "latest",
-        "mpvue-cropper": "^0.2.3",
-        "octoparse": "^0.4.2",
-        "style-resources-loader": "^1.3.3",
-        "tslint": "^6.1.3",
-        "vue-i18n": "^8.22.1",
-        "vuex": "^3.1.0",
-        "vuex-i18n": "^1.13.1",
-        "we-cropper": "^1.3.9"
-    }
-}
+{
+    "name": "imt-mini",
+    "version": "1.0.0",
+    "private": true,
+    "scripts": {
+        "build:wechat": "megalo-cli-service build",
+        "build:alipay": "megalo-cli-service build --platform alipay",
+        "build:swan": "megalo-cli-service build --platform swan",
+        "build:toutiao": "megalo-cli-service build --platform toutiao",
+        "dev:alipay": "megalo-cli-service serve --platform alipay",
+        "dev:swan": "megalo-cli-service serve --platform swan",
+        "dev:wechat": "megalo-cli-service serve",
+        "dev:toutiao": "megalo-cli-service serve --platform toutiao",
+        "lint": "megalo-cli-service lint"
+    },
+    "license": "ISC",
+    "babel": {
+        "presets": [
+            "@megalo/app"
+        ]
+    },
+    "devDependencies": {
+        "@megalo/babel-preset-app": "latest",
+        "@megalo/cli-plugin-eslint": "latest",
+        "@megalo/cli-service": "latest",
+        "@megalo/eslint-config-standard": "latest",
+        "@megalo/target": "latest",
+        "@megalo/template-compiler": "latest",
+        "@vue/eslint-config-prettier": "^5.0.0",
+        "babel-eslint": "^10.1.0",
+        "eslint": "^5.15.3",
+        "eslint-plugin-prettier": "^3.1.1",
+        "eslint-plugin-vue": "^5.0.0",
+        "less": "^3.8.1",
+        "less-loader": "^4.1.0"
+    },
+    "dependencies": {
+        "@megalo/api": "latest",
+        "@megalo/vhtml-plugin": "latest",
+        "@vant/weapp": "^1.4.4",
+        "countup.js": "^2.0.7",
+        "dayjs": "^1.9.6",
+        "megalo": "latest",
+        "mpvue-cropper": "^0.2.3",
+        "octoparse": "^0.4.2",
+        "style-resources-loader": "^1.3.3",
+        "tslint": "^6.1.3",
+        "umtrack-wx": "^2.6.2",
+        "vue-i18n": "^8.22.1",
+        "vuex": "^3.1.0",
+        "vuex-i18n": "^1.13.1",
+        "we-cropper": "^1.3.9"
+    }
+}

+ 225 - 213
src/App.vue

@@ -1,213 +1,225 @@
-<script>
-export default {
-    onLaunch(options) {
-        console.log(options);
-        if (options.query && options.query.local === 'en') {
-            this.$i18n.set('en');
-            this.checkTabBar();
-        }
-        wx.login({
-            success: res => {
-                console.log(res);
-                this.$http.post('/auth/maLogin', { code: res.code }).then(res => {
-                    this.$http.setToken(res.token);
-                    this.$store.commit('setSessionKey', res.sessionKey);
-                    this.$store
-                        .dispatch('getUserInfo')
-                        .then(() => {
-                            this.globalData.initialize = true;
-                            console.log(this.globalData);
-                            if (this.globalData.initializeCallback) {
-                                this.globalData.initializeCallback();
-                            }
-                        })
-                        .catch(() => {
-                            this.globalData.initialize = true;
-                        });
-                });
-            },
-            fail() {}
-        });
-        this.$store.dispatch('getSystemInfo');
-        this.$store.dispatch('getBarHeight');
-        this.$store.dispatch('getArea');
-    },
-    onShow(options) {
-        // Do something when show.
-        console.log('App onShow');
-    },
-    onHide() {
-        // Do something when hide.
-        console.log('App onHide');
-    },
-    onError(msg) {
-        console.log('App onError');
-        console.log(msg);
-    },
-    globalData() {
-        return {
-            initialize: false
-        };
-    }
-};
-</script>
-<style lang="less">
-.pageBottom {
-    padding-bottom: 100px;
-}
-h1 {
-    font-size: 20px;
-    font-weight: bolder;
-    color: #000000;
-    line-height: 24px;
-    white-space: nowrap;
-    overflow: hidden;
-    text-overflow: ellipsis;
-}
-
-h2 {
-    font-size: 16px;
-    font-weight: bold;
-    color: #000000;
-    line-height: 24px;
-    white-space: nowrap;
-    overflow: hidden;
-    text-overflow: ellipsis;
-}
-h3 {
-    font-size: 14px;
-    font-weight: bold;
-    color: #000000;
-    line-height: 24px;
-    overflow: hidden;
-    text-overflow: ellipsis;
-    white-space: nowrap;
-    word-wrap: normal;
-}
-
-h4 {
-    font-size: 12px;
-    font-weight: bold;
-    color: #000000;
-    line-height: 24px;
-    white-space: nowrap;
-    overflow: hidden;
-    text-overflow: ellipsis;
-}
-
-.white {
-    color: #fff;
-}
-
-p {
-    font-size: 12px;
-    color: #878d99;
-    line-height: 22px;
-}
-.van-search {
-    .van-icon {
-        color: #878d99 !important;
-    }
-}
-.font14 {
-    font-size: 14px;
-}
-
-.fontNormal {
-    font-weight: normal;
-}
-
-page {
-    --tab-active-text-color: @warn;
-    --tabs-bottom-bar-color: @warn;
-    --tab-text-color: @text1;
-    --tabs-bottom-bar-height: 2px;
-    --button-plain-background-color: transparent;
-    --sidebar-selected-text-color: @warn;
-    --sidebar-padding: 20px;
-    overflow-anchor: none;
-}
-
-.van-image {
-    display: block !important;
-}
-
-.col-3 {
-    width: 33.33%;
-}
-
-.bg-white {
-    background-color: @bgw;
-}
-
-.flex1 {
-    flex-grow: 1;
-}
-
-.form {
-    .van-cell {
-        --cell-vertical-padding: 23px;
-
-        .van-field__label {
-            --field-label-color: #000000;
-            font-size: 14px;
-            font-weight: bold;
-        }
-
-        .van-field__input {
-            --field-input-text-color: #000;
-            font-size: 14px;
-        }
-    }
-}
-
-.my-icon {
-    // &:active {
-    //     color: @warn!important;
-    //     background-color: darken(#fff, 5);
-    // }
-}
-
-.van-button--normal {
-    // font-weight: bold;
-}
-
-@keyframes iconAnimate {
-    from {
-        -webkit-transform: scale(1);
-        transform: scale(1);
-    }
-
-    20% {
-        -webkit-transform: scale(0.8);
-        transform: scale(0.8);
-    }
-
-    80% {
-        -webkit-transform: scale(1.5);
-        transform: scale(1.5);
-    }
-    100% {
-        -webkit-transform: scale(1);
-        transform: scale(1);
-    }
-}
-.iconAnimate {
-    animation: iconAnimate ease-in-out 0.3s;
-}
-
-.van-button--normal {
-    --button-normal-font-size: 15px;
-}
-
-.btn_icon {
-    display: flex;
-    align-items: center;
-    .van-icon {
-        margin-left: 2px;
-    }
-}
-.van-icon {
-    font-weight: bold;
-}
-</style>
+<script>
+import 'umtrack-wx';
+export default {
+    onLaunch(options) {
+        console.log(options);
+        if (options.query && options.query.local === 'en') {
+            this.$i18n.set('en');
+            this.checkTabBar();
+        }
+        wx.login({
+            success: res => {
+                console.log(res);
+                this.$http.post('/auth/maLogin', { code: res.code }).then(res => {
+                    this.$http.setToken(res.token);
+                    this.$store.commit('setSessionKey', res.sessionKey);
+                    this.$store
+                        .dispatch('getUserInfo')
+                        .then(() => {
+                            this.globalData.initialize = true;
+                            console.log(this.globalData);
+                            if (this.globalData.initializeCallback) {
+                                this.globalData.initializeCallback();
+                            }
+                        })
+                        .catch(() => {
+                            this.globalData.initialize = true;
+                        });
+                });
+            },
+            fail() {}
+        });
+        this.$store.dispatch('getSystemInfo');
+        this.$store.dispatch('getBarHeight');
+        this.$store.dispatch('getArea');
+    },
+    onShow(options) {
+        // Do something when show.
+        console.log('App onShow');
+    },
+    onHide() {
+        // Do something when hide.
+        console.log('App onHide');
+    },
+    onError(msg) {
+        console.log('App onError');
+        console.log(msg);
+    },
+    globalData() {
+        return {
+            initialize: false
+        };
+    },
+    umengConfig: {
+        appKey: '60583fdab8c8d45c13a99cc4', //由友盟分配的APP_KEY
+        // 使用Openid进行统计,此项为false时将使用友盟+uuid进行用户统计。
+        // 使用Openid来统计微信小程序的用户,会使统计的指标更为准确,对系统准确性要求高的应用推荐使用Openid。
+        useOpenid: true,
+        // 使用openid进行统计时,是否授权友盟自动获取Openid,
+        // 如若需要,请到友盟后台"设置管理-应用信息"(https://mp.umeng.com/setting/appset)中设置appId及secret
+        autoGetOpenid: false,
+        debug: true, //是否打开调试模式
+        uploadUserInfo: true // 自动上传用户信息,设为false取消上传,默认为false
+    }
+};
+</script>
+<style lang="less">
+.pageBottom {
+    padding-bottom: 100px;
+}
+h1 {
+    font-size: 20px;
+    font-weight: bolder;
+    color: #000000;
+    line-height: 24px;
+    white-space: nowrap;
+    overflow: hidden;
+    text-overflow: ellipsis;
+}
+
+h2 {
+    font-size: 16px;
+    font-weight: bold;
+    color: #000000;
+    line-height: 24px;
+    white-space: nowrap;
+    overflow: hidden;
+    text-overflow: ellipsis;
+}
+h3 {
+    font-size: 14px;
+    font-weight: bold;
+    color: #000000;
+    line-height: 24px;
+    overflow: hidden;
+    text-overflow: ellipsis;
+    white-space: nowrap;
+    word-wrap: normal;
+}
+
+h4 {
+    font-size: 12px;
+    font-weight: bold;
+    color: #000000;
+    line-height: 24px;
+    white-space: nowrap;
+    overflow: hidden;
+    text-overflow: ellipsis;
+}
+
+.white {
+    color: #fff;
+}
+
+p {
+    font-size: 12px;
+    color: #878d99;
+    line-height: 22px;
+}
+.van-search {
+    .van-icon {
+        color: #878d99 !important;
+    }
+}
+.font14 {
+    font-size: 14px;
+}
+
+.fontNormal {
+    font-weight: normal;
+}
+
+page {
+    --tab-active-text-color: @warn;
+    --tabs-bottom-bar-color: @warn;
+    --tab-text-color: @text1;
+    --tabs-bottom-bar-height: 2px;
+    --button-plain-background-color: transparent;
+    --sidebar-selected-text-color: @warn;
+    --sidebar-padding: 20px;
+    overflow-anchor: none;
+}
+
+.van-image {
+    display: block !important;
+}
+
+.col-3 {
+    width: 33.33%;
+}
+
+.bg-white {
+    background-color: @bgw;
+}
+
+.flex1 {
+    flex-grow: 1;
+}
+
+.form {
+    .van-cell {
+        --cell-vertical-padding: 23px;
+
+        .van-field__label {
+            --field-label-color: #000000;
+            font-size: 14px;
+            font-weight: bold;
+        }
+
+        .van-field__input {
+            --field-input-text-color: #000;
+            font-size: 14px;
+        }
+    }
+}
+
+.my-icon {
+    // &:active {
+    //     color: @warn!important;
+    //     background-color: darken(#fff, 5);
+    // }
+}
+
+.van-button--normal {
+    // font-weight: bold;
+}
+
+@keyframes iconAnimate {
+    from {
+        -webkit-transform: scale(1);
+        transform: scale(1);
+    }
+
+    20% {
+        -webkit-transform: scale(0.8);
+        transform: scale(0.8);
+    }
+
+    80% {
+        -webkit-transform: scale(1.5);
+        transform: scale(1.5);
+    }
+    100% {
+        -webkit-transform: scale(1);
+        transform: scale(1);
+    }
+}
+.iconAnimate {
+    animation: iconAnimate ease-in-out 0.3s;
+}
+
+.van-button--normal {
+    --button-normal-font-size: 15px;
+}
+
+.btn_icon {
+    display: flex;
+    align-items: center;
+    .van-icon {
+        margin-left: 2px;
+    }
+}
+.van-icon {
+    font-weight: bold;
+}
+</style>

+ 34 - 34
src/mixins/commont.js

@@ -162,40 +162,40 @@ export default {
             };
         },
         checkLoginNum() {
-            if (!this.$store.state.userInfo) {
-                wx.getStorage({
-                    key: 'freePage',
-                    success: res => {
-                        if (res.data > 5) {
-                            Dialog.confirm({
-                                title: this.$t('ti-shi'),
-                                message: this.$t('wei-deng-lu-yong-hu-zhi-you-wu-ci-cha-kan-quan-xian'),
-                                confirmButtonColor: this.$colors.warn,
-                                confirmButtonText: this.$t('li-ji-deng-lu'),
-                                cancelButtonText: this.$t('qu-xiao')
-                            })
-                                .then(() => {
-                                    wx.navigateTo({
-                                        url: '/pagesHome/Authorized'
-                                    });
-                                })
-                                .catch(e => {
-                                    wx.navigateBack();
-                                });
-                        }
-                        wx.setStorage({
-                            key: 'freePage',
-                            data: res.data + 1
-                        });
-                    },
-                    fail: e => {
-                        wx.setStorage({
-                            key: 'freePage',
-                            data: 1
-                        });
-                    }
-                });
-            }
+            // if (!this.$store.state.userInfo) {
+            //     wx.getStorage({
+            //         key: 'freePage',
+            //         success: res => {
+            //             if (res.data > 5) {
+            //                 Dialog.confirm({
+            //                     title: this.$t('ti-shi'),
+            //                     message: this.$t('wei-deng-lu-yong-hu-zhi-you-wu-ci-cha-kan-quan-xian'),
+            //                     confirmButtonColor: this.$colors.warn,
+            //                     confirmButtonText: this.$t('li-ji-deng-lu'),
+            //                     cancelButtonText: this.$t('qu-xiao')
+            //                 })
+            //                     .then(() => {
+            //                         wx.navigateTo({
+            //                             url: '/pagesHome/Authorized'
+            //                         });
+            //                     })
+            //                     .catch(e => {
+            //                         wx.navigateBack();
+            //                     });
+            //             }
+            //             wx.setStorage({
+            //                 key: 'freePage',
+            //                 data: res.data + 1
+            //             });
+            //         },
+            //         fail: e => {
+            //             wx.setStorage({
+            //                 key: 'freePage',
+            //                 data: 1
+            //             });
+            //         }
+            //     });
+            // }
         },
         checkTabBar() {
             wx.setTabBarItem({

+ 289 - 252
src/pages/My.vue

@@ -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>

+ 5 - 0
yarn.lock

@@ -9100,6 +9100,11 @@ uglify-js@3.4.x:
     commander "~2.19.0"
     source-map "~0.6.1"
 
+umtrack-wx@^2.6.2:
+  version "2.6.2"
+  resolved "https://registry.yarnpkg.com/umtrack-wx/-/umtrack-wx-2.6.2.tgz#238abeb679643edadde2a076fad7a5b00ea753b7"
+  integrity sha512-EdxHh5pW7TYhE8A7AUzqLBXV+P6Sk3y86iBnAbq/7IFd3Bwl0LoQZ+lA6aMAnd1Ylxe+68uO7xekKMS2NLB5xQ==
+
 unicode-canonical-property-names-ecmascript@^1.0.4:
   version "1.0.4"
   resolved "https://registry.yarnpkg.com/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-1.0.4.tgz#2619800c4c825800efdd8343af7dd9933cbe2818"