Explorar o código

refactor:服务对象加锁

zhanghui %!s(int64=2) %!d(string=hai) anos
pai
achega
8ea894cea3
Modificáronse 1 ficheiros con 6 adicións e 4 borrados
  1. 6 4
      myPages/serviceObjectFaceAuth/index.vue

+ 6 - 4
myPages/serviceObjectFaceAuth/index.vue

@@ -90,10 +90,6 @@
       verifyFace(){
         let that  = this;
 
-        if(this.requestStatus){
-          return;
-        }
-        this.requestStatus=true
 
         if(!this.selectIcon){
           uni.$u.toast('请阅读并同意《人脸识别服务协议》')
@@ -109,6 +105,12 @@
           title: '人脸识别中'
         })
 
+        if(this.requestStatus){
+          return;
+        }
+        this.requestStatus=true
+
+
         this.$api.verifyFace(that.reqParm).then((res)=>{
           this.requestStatus=true
           uni.hideLoading();