liwei2496 7 meses atrás
pai
commit
0afc6e6289

+ 15 - 2
pagesHouse/Verification/detailsewm.vue

@@ -184,9 +184,22 @@ this.hexiaodata=JSON.parse(option.list);
 			};
 			
 			this.$api.get('/api/merchant/food/queryOrderDetail', postdata).then(res => {
-				  console.log('111111111111111111',res.data.data)
-				this.getalllist=res.data.data;
+				  console.log('111111111111111111',res.data)
 				
+				if(res.data.code==500){
+					uni.showToast({
+					title:res.data.msg,
+					icon:'none',
+					duration:1500
+					})
+					setTimeout(()=>{
+						uni.navigateBack({
+							delta: 1
+						});
+					},1500)
+				}else{
+					this.getalllist=res.data.data;
+				}
 				
 			})
 

+ 15 - 6
pagesHouse/Verification/ems.vue

@@ -25,12 +25,21 @@
 				uni.scanCode({
 					onlyFromCamera: true,
 					success: (res) => {
-						console.log('扫描二维码成功,结果:' + res.result);
-						
-						uni.navigateTo({
-							url: "/pagesHouse/Verification/detailsewm?list=" + res.result
-						})
-					
+						//
+						console.log('扫描二维码成功,结果:' + JSON.parse(res.result).merchantId,);
+						console.log(uni.getStorageSync('merchantId'))
+						if(JSON.parse(res.result).merchantId!=uni.getStorageSync('merchantId')){
+							uni.showToast({
+							title:'您的核销码不是该商家的核销码',
+							icon:'none',
+							duration:1500
+							})
+						}else{
+							uni.navigateTo({
+								url: "/pagesHouse/Verification/detailsewm?list=" + res.result
+							})
+						}
+											
 					},
 					error: (res) => {
 						console.log('扫描二维码出现错误')