MrShi
7 天以前 8a899e63502939dbf034b90ba46741e0faa9023c
small-program/pages/mine/mine.vue
@@ -62,6 +62,7 @@
      <auth-login
         :show="showAuthLogin"
         :checked.sync="agreeChecked"
         @success="getOrderNum"
         @close="showAuthLogin = false" />
      <custom-tabbar></custom-tabbar>
   </view>
@@ -83,6 +84,7 @@
         showAuthLogin: false,
         agreeChecked: true,
         userName: '',
         serverPhone: '',
         orderMenus: [
            { label: '待支付', url: '/static/icon/mine_ic_daifukuan@2x.png', badge: 0,status:0 },
            { label: '待收货', url: '/static/icon/mine_ic_daishouhuo@2x.png', badge: 0,status:3 },
@@ -94,11 +96,13 @@
            { label: '用户服务协议' },
            { label: '用户隐私政策' },
            { label: '在线客服' },
            { label: '联系平台' },
            { label: '关于我们' }
         ]
      }
   },
   onLoad() {
      this.getPlatformInfo()
      uni.$on('loginOut', () => {
         this.orderMenus = [
            { label: '待支付', url: '/static/icon/mine_ic_daifukuan@2x.png', badge: 0,status:0 },
@@ -125,6 +129,12 @@
      }
   },
   methods: {
      async getPlatformInfo() {
         const res = await this.$u.api.getPlatformAboutUs({})
         if (res.code === 200 && res.data) {
            this.serverPhone = res.data.serverPhone || ''
         }
      },
      handleProfileClick() {
         if (this.token) {
            return
@@ -144,6 +154,14 @@
            '用户隐私政策': '/pages/rich-text/rich-text?type=1',
            '关于我们': '/pages/rich-text/rich-text?type=5' 
         }
         if (item.label === '联系平台') {
            if (this.serverPhone) {
               uni.makePhoneCall({
                  phoneNumber: this.serverPhone
               })
            }
            return
         }
         if (['门店入驻', '我的门店'].includes(item.label)) {
            if (!this.token) {
               this.showAuthLogin = true