|
|
@ -65,8 +65,8 @@ export default { |
|
|
data() { |
|
|
data() { |
|
|
return { |
|
|
return { |
|
|
password: true, |
|
|
password: true, |
|
|
user: '15374889135', //账户 |
|
|
user: '', //账户 |
|
|
password1: '15374889135', //密码 |
|
|
password1: '', //密码 |
|
|
|
|
|
|
|
|
loginType:'',//登陆类型|1=教练,2=销售,3=学员 |
|
|
loginType:'',//登陆类型|1=教练,2=销售,3=学员 |
|
|
loginType_str:'',//登陆类型中文名字 |
|
|
loginType_str:'',//登陆类型中文名字 |
|
|
@ -108,6 +108,30 @@ export default { |
|
|
}, |
|
|
}, |
|
|
//登陆 |
|
|
//登陆 |
|
|
async login() { |
|
|
async login() { |
|
|
|
|
|
|
|
|
|
|
|
if (!this.user) { |
|
|
|
|
|
uni.showToast({ |
|
|
|
|
|
title: '请输入用户名', |
|
|
|
|
|
icon: 'none' |
|
|
|
|
|
}) |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
if (!this.password1) { |
|
|
|
|
|
uni.showToast({ |
|
|
|
|
|
title: '请输入密码', |
|
|
|
|
|
icon: 'none' |
|
|
|
|
|
}) |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (!this.loginType) { |
|
|
|
|
|
uni.showToast({ |
|
|
|
|
|
title: '请选择登陆类型', |
|
|
|
|
|
icon: 'none' |
|
|
|
|
|
}) |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
let item = {}; |
|
|
let item = {}; |
|
|
item['username'] = this.user |
|
|
item['username'] = this.user |
|
|
item['password'] = this.password1 |
|
|
item['password'] = this.password1 |
|
|
@ -203,6 +227,22 @@ export default { |
|
|
this.loginType = e.value |
|
|
this.loginType = e.value |
|
|
this.loginType_str = e.text |
|
|
this.loginType_str = e.text |
|
|
this.picker_show_loginType = false |
|
|
this.picker_show_loginType = false |
|
|
|
|
|
|
|
|
|
|
|
//@todo 上线时请删除这个判断 |
|
|
|
|
|
if(this.loginType == 1){ |
|
|
|
|
|
//教师端 |
|
|
|
|
|
this.user= '15374889135' //账户 |
|
|
|
|
|
this.password1= '15374889135' //密码 |
|
|
|
|
|
}else if(this.loginType == 2){ |
|
|
|
|
|
//销售端 |
|
|
|
|
|
this.user= '15148228108' //账户 |
|
|
|
|
|
this.password1= '123123' //密码 |
|
|
|
|
|
}else{ |
|
|
|
|
|
//学生端 |
|
|
|
|
|
this.user= '' //账户 |
|
|
|
|
|
this.password1= '' //密码 |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|