This commit is contained in:
魏啾
2024-12-11 17:31:16 +08:00
3 changed files with 20 additions and 4 deletions

View File

@@ -44,6 +44,7 @@ const user = {
localStorage.setItem("loginType", res.loginType); localStorage.setItem("loginType", res.loginType);
localStorage.setItem("userInfo", JSON.stringify(res.user.user)); localStorage.setItem("userInfo", JSON.stringify(res.user.user));
localStorage.setItem("mainId", res.mainId); localStorage.setItem("mainId", res.mainId);
localStorage.setItem("expireDate", res.expireDate);
setToken(res.token, rememberMe); setToken(res.token, rememberMe);
commit("SET_TOKEN", res.token); commit("SET_TOKEN", res.token);
setUserInfo(res.user, commit); setUserInfo(res.user, commit);

View File

@@ -314,6 +314,11 @@ export default {
}; };
}, },
mounted() { mounted() {
// 增加首页提示是否账号30天过期
let date = dayjs(localStorage.getItem("expireDate")).diff(dayjs().format('YYYY-MM-DD'), 'day')
if (date <= 30 && date >= 0) {
this.$alert(`店铺账号有限期至${localStorage.getItem("expireDate")},店铺账号到期剩余${date}天!`, '提示');
}
// this.summaryGet(); // this.summaryGet();
this.dateAmount(); this.dateAmount();
this.dateProduct(); this.dateProduct();

View File

@@ -45,9 +45,14 @@ export default {
}, },
methods: { methods: {
toggleSelection() { toggleSelection() {
this.$refs.refdialogpackagetable.forEach((a) => { try {
a.clearSelection(); this.$refs.refdialogpackagetable.forEach((a) => {
}) a.clearSelection();
})
this.show = false
} catch (error) {
}
}, },
handleSelectionChange(val, index) { handleSelectionChange(val, index) {
try { try {
@@ -56,7 +61,7 @@ export default {
}) })
this.disabledshow = !this.listdata.proGroupVo.every((element, num) => element.number == this.multipleSelection[num].length); this.disabledshow = !this.listdata.proGroupVo.every((element, num) => element.number == this.multipleSelection[num].length);
} catch (error) { } } catch (error) { }
this.$set(this.listdata.proGroupVo, index, { ...this.listdata.proGroupVo[index], alertshow: this.listdata.proGroupVo[index].number != this.multipleSelection[index].length ? true : false }); this.$set(this.listdata.proGroupVo, index, { ...this.listdata.proGroupVo[index], alertshow: this.listdata.proGroupVo[index].number != this.multipleSelection[index].length ? true : false });
}, },
confirm() { confirm() {
@@ -73,6 +78,11 @@ export default {
}) })
} catch (error) { } } catch (error) { }
this.multipleSelection = [] this.multipleSelection = []
// 不用选套餐
if (item.groupType == 0) {
this.$emit("dialogpackageconfirm", this.listdata, [item.proGroupVo[0].goods]);
return false;
}
this.disabledshow = true this.disabledshow = true
console.log(this.listdata, this.multipleSelection); console.log(this.listdata, this.multipleSelection);
this.show = true; this.show = true;