Jelajahi Sumber

wesmiler 更新第5期更新代码合并

wesmiler 4 tahun lalu
induk
melakukan
302b66dca2

+ 1 - 1
app/api/controller/NotifyController.php

@@ -172,6 +172,6 @@ class NotifyController extends Controller
      * 人脸识别回调
      */
     public function face(){
-        PRedis::set("caches:face:notify:post", \request()->all(), 3600);
+        PRedis::set("caches:face:notify:post", input(), 3600);
     }
 }

+ 2 - 2
app/weixin/service/FaceAuth.php

@@ -72,8 +72,8 @@ class FaceAuth
             'idNumber'=> $idcard,
             'retIdImg'=> 'true',  // 是否返回上传身份证照片,可选,默认否
             'procedureType'=> 'video',  // 活体检测模式,video:读数活体;still静默活体(安全等级不高,不推荐使用)
-            'returnUrl'=> request()->domain().'/api/notify/face',  // 异步回调地址
-            'notifyUrl'=> request()->domain().'/weixin/auth/idcard?type=back',  // 回调跳转页面
+            'notifyUrl'=> request()->domain().'/api/notify/face',  // 异步回调地址
+            'returnUrl'=> request()->domain().'/weixin/auth/idcard?type=back',  // 回调跳转页面
         ];
 
         // 参数配置

+ 13 - 0
public/themes/default/weixin/public/assets/js/auth-idcard.js

@@ -12,6 +12,19 @@ var app = new Vue({
     },
     created: function(){
         this.getInfo();
+
+        // 验证结果
+        var type = getParam('type');
+        type = typeof(type) != 'undefined'? type : 0;
+        if(type == 'back'){
+            var params = {
+                url: location.href,
+                data: getParam('data'),
+                sign: getParam('sign')
+            }
+
+            alert(JSON.stringify(params))
+        }
     },
     methods: {
         // 获取用户信息