This commit is contained in:
X1627315083
2024-03-22 12:01:11 +08:00
parent c8f6884e7d
commit 84674c63fd
14 changed files with 475 additions and 623 deletions

View File

@@ -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 = {

View File

@@ -191,7 +191,7 @@
<CollectionModal ref="collectionModal" @finishCollection="finishCollection()"></CollectionModal>
<DesignDetail ref="designDetail" @finishRedesign="finishRedesign"></DesignDetail>
<ExportNewCoolection id="exportNewCoolection"></ExportNewCoolection>
<ExportModel ref="ExportModel"></ExportModel>
<ExportModel ref="ExportModel" @setTask="setTask"></ExportModel>
<!-- 导出缩略图的蒙层 start-->
<div class="mark_loading" v-show="isShowMark">
<a-spin size="large" />
@@ -252,7 +252,7 @@ export default defineComponent({
// RobotAssist,
draggable
},
setup() {
setup(props,{emit}) {
const store = useStore();
let likeDesignCollectionList: any = computed(() => {
return store.state.HomeStoreModule.likeDesignCollectionList;
@@ -408,7 +408,7 @@ export default defineComponent({
if(days < 30){
setTimeout(() => {
let text = {
str:`${this.t('HomeView.jsContent4',{days:1,hours:2})}<a href="https://code-create.com.hk/aida" target="_blank">${this.t('HomeView.jsContent8')}</a>`,
str:`${this.t('HomeView.jsContent4',{days:days,hours:hours})}<a href="https://code-create.com.hk/aida" target="_blank">${this.t('HomeView.jsContent8')}</a>`,
title:`${this.t('HomeView.jsContent7')}`,
}
this.affiche(text)
@@ -1009,7 +1009,6 @@ export default defineComponent({
exportModel(){
let exportModel:any = this.$refs.ExportModel
exportModel.init()
},
//打开图片详情
@@ -1047,6 +1046,10 @@ export default defineComponent({
});
}
},
setTask(){
this.$emit('setTask')
// this.exportModel()
},
},
});
</script>