Commit 6d142550 authored by chenqikuai's avatar chenqikuai

fix

parent 83e412cb
......@@ -224,8 +224,9 @@ export default Vue.extend({
return isValid;
},
async loginByCodeFunc(phone: string, code: string) {
const isAdminAccount = this.$route.name === 'adminLogin';
const ret = await UserService.getInstance().login({
is_admin: false,
is_admin: isAdminAccount,
use_pwd: false,
verify_code: code,
phone,
......@@ -249,7 +250,7 @@ export default Vue.extend({
}
},
async loginByPwdFunc(name: string, pwd: string) {
const isAdminAccount = !!name.match(/admin/);
const isAdminAccount = this.$route.name === 'adminLogin';
const ret = await UserService.getInstance().login({
is_admin: isAdminAccount,
use_pwd: true,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment