"...src/main/git@ustchcs.com:gujinli1118/eladmin.git" did not exist on "76b600eeccc40a561d1a9278134ab9a806f2f9e3"
Commit fd9885ec authored by 季圣华's avatar 季圣华
Browse files

优化登录的提示信息

parent bee32534
...@@ -173,10 +173,16 @@ ...@@ -173,10 +173,16 @@
if(res && res.code === 200) { if(res && res.code === 200) {
let currentTime = new Date(); //新建一个日期对象,默认现在的时间 let currentTime = new Date(); //新建一个日期对象,默认现在的时间
let expireTime = new Date(res.data.expireTime); //设置过去的一个时间点,"yyyy-MM-dd HH:mm:ss"格式化日期 let expireTime = new Date(res.data.expireTime); //设置过去的一个时间点,"yyyy-MM-dd HH:mm:ss"格式化日期
let type = res.data.type //租户类型,0免费租户,1付费租户
let difftime = expireTime - currentTime; //计算时间差 let difftime = expireTime - currentTime; //计算时间差
//如果距离到期还剩5天就进行提示续费 let tipInfo = '您好,服务即将到期,请及时续费!'
if(difftime<86400000*5) { //0免费租户-如果距离到期还剩5天就进行提示续费
this.$message.warning('您好,服务即将到期,请及时续费!',5) if(type === '0' && difftime<86400000*5) {
this.$message.warning(tipInfo,8)
}
//1付费租户-如果距离到期还剩15天就进行提示续费
if(type === '1' && difftime<86400000*15) {
this.$message.warning(tipInfo,8)
} }
} }
}) })
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment