Bläddra i källkod

订单人脸认证

李书文 1 år sedan
förälder
incheckning
509d6fc26c
2 ändrade filer med 26 tillägg och 15 borttagningar
  1. 23 15
      pages/market/one/leader/handle.vue
  2. 3 0
      pages/market/one/leader/handleThree.vue

+ 23 - 15
pages/market/one/leader/handle.vue

@@ -5,7 +5,7 @@
 				<view>
 					<view class="item ctt">订单确认</view>
 				</view>
-				<view class="expand" :style="{height:expand?'auto':'300px'}">
+				<view class="expand" :style="{ height: expand ? 'auto' : '300px' }">
 					<view class="item">
 						<text class="label">订单编号</text>
 						<text class="desc omit">{{ item.tradeNo }}</text>
@@ -50,7 +50,7 @@
 						<text class="label">商户名称</text>
 						<text class="desc">{{ item.enterpriseName }}</text>
 					</view>
-				<!-- 	<view class="item">
+					<!-- 	<view class="item">
 						<text class="label">边民额度序号</text>
 						<text class="desc">{{ item.limitNo }}</text>
 					</view> -->
@@ -77,7 +77,7 @@
 				</view>
 				<view class="more" @click="expand = !expand">
 					<text class="icon">&#xe649;</text>
-					<text>{{expand?'收起':'更多信息'}}</text>
+					<text>{{ expand ? '收起' : '更多信息' }}</text>
 				</view>
 			</view>
 		</view>
@@ -105,6 +105,20 @@ export default {
 			this.orderId = e.orderId;
 			this.getData();
 		}
+		//人脸认证回调
+		uni.$on('face', res => {
+			this.http.request({
+				url: '/level-one-server/app/TbOrder/confirmOrder',
+				method: 'POST',
+				data: { orderId: this.item.id },
+				success: res => {
+					uni.showToast({ title: '订单确认成功' });
+					setTimeout(() => {
+						uni.switchTab({ url: '/pages/index/index' });
+					}, 1000);
+				}
+			});
+		});
 	},
 	methods: {
 		getData() {
@@ -122,21 +136,15 @@ export default {
 				content: '我已核对信息无误',
 				success: res => {
 					if (res.confirm) {
-						this.http.request({
-							url: '/level-one-server/app/TbOrder/confirmOrder',
-							method: 'POST',
-							data: { orderId: this.item.id },
-							success: res => {
-								uni.showToast({ title: '订单确认成功' });
-								setTimeout(() => {
-									uni.switchTab({ url: '/pages/index/index' });
-								}, 1000);
-							}
-						});
+						//跳转到人脸认证
+						uni.navigateTo({url:'/pages/face/faceRegister?type=2'})
 					}
 				}
 			});
 		}
+	},
+	destroyed() {
+		uni.$off('face');
 	}
 };
 </script>
@@ -145,7 +153,7 @@ export default {
 page {
 	background-color: $pg;
 }
-.cmain{
+.cmain {
 	padding-bottom: 100px;
 }
 .expand {

+ 3 - 0
pages/market/one/leader/handleThree.vue

@@ -339,6 +339,9 @@ export default {
 				});
 			}
 		}
+	},
+	destroyed() {
+		uni.$off('face');
 	}
 };
 </script>