优化代码

master
Lee-1203 2022-03-09 16:38:28 +08:00
parent 84880525fe
commit 760eaf080d
3 changed files with 15 additions and 8 deletions

View File

@ -160,12 +160,7 @@
phone: this.phoneNumber
})
.then(function(res) {
if(res.data.data.registered == 0){
this.phoneLogin();
}else if(res.data.data.registered == 1){
that.openPhoneTips = true;
that.tipsMsg = '账号已存在,是否继续登录';
}
that.phoneLogin();
})
.catch(function(error) {
console.log(error);

View File

@ -30,6 +30,11 @@
<div v-show="show" @click="getCode()" class="getCode"></div>
</div>
</div>
<!-- 提示框 -->
<div class="addr-select-bg" v-show="isToast"></div>
<div class="toast" v-show="isToast">
<p>{{toastText}}</p>
</div>
</div>
</template>
@ -56,6 +61,8 @@
count: "", //
timer: null,
userType: 0,
isToast:false,
toastText:''
};
},
beforeCreate() {},
@ -111,7 +118,12 @@
that.$router.push('/index');
}
} else {
window.alert(res.msg);
that.toastText = '验证码错误!';
that.sms_code = '';
that.isToast = true;
setTimeout(()=> {
that.isToast = false
}, 1000)
}
})
.catch(function(error) {

View File

@ -132,7 +132,7 @@
this.axios.post(this.HOME + "/api/evaluation/evaluation-list", {
page: "1",
size: "100",
status: ""
status: "done"
}).then(function(res) {
that.reportData = res.data.data.list;
console.log(that.reportData,555)