Browse Source

人脸认证完成用户信息调用

yuanmingze 2 weeks ago
parent
commit
6bf5c9b0e8
1 changed files with 6 additions and 0 deletions
  1. 6 0
      src/pages-auth/face/index.vue

+ 6 - 0
src/pages-auth/face/index.vue

@@ -24,6 +24,9 @@ import { ref } from 'vue'
 import { onLoad, onUnload } from '@dcloudio/uni-app'
 
 import { bindBaseInfoApi, personCheckFaceApi } from '@/services/modules/auth'
+
+import { useUserStore } from '@/stores/modules/user'
+
 const API_SUCCESS_CODE = 0
 const API_PENDING_CODE = 1
 const FACE_AUTH_SUCCESS_CODE = 100000
@@ -32,6 +35,8 @@ const FACE_CHECK_RETRY_INTERVAL = 3000
 const BACK_DELAY = 1200
 const PARAM_ERROR_BACK_DELAY = 1500
 
+const userStore = useUserStore()
+
 const faceUrl = ref('')
 const serialNo = ref('')
 const realName = ref('')
@@ -140,6 +145,7 @@ const handleMessage = async (event: WebViewMessageEvent) => {
       await bindBaseInfoApi({
         idCardNumber: cardId.value,
       })
+      await userStore.getUserInfoByCode()
 
       uni.showToast({
         title: '认证成功',