MrShi
5 天以前 b806c4ad52a661a1e5f0695650ec1a7e42f01633
small-program/pages/mine/mine.vue
@@ -59,6 +59,20 @@
         </view>
      </view>
      <u-popup :show="showPhone" round="15" mode="bottom" :safeAreaInsetBottom="true" @close="showPhone = false" :closeable="true" :closeOnClickOverlay="true">
         <view class="phone">
            <view class="phone-head">
               <view></view>
               <text>联系平台</text>
            </view>
             <view style="flex-direction: row;margin-bottom: 30rpx;" class="phone-item" v-for="(phone, index) in serverPhoneList" :key="index" @click="contactPhoneDo(phone)">
                  <image src="/static/icon/ic_call@2x.png" mode="widthFix"></image>
                  <text>{{ phone }}</text>
             </view>
             <view style="width: 100%; height: 30rpx;"></view>
         </view>
      </u-popup>
      <auth-login
         :show="showAuthLogin"
         :checked.sync="agreeChecked"
@@ -77,12 +91,17 @@
         CustomTabbar
      },
      computed: {
      ...mapState(['navHeight', 'statusbarHeight', 'openid', 'userInfo', 'token'])
      ...mapState(['navHeight', 'statusbarHeight', 'openid', 'userInfo', 'token']),
      serverPhoneList() {
         if (!this.serverPhone) return []
         return this.serverPhone.split(',')
      }
   },
   data() {
      return {
         showAuthLogin: false,
         agreeChecked: true,
         showPhone: false,
         userName: '',
         serverPhone: '',
         orderMenus: [
@@ -131,6 +150,13 @@
      }
   },
   methods: {
      contactPhoneDo(phone) {
         if (phone) {
            uni.makePhoneCall({
               phoneNumber: phone
            })
         }
      },
      async getPlatformInfo() {
         const res = await this.$u.api.getPlatformAboutUs({})
         if (res.code === 200 && res.data) {
@@ -159,11 +185,7 @@
            '关于我们': '/pages/rich-text/rich-text?type=5' 
         }
         if (item.label === '联系平台') {
            if (this.serverPhone) {
               uni.makePhoneCall({
                  phoneNumber: this.serverPhone
               })
            }
            this.showPhone = true
            return
         }
         if (['门店入驻', '我的门店'].includes(item.label)) {
@@ -189,7 +211,7 @@
            this.showAuthLogin = true
            return
         }
         uni.setStorageSync("orderStatus",label===0?-2:label)
         uni.$emit('shuaxin',label===0?-2:label)
         uni.switchTab({
            url: '/pages/itinerary/itinerary'
         })