| | |
| | | </view> |
| | | </view> |
| | | <view class="user-right" v-if="userInfo"> |
| | | <view class="user-right-item" @click="jumpSettings"> |
| | | <image src="/static/icon/ic_option@2x.png" mode="widthFix"></image> |
| | | <view class="user-right-item" @click="showQrCodePopup"> |
| | | <image src="/static/icon/ic_QRcode@2x.png" mode="widthFix"></image> |
| | | </view> |
| | | <view class="user-right-item" @click="jumpNotice"> |
| | | <view class="user-right-item-tips" v-if="objNum && objNum.unRead === 0"></view> |
| | |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view class="guanggao" @click="jumpShare()"> |
| | | <!-- <view class="guanggao" @click="jumpShare()"> |
| | | <image :src="share" mode="widthFix"></image> |
| | | </view> |
| | | </view> --> |
| | | <view class="gn"> |
| | | <view class="gn-item" @click="jump()"> |
| | | <text>我是经销商</text> |
| | |
| | | <text>在线客服</text> |
| | | <image src="/static/icon/ic_ar2@2x.png" mode="widthFix"></image> |
| | | </view> |
| | | <view class="gn-item"> |
| | | <view class="gn-item" @click="jumpAbout"> |
| | | <text>关于我们</text> |
| | | <image src="/static/icon/ic_ar2@2x.png" mode="widthFix"></image> |
| | | </view> |
| | | <view class="gn-item" @click="jumpSettings"> |
| | | <text>设置</text> |
| | | <image src="/static/icon/ic_ar2@2x.png" mode="widthFix"></image> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <u-popup :show="showQrCode" round="15" :closeable="true" @close="showQrCode = false" mode="bottom"> |
| | | <view class="qr-code-popup"> |
| | | <view class="qr-code-title">邀请二维码</view> |
| | | <view class="qr-code-image"> |
| | | <image :src="qrCodeUrl" mode="widthFix"></image> |
| | | </view> |
| | | </view> |
| | | </u-popup> |
| | | <Login ref="login" /> |
| | | </view> |
| | | </template> |
| | |
| | | export default { |
| | | components: { Login }, |
| | | computed: { |
| | | ...mapState(['navHeight', 'statusbarHeight', 'openid', 'userInfo','recshopid','recuserid']) |
| | | ...mapState(['navHeight', 'statusbarHeight', 'openid', 'userInfo', 'recshopid', 'recuserid']) |
| | | }, |
| | | data() { |
| | | return { |
| | | objNum: null, |
| | | orderNum: null, |
| | | share: '' |
| | | share: '', |
| | | showQrCode: false, |
| | | qrCodeUrl: '' |
| | | }; |
| | | }, |
| | | async onLoad() { |
| | |
| | | if (this.userInfo) { |
| | | this.getMyInfo() |
| | | this.ordersStatistics() |
| | | } else { |
| | | this.objNum = null |
| | | this.orderNum = null |
| | | } |
| | | }, |
| | | methods: { |
| | | async showQrCodePopup() { |
| | | if (!this.userInfo) { |
| | | this.$refs.login.open() |
| | | return |
| | | } |
| | | let res = await this.$u.api.getMemberShareCode({}) |
| | | if (res.code === 200) { |
| | | this.qrCodeUrl = res.data |
| | | this.showQrCode = true |
| | | } |
| | | }, |
| | | jumpAbout() { |
| | | uni.navigateTo({ |
| | | url: '/pagesA/pages/rich-text-page/rich-text-page' |
| | | }) |
| | | }, |
| | | maskPhone(phone) { |
| | | if (!phone) return ''; |
| | | // 假设手机号为 11 位,保留前 3 位和后 4 位 |
| | |
| | | } |
| | | } |
| | | } |
| | | .qr-code-popup { |
| | | padding: 40rpx; |
| | | .qr-code-title { |
| | | text-align: center; |
| | | font-size: 32rpx; |
| | | font-weight: bold; |
| | | margin-bottom: 40rpx; |
| | | } |
| | | .qr-code-image { |
| | | text-align: center; |
| | | image { |
| | | width: 400rpx !important; |
| | | } |
| | | } |
| | | } |
| | | </style> |