【开发】企业管理员登录
This commit is contained in:
@@ -220,7 +220,7 @@ export default {
|
||||
this.handleChangeCheckCode()
|
||||
},
|
||||
methods: {
|
||||
...mapActions(['Login', 'Logout', 'PhoneLogin']),
|
||||
...mapActions(['Login', 'Logout', 'PhoneLogin','CompanyAdminLogin','CompanyAdminPhoneLogin']),
|
||||
/**
|
||||
* 切换登录方式
|
||||
* */
|
||||
@@ -276,11 +276,18 @@ export default {
|
||||
//登录
|
||||
console.log(this.isVerificationCodeLogin)
|
||||
let httpFunction = null
|
||||
if (this.isVerificationCodeLogin) {
|
||||
httpFunction = that.PhoneLogin
|
||||
} else {
|
||||
httpFunction = that.Login
|
||||
|
||||
const actionCollect = {
|
||||
commonLogin: [that.Login,that.CompanyAdminLogin],
|
||||
phoneLogin:[that.PhoneLogin,that.CompanyAdminPhoneLogin]
|
||||
}
|
||||
// userType 用户类型 0 是普通用户 1是企业管理员 loginType true 是短信登录 false 是账号登录
|
||||
let actionFunc = function (userType,loginType){
|
||||
return loginType ? actionCollect.phoneLogin[userType] : actionCollect.commonLogin[userType]
|
||||
}
|
||||
|
||||
httpFunction = actionFunc(this.loginType,this.isVerificationCodeLogin)
|
||||
|
||||
httpFunction(loginParams).then((response) => {
|
||||
if (response.message === 'updatePassword') {
|
||||
this.$notification['error']({
|
||||
@@ -323,7 +330,11 @@ export default {
|
||||
// 登录--1
|
||||
smsParams.codeType = 1
|
||||
let interval
|
||||
getAction('/company/sendVerificationCode', smsParams)
|
||||
let sendCodeUrl = {
|
||||
0:'/company/sendVerificationCode',
|
||||
1:'/companyManager/sendVerificationCode'
|
||||
}
|
||||
getAction(sendCodeUrl[this.loginType], smsParams)
|
||||
.then(res => {
|
||||
// 验证码获取不成功就不倒计时
|
||||
if (!res.success) {
|
||||
|
||||
Reference in New Issue
Block a user