Browse Source

原照片展示

刘琳琳 2 days ago
parent
commit
244a4867ef
4 changed files with 15 additions and 4 deletions
  1. 2 0
      app.js
  2. 2 2
      components/expirationReminderModal/index.js
  3. 1 0
      pages/inputIDCard/index.js
  4. 10 2
      pages/resultPage/index.js

+ 2 - 0
app.js

@@ -326,7 +326,9 @@ App({
     }
     try {
       let res = await getVisitDeviceUser(data1)
+      console.log('小程序二维码登记', res)
       this.data.userInfo.avatar = res.data.avatar
+      this.data.userInfo.idCardPhoto = res.data.avatar
       this.data.userInfo.xm = res.data.username
       this.data.userInfo.sfzh = res.data.idNumber
       this.data.userInfo.phone = res.data.phone

+ 2 - 2
components/expirationReminderModal/index.js

@@ -39,11 +39,11 @@ Component({
     btnStatus: true,
   },
   didMount() {
-    console.log(this.props.showCancelBtn)
+    // console.log(this.props.showCancelBtn)
   },
   didUpdate(newVal, oldVal) {
     console.log('didUpdate', newVal, oldVal)
-    console.log(this.props.showCancelBtn)
+    // console.log(this.props.showCancelBtn)
   },
   /**
    * 组件的方法列表

+ 1 - 0
pages/inputIDCard/index.js

@@ -148,6 +148,7 @@ Page({
       app.data.brushingCardUserIInfo = brushingCardUserIInfo
       app.data.userInfo = decrypted
       app.data.userInfo.avatar = decrypted.xp
+      app.data.userInfo.idCardPhoto = decrypted.xp
     } catch (error) {
       app.data.isNetworkQueryError = false
       console.log(error);

+ 10 - 2
pages/resultPage/index.js

@@ -102,7 +102,10 @@ Page({
           _this.backToSpecifiedPage('/pages/resultPage/index?result=1:1比对&type=身份证1:1')
         } else {
           _this.getUserInfo({
-            brushingCardUserIInfo: app.data.brushingCardUserIInfo,
+            brushingCardUserIInfo: {
+              ...app.data.brushingCardUserIInfo,
+              certPhotoBase64Str: app.data.brushingCardUserIInfo.photoBase64
+            },
             verifyType: 4  // 身份证
           })
         }
@@ -296,6 +299,7 @@ Page({
       let decrypted = JSON.parse(decryptedData.decrypted)
       app.data.userInfo = decrypted
       app.data.userInfo.avatar = decrypted.xp
+      app.data.userInfo.idCardPhoto = decrypted.xp
     } catch (error) {
       app.data.isNetworkQueryError = false
     }
@@ -339,7 +343,10 @@ Page({
         })
         if (res.success) {
           that.getUserInfo({
-            brushingCardUserIInfo: res.data,
+            brushingCardUserIInfo: {
+              ...res.data,
+              certPhotoBase64Str: brushingCardUserIInfo.photoBase64
+            },
             verifyType
           })
         } else {
@@ -371,6 +378,7 @@ Page({
   getUserInfo({brushingCardUserIInfo, verifyType}) {
     console.log('用户信息赋值', brushingCardUserIInfo, verifyType)
     app.data.userInfo.avatar = brushingCardUserIInfo.photoBase64 || '';
+    app.data.userInfo.idCardPhoto = brushingCardUserIInfo.certPhotoBase64Str || '';
     app.data.userInfo.xm = brushingCardUserIInfo.name;
     app.data.userInfo.sfzh = brushingCardUserIInfo.idNum;
     app.data.userInfo.verifyType = verifyType;