Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
JSH ERP
Commits
fd9885ec
Commit
fd9885ec
authored
Sep 21, 2022
by
季圣华
Browse files
优化登录的提示信息
parent
bee32534
Changes
1
Hide whitespace changes
Inline
Side-by-side
jshERP-web/src/views/user/Login.vue
View file @
fd9885ec
...
...
@@ -173,10 +173,16 @@
if
(
res
&&
res
.
code
===
200
)
{
let
currentTime
=
new
Date
();
//新建一个日期对象,默认现在的时间
let
expireTime
=
new
Date
(
res
.
data
.
expireTime
);
//设置过去的一个时间点,"yyyy-MM-dd HH:mm:ss"格式化日期
let
type
=
res
.
data
.
type
//租户类型,0免费租户,1付费租户
let
difftime
=
expireTime
-
currentTime
;
//计算时间差
//如果距离到期还剩5天就进行提示续费
if
(
difftime
<
86400000
*
5
)
{
this
.
$message
.
warning
(
'
您好,服务即将到期,请及时续费!
'
,
5
)
let
tipInfo
=
'
您好,服务即将到期,请及时续费!
'
//0免费租户-如果距离到期还剩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
)
}
}
})
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment