| | |
| | | <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> |
| | |
| | | </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()"> |
| | |
| | | import { mapState } from 'vuex' |
| | | export default { |
| | | computed: { |
| | | ...mapState(['navHeight', 'statusbarHeight', 'openid', 'userInfo']) |
| | | ...mapState(['navHeight', 'statusbarHeight', 'openid', 'userInfo','recshopid','recuserid']) |
| | | }, |
| | | data() { |
| | | return { |
| | |
| | | url: '/pages/login/login' |
| | | }) |
| | | }, |
| | | jumpShare(){ |
| | | uni.navigateTo({ |
| | | url: '/pages/share/share' |
| | | }) |
| | | }, |
| | | // 跳转消息 |
| | | jumpNotice() { |
| | | uni.navigateTo({ |
| | |
| | | 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','') |
| | | } |
| | | }) |
| | | }, |