Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
take_order
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
和慭琛
take_order
Commits
8134a94e
Commit
8134a94e
authored
Dec 30, 2020
by
和慭琛
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
初步添加水印
parent
1c343a45
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
5 deletions
+19
-5
detail.vue
take-order/pages/photo/detail.vue
+6
-1
try.vue
take-order/pages/photo/try.vue
+13
-4
No files found.
take-order/pages/photo/detail.vue
View file @
8134a94e
...
@@ -45,7 +45,12 @@
...
@@ -45,7 +45,12 @@
uni
.
setNavigationBarTitle
({
uni
.
setNavigationBarTitle
({
title
:
'走线照片 ('
+
this
.
current_count
+
'/'
+
this
.
image_count
+
')'
title
:
'走线照片 ('
+
this
.
current_count
+
'/'
+
this
.
image_count
+
')'
});
})
uni
.
setNavigationBarColor
({
frontColor
:
'#FFFFFF'
,
backgroundColor
:
'#333333'
,
})
},
},
//照片预览
//照片预览
...
...
take-order/pages/photo/try.vue
View file @
8134a94e
...
@@ -155,19 +155,21 @@
...
@@ -155,19 +155,21 @@
//加入 水印文字
//加入 水印文字
this
.
canvas
.
setFontSize
(
18
)
this
.
canvas
.
setFontSize
(
18
)
this
.
canvas
.
setFillStyle
(
'#8a2929'
)
this
.
canvas
.
setFillStyle
(
'#8a2929'
)
this
.
canvas
.
rotate
(
30
*
Math
.
PI
/
180
);
//
this.canvas.rotate(30 * Math.PI / 180);
let
textToWidth
=
res
.
width
*
0.5
;
let
textToWidth
=
res
.
width
*
0.5
;
let
textToHeight
=
res
.
height
*
0.3
;
let
textToHeight
=
res
.
height
*
0.3
;
this
.
canvas
.
fillText
(
'我是水印'
,
textToWidth
,
textToHeight
)
this
.
canvas
.
fillText
(
'我是水印'
,
100
,
100
)
//加入 水印图片
//加入 水印图片
this
.
canvas
.
drawImage
(
this
.
markPath
,
50
,
50
,
200
,
40
)
this
.
canvas
.
drawImage
(
this
.
markPath
,
0
,
0
,
res
.
width
/
3
,
res
.
height
/
3
)
this
.
canvas
.
draw
()
uni
.
showLoading
({
uni
.
showLoading
({
title
:
'数据处理中...'
,
title
:
'数据处理中...'
,
icon
:
'loading'
icon
:
'loading'
})
})
//that.canvas.draw()
this
.
exportCanvasTempFilePath
(
res
.
width
,
res
.
height
)
this
.
exportCanvasTempFilePath
(
res
.
width
,
res
.
height
)
...
@@ -203,6 +205,8 @@
...
@@ -203,6 +205,8 @@
});
});
},
1000
);
},
1000
);
//TODO........
//TODO........
...
@@ -235,6 +239,11 @@
...
@@ -235,6 +239,11 @@
})
})
},
},
//第六步 返回上层界面
goBack
:
function
(){
},
//获取当前时间
//获取当前时间
getTime
:
function
(){
getTime
:
function
(){
...
...
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