mirror of
https://gitee.com/xiongmao1988/rax-medical.git
synced 2025-08-23 20:44:58 +08:00
fix: 手机号登录
This commit is contained in:
parent
5983e407d1
commit
49359fc86e
|
@ -157,8 +157,9 @@ const phoneAreas: any = getPhoneAreasData()
|
|||
//定义变量控制按钮加载效果
|
||||
let loading = ref(false);
|
||||
//自定义校验规则函数
|
||||
const validatorPhone = (value: any, callback: any) => {
|
||||
if (value.indexOf('****') >= 0) {
|
||||
const validatorPhone = (rule:any,value: any, callback: any) => {
|
||||
console.log('value >>>>>',value);
|
||||
if (value&&value?.indexOf('****') >= 0) {
|
||||
return callback().trim();
|
||||
}
|
||||
if (!new RegExp(REGEXP.MOBILE).test(value)) {
|
||||
|
@ -413,7 +414,9 @@ function sliderClose() {
|
|||
loading.value = false
|
||||
}
|
||||
|
||||
const loginPost = (data: any) => {
|
||||
const loginPost = (res: any) => {
|
||||
const {data}=res
|
||||
console.log('data >>>>>',data);
|
||||
Session.set('token', data.access_token);
|
||||
Session.set('refresh_token', data.refresh_token);
|
||||
useUserStore().setlogin('account', data.username)
|
||||
|
|
Loading…
Reference in New Issue
Block a user