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
8784c284
Commit
8784c284
authored
Mar 30, 2021
by
Facius
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev-photo-v2' of
https://git.banshouhui.com/heyinchen/take_order
into dev-photo-v2
parents
5f188b46
f0601de2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
15 deletions
+24
-15
preview.vue
take-order/pages/photo/preview.vue
+1
-1
take.vue
take-order/pages/photo/take.vue
+23
-14
No files found.
take-order/pages/photo/preview.vue
View file @
8784c284
<
template
>
<
template
>
<view>
<view>
<view
class=
"contentView"
>
<view
class=
"contentView"
>
<image
class=
"pic"
:src=
"files[0]"
mode=
"aspectFi
ll
"
@
click=
"showPreviewFn"
></image>
<image
class=
"pic"
:src=
"files[0]"
mode=
"aspectFi
t
"
@
click=
"showPreviewFn"
></image>
</view>
</view>
<view
class=
"bottomView"
>
<view
class=
"bottomView"
>
<image
class=
"btn"
:src=
"btn_remake"
@
click=
"remakePhoto"
></image>
<image
class=
"btn"
:src=
"btn_remake"
@
click=
"remakePhoto"
></image>
...
...
take-order/pages/photo/take.vue
View file @
8784c284
...
@@ -13,8 +13,8 @@
...
@@ -13,8 +13,8 @@
<camera
class=
"camera-box"
v-if=
"cameraChange&&!standardShow"
:device-position=
"cameraInfo.devicePosition"
<camera
class=
"camera-box"
v-if=
"cameraChange&&!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
u-m-t-20
"
>
{{
titleTxt
}}
</cover-view>
<cover-view
class=
"txt big"
>
{{
titleTxt
}}
</cover-view>
<cover-view
class=
"txt
u-m-t-20"
v-for=
"(txt,index) in settingTxtArr"
:key=
"index"
>
{{
txt
}}
</cover-view>
<cover-view
class=
"txt
"
v-for=
"(txt,index) in settingTxtArr"
:key=
"index"
>
{{
txt
||
'获取中'
}}
</cover-view>
<!--
<cover-view
class=
"txt u-m-t-10"
>
维度:
{{
waterInfo
.
latitude
||
'正在获取中...'
}}
</cover-view>
<!--
<cover-view
class=
"txt u-m-t-10"
>
维度:
{{
waterInfo
.
latitude
||
'正在获取中...'
}}
</cover-view>
<cover-view
class=
"txt u-m-t-10"
>
地址:
{{
waterInfo
.
address
||
'正在获取中...'
}}
</cover-view>
<cover-view
class=
"txt u-m-t-10"
>
地址:
{{
waterInfo
.
address
||
'正在获取中...'
}}
</cover-view>
<cover-view
class=
"txt u-m-t-10"
>
时间:
{{
waterInfo
.
date
||
'正在获取中...'
}}
</cover-view>
-->
<cover-view
class=
"txt u-m-t-10"
>
时间:
{{
waterInfo
.
date
||
'正在获取中...'
}}
</cover-view>
-->
...
@@ -112,7 +112,7 @@
...
@@ -112,7 +112,7 @@
let
arr
=
[]
let
arr
=
[]
// 包含经纬度
// 包含经纬度
const
waterInfo
=
this
.
waterInfo
const
waterInfo
=
this
.
waterInfo
arr
=
[
'经度: '
+
waterInfo
.
longitude
,
'纬度: '
+
waterInfo
.
latitude
,
'地址: '
+
waterInfo
.
address
,
'时间: '
+
arr
=
[
'经度
嘟嘟嘟激励大家了杰拉德杰拉德了大量聚集的决定立即登录
: '
+
waterInfo
.
longitude
,
'纬度: '
+
waterInfo
.
latitude
,
'地址: '
+
waterInfo
.
address
,
'时间: '
+
waterInfo
.
date
waterInfo
.
date
]
]
let
settingTxtArr
=
[]
let
settingTxtArr
=
[]
...
@@ -355,24 +355,30 @@
...
@@ -355,24 +355,30 @@
canvas
.
rect
(
0
,
0
,
canvasWidth
,
canvasHeight
)
canvas
.
rect
(
0
,
0
,
canvasWidth
,
canvasHeight
)
canvas
.
drawImage
(
tempPath
,
0
,
0
,
canvasWidth
,
canvasHeight
)
canvas
.
drawImage
(
tempPath
,
0
,
0
,
canvasWidth
,
canvasHeight
)
// this.canvas.draw()
// this.canvas.draw()
let
txtHeight
=
18
let
h
=
1
let
h
=
1
let
txtHeight
=
20
//加入 水印文字
for
(
let
i
=
settingTxtArr
.
length
-
1
;
i
>=
0
;
i
--
)
{
txtHeight
=
18
canvas
.
setFontSize
(
14
)
canvas
.
setFillStyle
(
'#f2f2f2'
)
let
txt
=
settingTxtArr
[
i
]
if
(
txt
.
length
>
14
){
canvas
.
fillText
(
txt
.
substr
(
0
,
14
),
10
,
canvasHeight
-
txtHeight
*
h
++
);
canvas
.
fillText
(
txt
.
substr
(
14
,
14
),
10
,
canvasHeight
-
txtHeight
*
h
++
);
}
else
{
canvas
.
fillText
(
txt
,
10
,
canvasHeight
-
txtHeight
*
h
++
);
}
// canvas.fillText(txt, 10, canvasHeight - txtHeight * h++);
}
const
title
=
this
.
titleTxt
const
title
=
this
.
titleTxt
if
(
title
){
if
(
title
){
txtHeight
=
20
canvas
.
setFontSize
(
20
)
canvas
.
setFontSize
(
20
)
canvas
.
setFillStyle
(
'#f2f2f2'
)
canvas
.
setFillStyle
(
'#f2f2f2'
)
canvas
.
fillText
(
title
,
10
,
canvasHeight
-
txtHeight
*
h
++
);
canvas
.
fillText
(
title
,
10
,
canvasHeight
-
txtHeight
*
h
++
);
}
}
//加入 水印文字
txtHeight
=
18
for
(
let
i
=
0
;
i
<
settingTxtArr
.
length
;
i
++
)
{
canvas
.
setFontSize
(
14
)
canvas
.
setFillStyle
(
'#f2f2f2'
)
const
txt
=
settingTxtArr
[
i
]
canvas
.
fillText
(
txt
,
10
,
canvasHeight
-
txtHeight
*
h
++
);
}
if
(
this
.
waterSetting
&&
this
.
waterSetting
.
mid_text
){
if
(
this
.
waterSetting
&&
this
.
waterSetting
.
mid_text
){
//加入 水印图片
//加入 水印图片
canvas
.
drawImage
(
this
.
tempImgs
.
markImage
,
canvasWidth
/
2
-
100
,
canvasHeight
/
2
-
25
,
200
,
50
)
canvas
.
drawImage
(
this
.
tempImgs
.
markImage
,
canvasWidth
/
2
-
100
,
canvasHeight
/
2
-
25
,
200
,
50
)
...
@@ -492,6 +498,9 @@
...
@@ -492,6 +498,9 @@
padding
:
20rpx
;
padding
:
20rpx
;
.txt
{
.txt
{
margin-top
:
5rpx
;
line-height
:
40rpx
;
white-space
:
normal
;
font-size
:
28rpx
;
font-size
:
28rpx
;
color
:
#fff
;
color
:
#fff
;
.big
{
.big
{
...
...
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