update
This commit is contained in:
@@ -3,6 +3,7 @@ import {reactive, ref} from 'vue';
|
||||
import {toPath} from "../../utils/index.js";
|
||||
import VerificationCode from '../../components/VerificationCode/index.vue';
|
||||
import {useUserStore} from "../../pinia/UserStore/index.js";
|
||||
import {Message} from "@arco-design/web-vue";
|
||||
|
||||
const {login} = useUserStore();
|
||||
|
||||
@@ -18,6 +19,25 @@ const from = reactive({
|
||||
});
|
||||
|
||||
const mode = ref(MODE.PHONE);
|
||||
|
||||
const loginSYS = (isRoot, form) => {
|
||||
if (!from.mobile || from.mobile === '') {
|
||||
Message.warning('手机号不能为空');
|
||||
return;
|
||||
}
|
||||
if (mode.value === MODE.PHONE) {
|
||||
if (!from.code || from.code === '') {
|
||||
Message.warning('验证码不能为空');
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
if (!from.password || from.password === '') {
|
||||
Message.warning('密码不能为空');
|
||||
return;
|
||||
}
|
||||
}
|
||||
login(isRoot, form);
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -43,8 +63,8 @@ const mode = ref(MODE.PHONE);
|
||||
</a-input>
|
||||
</div>
|
||||
<div class="flex flex-col mt-[50px] gap-[32px]">
|
||||
<a-button @click="login(false, from)" type="primary">登陆商户端</a-button>
|
||||
<a-button @click="login(true, from)" type="primary">登陆管理端</a-button>
|
||||
<a-button @click="loginSYS(false, from)" type="primary">登陆商户端</a-button>
|
||||
<a-button @click="loginSYS(true, from)" type="primary">登陆管理端</a-button>
|
||||
<a-button
|
||||
@click="toPath('/loginSYS/register')"
|
||||
type="text">
|
||||
|
||||
Reference in New Issue
Block a user