Эх сурвалжийг харах

Merge remote-tracking branch 'origin/feature/asyncOrder' into feature/asyncOrder

linbl 1 жил өмнө
parent
commit
9258449948

+ 19 - 1
pages/personal/personal.vue

@@ -17,6 +17,11 @@
 				<text>你还未认证,请先认证</text>
 				<text class="icon" style="float: right">&#xe8f2;</text>
 			</view>
+			<view class="message _info" @click="go('/pages/authentication/face')" v-if="(user.userType == 1 || user.userType == 2) && user.face == 0">
+				<text class="icon">&#xe78d;</text>
+				<text>你还未人脸认证,请先人脸认证</text>
+				<text class="icon" style="float: right">&#xe8f2;</text>
+			</view>
 			<!--用户信息-->
 			<view class="user">
 				<image src="../../static/icon/user.png" mode="widthFix" class="head"></image>
@@ -180,13 +185,26 @@ export default {
 			user: {}
 		};
 	},
+	onLoad() {
+		//人脸认证界面成功的回调
+		uni.$on('face', res => {
+			this.http.request({
+				url: '/sp-admin/app/AppUser/face',
+				method: 'POST',
+				success: res => {
+					this.user.face = 1;
+				}
+			});
+		});
+	},
 	onShow() {
 		this.user = this.getUser();
 		if (!this.hasAuth()) {
 			this.http.request({
 				url: '/sp-admin/app/AppUser/getAuth',
 				success: res => {
-					this.user.auth = res.data.data;
+					this.user.auth = res.data.data.auth;
+					this.user.face=res.data.data.face;
 				}
 			});
 		}