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
f25f861e
Commit
f25f861e
authored
Mar 31, 2021
by
李俊赕
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
图片绘制微调
parent
38e01ac7
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
8 deletions
+7
-8
take.vue
take-order/pages/photo/take.vue
+7
-8
No files found.
take-order/pages/photo/take.vue
View file @
f25f861e
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
src=
"/static/photo/icon-setting.png"
></cover-image>
src=
"/static/photo/icon-setting.png"
></cover-image>
</cover-view>
</cover-view>
</cover-view>
</cover-view>
<camera
class=
"camera-box"
v-if=
"cameraChange
&&
!standardShow"
:device-position=
"cameraInfo.devicePosition"
<camera
class=
"camera-box"
v-if=
"cameraChange
"
v-show=
"
!standardShow"
:device-position=
"cameraInfo.devicePosition"
:flash=
"cameraInfo.flash"
:style=
"
{'height':cameraHeight + 'rpx'}" @error="cameraError">
:flash=
"cameraInfo.flash"
:style=
"
{'height':cameraHeight + 'rpx'}" @error="cameraError">
<cover-view
class=
"mark-box"
>
<cover-view
class=
"mark-box"
>
<cover-view
class=
"txt big"
>
{{
titleTxt
}}
</cover-view>
<cover-view
class=
"txt big"
>
{{
titleTxt
}}
</cover-view>
...
@@ -28,7 +28,7 @@
...
@@ -28,7 +28,7 @@
</cover-view>
</cover-view>
<canvas
canvas-id=
"canvas"
id=
"photoCanvas"
class=
"canvas"
<canvas
canvas-id=
"canvas"
id=
"photoCanvas"
class=
"canvas"
:style=
"
{'width':750 + 'rpx','height': cameraHeight + 'rpx'}">
</canvas>
:style=
"
{'width':750 + 'rpx','height': cameraHeight + 'rpx'}">
</canvas>
<view
v-
if
=
"standardShow"
class=
"page-mask"
:z-index=
"10000"
>
<view
v-
show
=
"standardShow"
class=
"page-mask"
:z-index=
"10000"
>
<photo-standard
:currentItem=
"currentItem"
/>
<photo-standard
:currentItem=
"currentItem"
/>
<view
class=
"btn-close"
@
click=
"closeShadow"
>
<view
class=
"btn-close"
@
click=
"closeShadow"
>
<image
class=
"icon icon-close"
mode=
"aspectFit"
src=
"/static/photo/icon-close.png"
>
<image
class=
"icon icon-close"
mode=
"aspectFit"
src=
"/static/photo/icon-close.png"
>
...
@@ -362,8 +362,8 @@
...
@@ -362,8 +362,8 @@
//加入 水印文字
//加入 水印文字
for
(
let
i
=
settingTxtArr
.
length
-
1
;
i
>=
0
;
i
--
)
{
for
(
let
i
=
settingTxtArr
.
length
-
1
;
i
>=
0
;
i
--
)
{
txtHeight
=
18
txtHeight
=
20
canvas
.
setFontSize
(
1
4
)
canvas
.
setFontSize
(
1
6
)
canvas
.
setFillStyle
(
'#f2f2f2'
)
canvas
.
setFillStyle
(
'#f2f2f2'
)
let
txt
=
settingTxtArr
[
i
]
let
txt
=
settingTxtArr
[
i
]
// if(txt.length>14){
// if(txt.length>14){
...
@@ -386,9 +386,9 @@
...
@@ -386,9 +386,9 @@
canvas
.
setFillStyle
(
'#f2f2f2'
)
canvas
.
setFillStyle
(
'#f2f2f2'
)
// canvas.setTextAlign('center')
// canvas.setTextAlign('center')
if
(
title
.
length
>
14
){
if
(
title
.
length
>
14
){
canvas
.
fillText
(
title
.
substr
(
14
,
14
),
10
,
canvasHeight
-
txtHeight
*
h
++
);
canvas
.
fillText
(
title
.
substr
(
14
,
14
),
10
,
canvasHeight
-
txtHeight
*
h
++
+
20
);
}
}
canvas
.
fillText
(
title
.
substr
(
0
,
14
),
10
,
canvasHeight
-
txtHeight
*
h
++
-
titleHeight
/
2
);
canvas
.
fillText
(
title
.
substr
(
0
,
14
),
10
,
canvasHeight
-
txtHeight
*
h
++
-
titleHeight
/
2
+
10
);
}
}
if
(
this
.
waterSetting
&&
this
.
waterSetting
.
mid_text
){
if
(
this
.
waterSetting
&&
this
.
waterSetting
.
mid_text
){
//加入 水印图片
//加入 水印图片
...
@@ -450,8 +450,7 @@
...
@@ -450,8 +450,7 @@
let
hour
=
(
d
.
getHours
()
<
10
)
?
(
"0"
+
d
.
getHours
())
:
d
.
getHours
();
let
hour
=
(
d
.
getHours
()
<
10
)
?
(
"0"
+
d
.
getHours
())
:
d
.
getHours
();
let
min
=
(
d
.
getMinutes
()
<
10
)
?
(
"0"
+
d
.
getMinutes
())
:
d
.
getMinutes
();
let
min
=
(
d
.
getMinutes
()
<
10
)
?
(
"0"
+
d
.
getMinutes
())
:
d
.
getMinutes
();
let
sec
=
(
d
.
getSeconds
()
<
10
)
?
(
"0"
+
d
.
getSeconds
())
:
d
.
getSeconds
();
let
sec
=
(
d
.
getSeconds
()
<
10
)
?
(
"0"
+
d
.
getSeconds
())
:
d
.
getSeconds
();
let
now
=
year
+
"年"
+
month
+
"月"
+
date
+
"日 "
+
hour
+
":"
+
min
+
":"
+
sec
+
"(星期"
+
days
[
day
]
+
let
now
=
year
+
"年"
+
month
+
"月"
+
date
+
"日 "
+
hour
+
":"
+
min
+
":"
+
sec
;
")"
;
return
now
return
now
},
},
...
...
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