fix
This commit is contained in:
@@ -84,7 +84,7 @@
|
||||
</header>
|
||||
|
||||
<div class="homeMain_content_body">
|
||||
<router-view/>
|
||||
<router-view @setTask = "setTask"/>
|
||||
</div>
|
||||
<RobotAssist></RobotAssist>
|
||||
</div>
|
||||
@@ -190,6 +190,9 @@ export default defineComponent({
|
||||
this.getLang('')
|
||||
},
|
||||
methods: {
|
||||
setTask(){
|
||||
this.openTask()
|
||||
},
|
||||
turnToNewPage(url) {
|
||||
window.open(url);
|
||||
},
|
||||
@@ -245,60 +248,9 @@ export default defineComponent({
|
||||
document.removeEventListener("click", this.closeShowOperateContent);
|
||||
},
|
||||
|
||||
//打开绑定邮箱弹窗
|
||||
showBindEmailModal() {
|
||||
this.bindEmailVisible = true;
|
||||
},
|
||||
|
||||
emailNextStepFun() {
|
||||
if (!isEmail(this.email)) {
|
||||
message.info(this.t('Header.jsContent1'));
|
||||
return;
|
||||
}
|
||||
let data = {
|
||||
email: this.email,
|
||||
operationType: "BIND_MAILBOX",
|
||||
};
|
||||
const hide = message.loading("loading", 0);
|
||||
Https.axiosPost(Https.httpUrls.accountSendEmail, data)
|
||||
.then((rv) => {
|
||||
if (rv) {
|
||||
this.bindEmailStep = 2;
|
||||
(this.emailCode = ["", "", "", "", "", ""]),
|
||||
this.createTimer();
|
||||
hide();
|
||||
message.success(this.t('Header.jsContent2'));
|
||||
}
|
||||
})
|
||||
.catch((res) => {
|
||||
hide();
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
//绑定邮箱的上一步
|
||||
emailLastStepFun() {
|
||||
this.bindEmailStep = 1;
|
||||
this.email = "";
|
||||
(this.emailCode = ["", "", "", "", "", ""]), this.clearTimer();
|
||||
},
|
||||
|
||||
//创建定时器
|
||||
createTimer() {
|
||||
this.timer = setInterval(() => {
|
||||
this.time--;
|
||||
if (!this.time) {
|
||||
clearInterval(this.timer);
|
||||
}
|
||||
}, 1000);
|
||||
},
|
||||
|
||||
//清除定时器
|
||||
clearTimer() {
|
||||
this.time = 60;
|
||||
if (this.timer) {
|
||||
clearInterval(this.timer);
|
||||
}
|
||||
},
|
||||
//查看订单
|
||||
orderForm(){
|
||||
let payOrder = this.$refs.payOrder
|
||||
@@ -315,40 +267,19 @@ export default defineComponent({
|
||||
await Https.axiosGet(Https.httpUrls.trialUserLogout,).then((rv) => {
|
||||
Https.axiosPost(Https.httpUrls.accountLogout, data).then((rv) => {
|
||||
this.$router.replace("/login");
|
||||
WriteCookie("token");
|
||||
// WriteCookie("token");
|
||||
});
|
||||
})
|
||||
}else{
|
||||
await Https.axiosPost(Https.httpUrls.accountLogout, data).then((rv) => {
|
||||
WriteCookie("token");
|
||||
// WriteCookie("token");
|
||||
});
|
||||
this.$router.replace("/login");
|
||||
}
|
||||
WriteCookie("token");
|
||||
// window.location.reload()
|
||||
|
||||
},
|
||||
|
||||
//绑定邮箱
|
||||
submitBindEmail(emailVerifyCode) {
|
||||
let data = {
|
||||
userEmail: this.email,
|
||||
userId: this.userInfo.userId,
|
||||
emailVerifyCode: emailVerifyCode,
|
||||
};
|
||||
Https.axiosPost(Https.httpUrls.accountBindEmail, data).then(
|
||||
(rv) => {
|
||||
if (rv) {
|
||||
this.userInfo.email = this.email;
|
||||
setCookie("userInfo", JSON.stringify(this.userInfo));
|
||||
(this.bindEmailVisible = false),
|
||||
(this.bindEmailStep = 1);
|
||||
this.clearTimer();
|
||||
this.emailCode = ["", "", "", "", "", ""];
|
||||
}
|
||||
}
|
||||
);
|
||||
},
|
||||
|
||||
//判断是否登录
|
||||
accountIsLogin(userInfo) {
|
||||
let data = {
|
||||
|
||||
Reference in New Issue
Block a user