|
@@ -256,6 +256,22 @@
|
|
|
<!-- <view @getphonenumber="decryptPhoneNumber" >shopId:{{shopId}}</view>
|
|
|
|
|
|
-->
|
|
|
+
|
|
|
+ <view class="qrBox" v-if="qrSHow">
|
|
|
+ <view class="qrimgBox">
|
|
|
+ <view class="qrTitle">微信绑定
|
|
|
+ <image src="../../static/timg/chahao.png" mode="" class="qrimgchahao" @click="qrclose"></image>
|
|
|
+ </view>
|
|
|
+ <view class="qrms">扫描/长按下方二维码进行绑定</view>
|
|
|
+ <view class="qrms2">绑定后可接收微信消息通知</view>
|
|
|
+ <view style="text-align: center;padding-top: 30rpx;">
|
|
|
+ <image :src="qrimg" mode="" class="qrimg" :show-menu-by-longpress='true'></image>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <view class="qrBtn" @click="qrclose">我知道了</view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
@@ -289,6 +305,9 @@
|
|
|
bizUserId:'',
|
|
|
coCouponsMsg:'',
|
|
|
coNoNewCustMsg:'',
|
|
|
+ qrimg:'',
|
|
|
+ qrSHow:false,
|
|
|
+ customerInfo:'',
|
|
|
}
|
|
|
},
|
|
|
onLoad(opt) {
|
|
@@ -370,6 +389,34 @@
|
|
|
}, 1000);
|
|
|
},
|
|
|
methods: {
|
|
|
+ seeQr(){
|
|
|
+ // this.authorizShow = true;
|
|
|
+ // return false;
|
|
|
+ if (this.userInfo) {
|
|
|
+
|
|
|
+ } else {
|
|
|
+ this.authorizShow = true;
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ uni.showLoading({
|
|
|
+ title: '加载中'
|
|
|
+ })
|
|
|
+ this.$request.httpBinary('wxV2/createQrCode', {
|
|
|
+ type:'bindWx',
|
|
|
+ customerId:this.customerInfo.id,
|
|
|
+ unionID:this.customerInfo.unionID,
|
|
|
+ }, 'GET').then(res => {
|
|
|
+ uni.hideLoading();
|
|
|
+ this.qrimg = 'data:image/png;base64,'+uni.arrayBufferToBase64(res);
|
|
|
+ this.qrSHow=true;
|
|
|
+ //this.img= uni.arrayBufferToBase64(res)
|
|
|
+ //console.log('list+=', this.queryShopList);
|
|
|
+
|
|
|
+ })
|
|
|
+ },
|
|
|
+ qrclose(){
|
|
|
+ this.qrSHow=false;
|
|
|
+ },
|
|
|
authorizShowHide(){
|
|
|
this.authorizShow=false
|
|
|
},
|
|
@@ -799,7 +846,7 @@
|
|
|
var data = res.data;
|
|
|
if(data.loginInfo){
|
|
|
this.userInfo=data.loginInfo.openUser;
|
|
|
-
|
|
|
+ this.customerInfo=data.loginInfo.customerInfo
|
|
|
this.$store.commit('mutationsuserInfo', this.userInfo);
|
|
|
this.$store.commit('mutationswxOpenData', data);
|
|
|
|
|
@@ -837,6 +884,10 @@
|
|
|
}
|
|
|
});
|
|
|
|
|
|
+
|
|
|
+ if(!this.customerInfo.wxMiniV2OpenID){
|
|
|
+ this.seeQr()
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
})
|
|
@@ -1066,6 +1117,73 @@
|
|
|
</script>
|
|
|
|
|
|
<style scoped>
|
|
|
+ .qrBox{
|
|
|
+ position: fixed;
|
|
|
+ width: 100vw;
|
|
|
+ height: 100vh;
|
|
|
+ background: rgba(0,0,0,0.5);
|
|
|
+ left: 0;
|
|
|
+ top: 0;
|
|
|
+ z-index: 11;
|
|
|
+ display: flex;
|
|
|
+ justify-content: center;
|
|
|
+ align-items: center;
|
|
|
+ flex-direction: column;
|
|
|
+ }
|
|
|
+ .qrimgBox{
|
|
|
+ width: 562rpx;
|
|
|
+ height: 704rpx;
|
|
|
+ background: #FFFFFF;
|
|
|
+ border-radius: 24rpx;
|
|
|
+ }
|
|
|
+ .qrTitle{
|
|
|
+ font-size: 30rpx;
|
|
|
+ font-family: PingFangSC-Medium, PingFang SC;
|
|
|
+ font-weight: 500;
|
|
|
+ color: #333333;
|
|
|
+ border-bottom: 1px solid #EEEEEE;
|
|
|
+ text-align: center;
|
|
|
+ line-height: 90rpx;
|
|
|
+ position: relative;
|
|
|
+ }
|
|
|
+ .qrimgchahao{
|
|
|
+ width: 38rpx;
|
|
|
+ height: 38rpx;
|
|
|
+ position: absolute;
|
|
|
+ top: 26rpx;
|
|
|
+ right: 20rpx;
|
|
|
+ }
|
|
|
+ .qrms{
|
|
|
+ font-weight: 400;
|
|
|
+ color: #999999;
|
|
|
+ line-height: 37rpx;
|
|
|
+ font-size: 26rpx;
|
|
|
+ padding-top: 23rpx;
|
|
|
+ text-align: center;
|
|
|
+ }
|
|
|
+ .qrms2{
|
|
|
+ font-weight: 400;
|
|
|
+ color: #999999;
|
|
|
+ line-height: 37rpx;
|
|
|
+ font-size: 26rpx;
|
|
|
+ text-align: center;
|
|
|
+ }
|
|
|
+ .qrimg{
|
|
|
+ width: 328rpx;
|
|
|
+ height: 328rpx;
|
|
|
+ }
|
|
|
+ .qrBtn{
|
|
|
+ width: 292rpx;
|
|
|
+ height: 64rpx;
|
|
|
+ background: #D53533;
|
|
|
+ border-radius: 32rpx;
|
|
|
+ color: #FFFFFF;
|
|
|
+ line-height: 64rpx;
|
|
|
+ text-align: center;
|
|
|
+ margin: 0 auto;
|
|
|
+ margin-top:40rpx;
|
|
|
+ }
|
|
|
+
|
|
|
.goodsTwo{
|
|
|
display: flex;
|
|
|
justify-content: space-between;
|