|
@@ -1,6 +1,7 @@
|
|
|
import Toast from '@vant/weapp/toast/toast';
|
|
|
const _Http = getApp().globalData.http;
|
|
|
const md5 = require("../../utils/md5");
|
|
|
+const loginMsg = require("./modules/login");
|
|
|
Page({
|
|
|
|
|
|
/**
|
|
@@ -45,24 +46,14 @@ Page({
|
|
|
loading: false
|
|
|
})
|
|
|
if (res.msg != '成功') return wx.showToast({
|
|
|
- title: res.data,
|
|
|
+ title: res.msg,
|
|
|
icon: "none"
|
|
|
})
|
|
|
- wx.setStorageSync('account_list', res.account_list)
|
|
|
wx.setStorageSync('loginMsg', {
|
|
|
accountno: this.data.accountno,
|
|
|
password: (this.data.memory) ? this.data.password : ''
|
|
|
})
|
|
|
- if (res.account_list.length == 1) {
|
|
|
- wx.setStorageSync('userMsg', res.account_list[0])
|
|
|
- wx.switchTab({
|
|
|
- url: '/pages/tabbar/home/index'
|
|
|
- })
|
|
|
- } else {
|
|
|
- wx.redirectTo({
|
|
|
- url: './selectSite',
|
|
|
- })
|
|
|
- }
|
|
|
+ loginMsg.loginMsg(res);
|
|
|
})
|
|
|
},
|
|
|
/* 改变密码输入框类型 */
|