Przeglądaj źródła

判断账号是否停用

xiaohaizhao 2 lat temu
rodzic
commit
c2faf6d765

+ 6 - 0
pages/login/modules/account.js

@@ -56,6 +56,7 @@ Component({
                 "password": md5.hexMD5(this.data.password),
                 "systemclient": "wechatsaletool"
             }).then(res => {
+                console.log("登录", res)
                 getCurrentPages()[0].setData({
                     loading: false
                 })
@@ -63,6 +64,11 @@ Component({
                     title: res.msg,
                     icon: "none"
                 })
+                if (res.account_list.length == 1 && res.account_list[0].status == 'INACTIVE') return wx.showToast({
+                    title: '该账号已停用',
+                    icon: "none",
+                    mask: true
+                })
                 wx.setStorageSync('loginMsg', {
                     accountno: this.data.accountno,
                     password: (this.data.memory) ? this.data.password : ''

+ 1 - 1
pages/login/modules/login.js

@@ -22,7 +22,7 @@ function query_userauth(i = 0) {
         querySite_Parameter();
     }
     _Http.basic({
-        "classname": "system.payorder.payorder", //"sysmanage.develop.userauth.userauth"
+        "classname": "sysmanage.develop.userauth.userauth", // "system.payorder.payorder"
         "method": "query_userauth",
         content: {
             nocache: true,

+ 6 - 0
pages/login/modules/phone.js

@@ -79,6 +79,7 @@ Component({
                 "password": md5.hexMD5(this.data.password),
                 "systemclient": "wechatsaletool"
             }).then(res => {
+                console.log("登录",res)
                 getCurrentPages()[0].setData({
                     loading: false
                 })
@@ -86,6 +87,11 @@ Component({
                     title: res.msg,
                     icon: "none"
                 })
+                if (res.account_list.length == 1 && res.account_list[0].status == 'INACTIVE') return wx.showToast({
+                    title: '该账号已停用',
+                    icon: "none",
+                    mask: true
+                })
                 wx.setStorageSync('loginMsg', {
                     phonenumber: (this.data.memory) ? this.data.phonenumber : ''
                 })