MrShi
10 小时以前 ac33a3140ef8ef20dfd2537fce2dfdd0f374f30e
mini-program/pages/mine/mine.vue
@@ -8,7 +8,7 @@
         <view class="user">
            <view class="user-left">
               <view class="user-image">
                  <image :src="userInfo.imgFullUrl" mode="widthFix"></image>
                  <image :src="userInfo.imgFullUrl?userInfo.imgFullUrl:'/static/icon/default.png'" mode="widthFix"></image>
               </view>
               <view class="user-name">
                  <button open-type="getPhoneNumber" @getphonenumber="getphonenumber" v-if="!userInfo">获取手机号</button>
@@ -69,8 +69,8 @@
               </view>
            </view>
         </view>
         <view class="guanggao">
            <image src="/static/images/share@2x.png" mode="widthFix"></image>
         <view class="guanggao" @click="jumpShare()">
            <image src="/static/images/share@2x.png"  mode="widthFix"></image>
         </view>
         <view class="gn">
            <view class="gn-item" @click="jump()">
@@ -94,7 +94,7 @@
   import { mapState } from 'vuex'
   export default {
      computed: {
         ...mapState(['navHeight', 'statusbarHeight', 'openid', 'userInfo'])
         ...mapState(['navHeight', 'statusbarHeight', 'openid', 'userInfo','recshopid','recuserid'])
      },
      data() {
         return {
@@ -132,6 +132,11 @@
               url: '/pages/login/login'
            })
         },
         jumpShare(){
            uni.navigateTo({
               url: '/pages/share/share'
            })
         },
         // 跳转消息
         jumpNotice() {
            uni.navigateTo({
@@ -148,11 +153,15 @@
         getphonenumber(e) {
            this.$u.api.wxPhone({
               code: e.detail.code,
               shopId:this.recshopid,
               recId:this.recuserid,
               openid: this.openid
            }).then(res => {
               if (res.code === 200) {
                  this.$store.commit('setUserInfo', res.data.member)
                  this.$store.commit('setToken', res.data.token)
                   this.$store.commit('setRecShopId','')
                   this.$store.commit('setRecUserId','')
               }
            })
         },