Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
loan-manager-customer
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhanhai
loan-manager-customer
Commits
6bde4791
Commit
6bde4791
authored
Nov 07, 2022
by
刘雅文
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
水印新增日期
parent
f3bb62fe
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
9 deletions
+30
-9
App.vue
src/App.vue
+11
-3
Login.vue
src/components/login/Login.vue
+19
-6
No files found.
src/App.vue
View file @
6bde4791
...
@@ -10,17 +10,25 @@ import vueCanvasNest from "vue-canvas-nest";
...
@@ -10,17 +10,25 @@ import vueCanvasNest from "vue-canvas-nest";
//引入水印插件
//引入水印插件
// import watermark from "watermark-dom";
// import watermark from "watermark-dom";
import
watermark
from
'./utils/watermark'
import
watermark
from
"./utils/watermark"
;
export
default
{
export
default
{
name
:
"app"
,
name
:
"app"
,
components
:
{
vueCanvasNest
},
components
:
{
vueCanvasNest
},
created
()
{
created
()
{
const
loginName
=
localStorage
.
getItem
(
"loginName"
);
const
loginName
=
localStorage
.
getItem
(
"loginName"
);
const
userCell
=
localStorage
.
getItem
(
"userCellFour"
);
const
userCell
=
localStorage
.
getItem
(
"userCellFour"
);
// const userCells = userCell.substr(-4);
const
nowDate
=
new
Date
();
const
nowMonth
=
nowDate
.
getMonth
()
+
1
;
const
nowDay
=
nowDate
.
getDate
()
>
10
?
nowDate
.
getDate
():
'0'
+
nowDate
.
getDate
();
// console.log(nowTime,'当前时间');
setTimeout
(()
=>
{
setTimeout
(()
=>
{
if
(
loginName
)
{
if
(
loginName
)
{
watermark
.
load
({
watermark_txt
:
loginName
+
userCell
,
watermark_color
:
'#aaa'
,
watermark_angle
:
30
,
watermark_width
:
200
,});
watermark
.
load
({
watermark_txt
:
loginName
+
userCell
+
nowMonth
+
nowDay
,
watermark_color
:
"#aaa"
,
watermark_angle
:
30
,
watermark_width
:
400
,
});
}
}
},
100
);
},
100
);
},
},
...
...
src/components/login/Login.vue
View file @
6bde4791
...
@@ -67,7 +67,7 @@
...
@@ -67,7 +67,7 @@
<
script
type=
"text/ecmascript-6"
>
<
script
type=
"text/ecmascript-6"
>
// import watermark from "watermark-dom";
// import watermark from "watermark-dom";
import
watermark
from
'../../utils/watermark'
import
watermark
from
"../../utils/watermark"
;
export
default
{
export
default
{
name
:
"SisLogin"
,
name
:
"SisLogin"
,
...
@@ -125,7 +125,6 @@ export default {
...
@@ -125,7 +125,6 @@ export default {
this
.
$cacheUtils
.
cleanCache
();
this
.
$cacheUtils
.
cleanCache
();
this
.
$$post
(
"/login"
,
this
.
user
).
then
((
res
)
=>
{
this
.
$$post
(
"/login"
,
this
.
user
).
then
((
res
)
=>
{
if
(
res
.
data
.
code
===
"200"
)
{
if
(
res
.
data
.
code
===
"200"
)
{
// console.log(res.data.result,'登录成功返回的结果');
// console.log(res.data.result,'登录成功返回的结果');
localStorage
.
setItem
(
"userName"
,
res
.
data
.
result
.
userName
);
localStorage
.
setItem
(
"userName"
,
res
.
data
.
result
.
userName
);
localStorage
.
setItem
(
"agentNo"
,
res
.
data
.
result
.
extensionNumber
);
localStorage
.
setItem
(
"agentNo"
,
res
.
data
.
result
.
extensionNumber
);
...
@@ -145,7 +144,7 @@ export default {
...
@@ -145,7 +144,7 @@ export default {
localStorage
.
setItem
(
"btnPermission"
,
btnPermission
);
localStorage
.
setItem
(
"btnPermission"
,
btnPermission
);
if
(
res
.
data
.
result
.
buttonList
!=
[])
{
if
(
res
.
data
.
result
.
buttonList
!=
[])
{
localStorage
.
setItem
(
"btnUrl"
,
res
.
data
.
result
.
buttonList
);
localStorage
.
setItem
(
"btnUrl"
,
res
.
data
.
result
.
buttonList
);
}
else
{
}
else
{
localStorage
.
setItem
(
"btnUrl"
,
null
);
localStorage
.
setItem
(
"btnUrl"
,
null
);
}
}
localStorage
.
setItem
(
localStorage
.
setItem
(
...
@@ -168,9 +167,23 @@ export default {
...
@@ -168,9 +167,23 @@ export default {
localStorage
.
setItem
(
"bg"
,
context
.
canvas
.
toDataURL
());
localStorage
.
setItem
(
"bg"
,
context
.
canvas
.
toDataURL
());
this
.
$router
.
push
(
"/index"
);
this
.
$router
.
push
(
"/index"
);
setTimeout
(()
=>
{
const
nowDate
=
new
Date
();
watermark
.
load
({
watermark_txt
:
res
.
data
.
result
.
loginName
+
res
.
data
.
result
.
userCellFour
,
watermark_color
:
'#aaa'
,
watermark_angle
:
30
,
watermark_width
:
300
,});
const
nowMonth
=
nowDate
.
getMonth
()
+
1
;
},
100
)
const
nowDay
=
nowDate
.
getDate
()
>
10
?
nowDate
.
getDate
()
:
"0"
+
nowDate
.
getDate
();
setTimeout
(()
=>
{
watermark
.
load
({
watermark_txt
:
res
.
data
.
result
.
loginName
+
res
.
data
.
result
.
userCellFour
+
nowMonth
+
nowDay
,
watermark_color
:
"#aaa"
,
watermark_angle
:
30
,
watermark_width
:
400
,
});
},
100
);
}
else
{
}
else
{
this
.
ui
.
loginLoading
=
false
;
this
.
ui
.
loginLoading
=
false
;
this
.
$message
({
this
.
$message
({
...
...
Write
Preview
Markdown
is supported
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