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
a564e11c
Commit
a564e11c
authored
Dec 29, 2020
by
李俊赕
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
img
parent
6c8aa5b9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
9 deletions
+7
-9
try.vue
take-order/pages/photo/try.vue
+7
-9
No files found.
take-order/pages/photo/try.vue
View file @
a564e11c
...
...
@@ -14,7 +14,7 @@
<cover-view
class=
"locationText u-m-l-20 u-m-t-10"
>
{{
date
}}
</cover-view>
</cover-view>
<cover-image
class=
"liveWatermarkNormal"
mode=
"aspectFit"
src=
"@/static/live_mark.png
"
></cover-image>
<cover-image
class=
"liveWatermarkNormal"
mode=
"aspectFit"
:src=
"liveWaterMarkImage
"
></cover-image>
</camera>
<cover-view
class=
"bottomView"
>
<cover-image
class=
'switchIcon'
:src=
'icon_switch_white'
@
click=
"switchClick()"
>
</cover-image>
...
...
@@ -47,7 +47,7 @@
icon_take
:
'https://qn-static.banshouhui.com/take.png'
,
icon_switch_white
:
'https://qn-static.banshouhui.com/switch_white.png'
,
icon_light_on_white
:
'https://qn-static.banshouhui.com/light_on_white.png'
,
liveWaterMarkImage
:
require
(
'@/static/live_mark.png'
)
}
},
onLoad
(
e
)
{
...
...
@@ -89,9 +89,6 @@
}
});
},
//照片处理
imageChange
(
options
)
{
var
that
=
this
...
...
@@ -129,16 +126,17 @@
// //将图片src放到cancas内,宽高为图片大小
// ctx.drawImage(res.tempFilePaths[0], 0, 0, ress.width / 3, ress.height / 3)
that
.
canvas
.
setFontSize
(
18
)
that
.
canvas
.
setFillStyle
(
'#8a2929'
)
that
.
canvas
.
rotate
(
-
Math
.
PI
/
2
);
//
that.canvas.setFillStyle('#8a2929')
//
that.canvas.rotate(-Math.PI / 2);
let
textToWidth
=
res
.
width
/
3
*
0.5
;
let
textToHeight
=
res
.
height
/
3
*
0.3
;
that
.
canvas
.
fillText
(
'我是水印'
,
10
,
90
)
/** 除了上面的文字水印,这里也可以加入图片水印 */
//ctx.drawImage('/static/watermark.png', 0, 0, ress.width / 3, ress.height / 3)
// ctx.drawImage('/static/watermark.png', 0, 0, res.width / 3, ress.height / 3)
ctx
.
drawImage
(
this
.
liveWaterMarkImage
,
0
,
0
,
200
,
200
)
//-----------------------------
that
.
canvas
.
draw
()
uni
.
showLoading
({
title
:
'数据处理中...'
,
icon
:
'loading'
,
...
...
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