Jelajahi Sumber

人脸识别认证-订单确认与进口申报确认

linbl 1 tahun lalu
induk
melakukan
8582b122a4
1 mengubah file dengan 29 tambahan dan 18 penghapusan
  1. 29 18
      pages/market/one/leader/order.vue

+ 29 - 18
pages/market/one/leader/order.vue

@@ -127,13 +127,34 @@ export default {
 			user:this.getUser(),
 			list: [],
 			loadMore: true,
-			user: this.getUser(),
 			confirmType: 1,//边民确认类型[1=刷脸,2=指纹]
+			id: '',
+			flag: '',
 		};
 	},
 	onLoad() {
 		this.getData();
-		console.log("111111",this.list)
+		uni.$on('face', res => {
+			if(this.flag == 1) {
+				this.http.request({
+					url: '/level-one-server/app/TbOrder/confirmOrder',
+					data: { orderId: this.id , confirmType: this.confirmType},
+					success: resp => {
+						uni.showToast({ title: '订单确认成功' });
+						this.refresh();
+					}
+				});
+			} else if(this.flag == 2) {
+				this.http.request({
+					url: '/level-one-server/app/TbOrder/applyOrder',
+					data: { orderId: this.id },
+					success: resp => {
+						uni.showToast({ title: '进口申报确认成功' });
+						this.refresh();
+					}
+				});
+			}
+		})
 	},
 	methods: {
 		getData() {
@@ -179,25 +200,15 @@ export default {
 		},
 		//边民确认订单
 		confirmOrder(id) {
-			this.http.request({
-				url: '/level-one-server/app/TbOrder/confirmOrder',
-				data: { orderId: id , confirmType: this.confirmType},
-				success: resp => {
-					uni.showToast({ title: '操作成功' });
-					this.refresh();
-				}
-			});
+			this.id = id;
+			this.flag = 1;
+			uni.navigateTo({url: '/pages/authentication/face'});
 		},
 		//边民进口申报确认
 		applyOrder(id) {
-			this.http.request({
-				url: '/level-one-server/app/TbOrder/applyOrder',
-				data: { orderId: id },
-				success: resp => {
-					uni.showToast({ title: '操作成功' });
-					this.refresh();
-				}
-			});
+			this.id = id;
+			this.flag = 2;
+			uni.navigateTo({url: '/pages/authentication/face'});
 		},
 		// 取消订单
 		confirm(id) {