From 8bf516335d65d67c191c5884295fe5bdccc28be1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=A3=E5=9C=A3=E5=8D=8E?= <752718920@qq.com> Date: Thu, 30 Sep 2021 23:11:35 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E9=A6=96=E9=A1=B5=E6=8F=90?= =?UTF-8?q?=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jshERP-web/src/views/dashboard/IndexChart.vue | 1 - jshERP-web/src/views/user/Login.vue | 12 ++++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/jshERP-web/src/views/dashboard/IndexChart.vue b/jshERP-web/src/views/dashboard/IndexChart.vue index a948a4b7..9ae686f0 100644 --- a/jshERP-web/src/views/dashboard/IndexChart.vue +++ b/jshERP-web/src/views/dashboard/IndexChart.vue @@ -146,7 +146,6 @@ //如果距离到期还剩5天就进行提示续费 if(difftime<86400000*5) { this.hasExpire = true - this.$message.warning('您好,服务即将到期,请及时续费!',5) } } }) diff --git a/jshERP-web/src/views/user/Login.vue b/jshERP-web/src/views/user/Login.vue index 87c90970..5c9ef028 100644 --- a/jshERP-web/src/views/user/Login.vue +++ b/jshERP-web/src/views/user/Login.vue @@ -157,6 +157,18 @@ if(res.data.user.loginName === 'admin'){ let desc = 'admin只是平台运维用户,真正的管理员是租户(测试账号为jsh),admin不能编辑任何业务数据,只能配置平台菜单和创建租户' this.$message.info(desc,30) + } else { + getAction("/user/infoWithTenant",{}).then(res=>{ + if(res && res.code === 200) { + let currentTime = new Date(); //新建一个日期对象,默认现在的时间 + let expireTime = new Date(res.data.expireTime); //设置过去的一个时间点,"yyyy-MM-dd HH:mm:ss"格式化日期 + let difftime = expireTime - currentTime; //计算时间差 + //如果距离到期还剩5天就进行提示续费 + if(difftime<86400000*5) { + this.$message.warning('您好,服务即将到期,请及时续费!',5) + } + } + }) } } this.initMPropertyShort();