|
|
@@ -88,6 +88,17 @@ Component({
|
|
|
const s = _Http.baseUrl == "https://crm.meida.com:16691" ? await _Http.OldLogin(`?username=${this.data.accountno}&password=${encodeURIComponent(this.data.password)}`) : {
|
|
|
success: false
|
|
|
};
|
|
|
+ if (s.success == false) {
|
|
|
+ wx.showModal({
|
|
|
+ title: '提示',
|
|
|
+ content: s.msg,
|
|
|
+ showCancel: false,
|
|
|
+ })
|
|
|
+ getCurrentPages()[0].setData({
|
|
|
+ loading: false
|
|
|
+ })
|
|
|
+ }
|
|
|
+ if (s.success == false) return;
|
|
|
let res = s.success == true ? await _Http.SSO({
|
|
|
"accountno": s.data.userinfo.username,
|
|
|
"password": s.data.cookie.split("=")[1],
|
|
|
@@ -99,7 +110,7 @@ Component({
|
|
|
"imagecaptcha": this.data.imagecaptcha || '',
|
|
|
"systemclient": "wechatsaletool"
|
|
|
});
|
|
|
- if (res.remindchangepassword) return wx.showModal({
|
|
|
+ if (res.remindchangepassword && _Http.ENV === 'release') return wx.showModal({
|
|
|
title: '提示',
|
|
|
content: '当前密码为系统初始化密码,请修改后重新登录',
|
|
|
showCancel: false,
|
|
|
@@ -141,25 +152,25 @@ Component({
|
|
|
"imagecaptcha": this.data.imagecaptcha || '',
|
|
|
"systemclient": "wechatsaletool"
|
|
|
});
|
|
|
- // if (res.remindchangepassword) return wx.showModal({
|
|
|
- // title: '提示',
|
|
|
- // content: '当前密码为系统初始化密码,请修改后重新登录',
|
|
|
- // showCancel: false,
|
|
|
- // confirmText: "前去修改",
|
|
|
- // complete: () => {
|
|
|
- // wx.navigateTo({
|
|
|
- // url: '/pages/index/userCenter/changePassword/index?token=' + res.account_list[0].token
|
|
|
- // })
|
|
|
- // _Http.claerPassword = function () {
|
|
|
- // this.setData({
|
|
|
- // password: ""
|
|
|
- // })
|
|
|
- // }.bind(this);
|
|
|
- // getCurrentPages()[0].setData({
|
|
|
- // loading: false
|
|
|
- // })
|
|
|
- // }
|
|
|
- // })
|
|
|
+ if (res.remindchangepassword && _Http.ENV === 'release') return wx.showModal({
|
|
|
+ title: '提示',
|
|
|
+ content: '当前密码为系统初始化密码,请修改后重新登录',
|
|
|
+ showCancel: false,
|
|
|
+ confirmText: "前去修改",
|
|
|
+ complete: () => {
|
|
|
+ wx.navigateTo({
|
|
|
+ url: '/pages/index/userCenter/changePassword/index?token=' + res.account_list[0].token
|
|
|
+ })
|
|
|
+ _Http.claerPassword = function () {
|
|
|
+ this.setData({
|
|
|
+ password: ""
|
|
|
+ })
|
|
|
+ }.bind(this);
|
|
|
+ getCurrentPages()[0].setData({
|
|
|
+ loading: false
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
getCurrentPages()[0].setData({
|
|
|
loading: false
|
|
|
})
|