登录的验证

This commit is contained in:
asd 2020-10-27 09:06:54 +08:00
parent a647c70b28
commit 380601ea9c
3 changed files with 37 additions and 4 deletions

View File

@ -184,6 +184,8 @@ export async function videoadd( form: any,data: any) {
desc: "",
video: [""],
}
}else{
message.error(res.msg)
}
}

View File

@ -1,7 +1,7 @@
<template>
<div class="logintab">
<div :class="selected==1?'tab tab1':'tab'" @click="tabchange(1)">手机号登录</div>
<div :class="selected==2?'tab tab1':'tab'" @click="tabchange(2)">账号密码登录</div>
<div :class="selected==1?'tab tab1':'tab'" @mouseover="tabchange(1)">手机号登录</div>
<div :class="selected==2?'tab tab1':'tab'" @mouseover="tabchange(2)">账号密码登录</div>
</div>
</template>

View File

@ -210,15 +210,35 @@ export default defineComponent({
}
function login(): void {
console.log(userinfo.phone,userinfo.password)
if(userinfo.phone==''){
message.error("帐号不能为空")
} else if(userinfo.password==""){
message.error("密码不能为空")
}else{
loginpass(userinfo.phone,userinfo.password)
}
}
function sublogin(){
console.log(11)
//
if(phone.value==''){
message.error("手机号不能为空")
return
}else if(!(/^1[3-9]\d{9}$/.test(phone.value))){
message.error("手机号码有误,请重填");
return
} else if(code.value==""){
// console.log(phone.value)
console.log((/^1[3-9]\d{9}$/.test(phone.value)))
message.error("验证码不能为空")
return
}else{
loginpass(phone.value,'',1,code.value)
}
// checksmscode(myquhao.value+phone.value,code.value)
loginpass(phone.value,'',1,code.value)
}
function tovideoxq(e?: number){
@ -347,6 +367,9 @@ export default defineComponent({
margin-top: 45px;
margin-bottom: 178px;
}
.submit:hover{
background: #06C7AE;
}
.forget {
color: #08ae98;
font-size: 12px;
@ -406,6 +429,11 @@ export default defineComponent({
}
}
}
.lessonitem:hover{
.lessonname{
color: #06C7AE;
}
}
}
.icons {
margin-right: 41px;
@ -459,6 +487,9 @@ export default defineComponent({
line-height: 29px;
border-radius: 15px;
}
.more:hover{
background: #ccc;
}
.icon{
width: 9px;
height: 12px;