增加店铺账号到期提醒

This commit is contained in:
魏啾 2024-12-10 17:27:53 +08:00
parent 1bd0b0daa9
commit 8b78d1c7ee
2 changed files with 6 additions and 0 deletions

View File

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

View File

@ -314,6 +314,11 @@ export default {
};
},
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.dateAmount();
this.dateProduct();