Browse Source

Merge branch 'dev' into ats

# Conflicts:
#	pages/user/addCar/addCar.vue
twt 1 year ago
parent
commit
50fc9d7dea
3 changed files with 141 additions and 5 deletions
  1. 119 1
      pages/index/index.vue
  2. 18 3
      pages/user/addCar/addCar.vue
  3. 4 1
      pages/user/user.vue

+ 119 - 1
pages/index/index.vue

@@ -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;

+ 18 - 3
pages/user/addCar/addCar.vue

@@ -5,7 +5,7 @@
 		<view class="carMessage">
 
 			<view class="mesView">
-				<view class="leftTitle">车牌号</view>
+				<view class="leftTitle"><span class="stars">*</span> 车牌号</view>
 				<input class="plateNumber" placeholder-style="color:#999999" placeholder="请输入车牌号" disabled="true"
 					@tap="plateShow=true,bb()" v-model.trim="plateNo" />
 				<plate-input v-if="plateShow" :plate="plateNo" @export="setPlate" @close="plateShow=false" />
@@ -27,7 +27,7 @@
 			<view class="line"></view>
 
 			<view class="mesView" @click="goCarModel()">
-				<view class="leftTitle">车型</view>
+				<view class="leftTitle"><span class="stars">*</span>车型</view>
 				<view class="carModBtn noSelectColor" v-if="!carModelInfo.value">请选择车型</view>
 				<view class="carModBtn selectColor carMod" v-else>{{carModelInfo.value}}</view>
 				<image src="../../../static/img/big_rightArrow.png" class="big_rightArrow"></image>
@@ -35,7 +35,7 @@
 			<view class="line"></view>
 			
 			<view class="mesView" @click="bb">
-				<view class="leftTitle">行驶里程</view>
+				<view class="leftTitle"><span class="stars">*</span>行驶里程</view>
 				<input class="mileageInput selectColor" type="number" v-model="mileage" placeholder="请输入"
 					placeholder-style="color:#999999" />
 				<view class="kmStr">km</view>
@@ -289,6 +289,7 @@
 					});
 					return false;
 				}
+<<<<<<< .mine
 				if(!this.carModelInfo.value){
 					uni.showToast({
 						title: '请选择车型',
@@ -298,6 +299,17 @@
 					return false;
 				}
 				
+=======
+				if(!this.carModelInfo.value){
+					uni.showToast({
+						title: '请选择车型',
+						icon: 'none',
+						duration: 3000
+					});
+					return false;
+				}
+
+>>>>>>> .theirs
 				if (this.isEditCar == 'true') {
 					this.updateTMemberCar()
 				} else {
@@ -583,4 +595,7 @@
 		background-color: #EEEEEE;
 		height: 1rpx;
 	}
+	.stars{
+		color: #FF2400;
+	}
 </style>

+ 4 - 1
pages/user/user.vue

@@ -628,7 +628,9 @@
 							that.queryMyDetail()
                         }, 1000); */
 						that.queryMyDetail()
-						
+						if(!data.loginInfo.customerInfo.wxMiniV2OpenID){
+							this.seeQr()
+						}
 						if(this.numList.customerInfo.pState==1&&this.numList.shopSettings.partnerDisabled){
 							this.kkshow=true
 						}
@@ -637,6 +639,7 @@
 						}
 						
 					}
+					
 				})
 			},
 			map() {