Ver código fonte

商户认证

zhaoxiaohai 3 anos atrás
pai
commit
8a43bff343
1 arquivos alterados com 7 adições e 1 exclusões
  1. 7 1
      pages/login/index.js

+ 7 - 1
pages/login/index.js

@@ -33,6 +33,7 @@ Page({
         fdutyparagraph: "", //统一社会代码
         /* 用户选择 */
         userIndex: 0, //多用户选择下标
+        throttle: true, //商户认证截流
         /* 错误提示 */
         errTips: {
             fphonenumber: false, //手机号码
@@ -230,6 +231,8 @@ Page({
             title: '请检查表单内容',
             icon: "none"
         });
+        //截流
+        if (!this.data.throttle) return;
         //发送请求
         _Http.basic({
             "accesstoken": wx.getStorageSync('userData').token,
@@ -253,12 +256,15 @@ Page({
                 title: res.data,
                 icon: "none"
             });
+            this.setData({
+                throttle: false
+            })
             wx.showToast({
                 title: "提交成功",
                 icon: "none"
             });
             setTimeout(() => {
-                wx.redirectTo({
+                wx.switchTab({
                     url: '/pages/tabbar-pages/home/index',
                 })
             }, 500);