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
f262da98
Commit
f262da98
authored
Apr 01, 2021
by
李俊赕
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
按钮防抖处理
parent
5dfaa271
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
14 deletions
+24
-14
preview.vue
take-order/pages/photo/preview.vue
+3
-3
take.vue
take-order/pages/photo/take.vue
+21
-11
No files found.
take-order/pages/photo/preview.vue
View file @
f262da98
...
@@ -4,10 +4,10 @@
...
@@ -4,10 +4,10 @@
<image
class=
"pic"
:src=
"files[0]"
mode=
"aspectFit"
@
click=
"showPreviewFn"
></image>
<image
class=
"pic"
:src=
"files[0]"
mode=
"aspectFit"
@
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=
"
$u.debounce(remakePhoto, 500)
"
></image>
<image
class=
"btn"
:src=
"btn_continue"
@
click=
"
continuePhoto
"
></image>
<image
class=
"btn"
:src=
"btn_continue"
@
click=
"
$u.debounce(continuePhoto, 500)
"
></image>
</view>
</view>
<image
class=
"btn finish"
src=
"/static/photo/finish.png"
@
click=
"
finishPhoto
"
></image>
<image
class=
"btn finish"
src=
"/static/photo/finish.png"
@
click=
"
$u.debounce(finishPhoto, 500)
"
></image>
</view>
</view>
</
template
>
</
template
>
...
...
take-order/pages/photo/take.vue
View file @
f262da98
...
@@ -24,7 +24,7 @@
...
@@ -24,7 +24,7 @@
</camera>
</camera>
<cover-view
class=
"bottom-box"
v-if=
"!standardShow"
>
<cover-view
class=
"bottom-box"
v-if=
"!standardShow"
>
<cover-image
class=
"icon"
src=
'/static/photo/icon-back.png'
mode=
""
@
click=
"goBack"
></cover-image>
<cover-image
class=
"icon"
src=
'/static/photo/icon-back.png'
mode=
""
@
click=
"goBack"
></cover-image>
<cover-image
class=
'icon-take icon'
src=
'/static/photo/icon-take.png'
@
click=
"
takePhoto
"
>
</cover-image>
<cover-image
class=
'icon-take icon'
src=
'/static/photo/icon-take.png'
@
click=
"
$u.debounce(takePhoto, 500)
"
>
</cover-image>
<cover-image
class=
'icon'
src=
'/static/photo/icon-standard.png'
@
click=
"standardShow = true"
>
</cover-image>
<cover-image
class=
'icon'
src=
'/static/photo/icon-standard.png'
@
click=
"standardShow = true"
>
</cover-image>
</cover-view>
</cover-view>
<canvas
canvas-id=
"canvas"
id=
"photoCanvas"
class=
"canvas"
<canvas
canvas-id=
"canvas"
id=
"photoCanvas"
class=
"canvas"
...
@@ -115,7 +115,7 @@
...
@@ -115,7 +115,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
=
[]
...
@@ -131,7 +131,7 @@
...
@@ -131,7 +131,7 @@
if
(
idx
>
-
1
)
{
if
(
idx
>
-
1
)
{
settingTxtArr
.
push
(
arr
[
idx
])
settingTxtArr
.
push
(
arr
[
idx
])
}
else
{
}
else
{
settingTxtArr
.
push
(
item
.
watemark_text
+
':
'
+
item
.
watemark_value
)
settingTxtArr
.
push
(
item
.
watemark_text
+
':'
+
item
.
watemark_value
)
}
}
}
}
})
})
...
@@ -145,8 +145,12 @@
...
@@ -145,8 +145,12 @@
const
photo
=
getApp
().
globalData
.
photo
const
photo
=
getApp
().
globalData
.
photo
this
.
waterSetting
=
photo
.
waterSetting
this
.
waterSetting
=
photo
.
waterSetting
this
.
standardShow
=
this
.
shadowInitShow
this
.
standardShow
=
this
.
shadowInitShow
this
.
cameraChange
=
true
// this.initData()
// this.initData()
},
},
onHide
(){
this
.
cameraChange
=
false
},
methods
:
{
methods
:
{
closeShadow
()
{
closeShadow
()
{
this
.
shadowInitShow
=
false
this
.
shadowInitShow
=
false
...
@@ -199,7 +203,6 @@
...
@@ -199,7 +203,6 @@
console
.
log
(
globalData
.
navHeight
,
'globalData.navHeight'
)
console
.
log
(
globalData
.
navHeight
,
'globalData.navHeight'
)
this
.
ratio
=
globalData
.
screenHeight
/
globalData
.
rpxScreenHeight
this
.
ratio
=
globalData
.
screenHeight
/
globalData
.
rpxScreenHeight
console
.
log
(
globalData
.
screenHeight
,
globalData
.
rpxScreenHeight
,
this
.
ratio
)
console
.
log
(
globalData
.
screenHeight
,
globalData
.
rpxScreenHeight
,
this
.
ratio
)
this
.
cameraChange
=
true
this
.
waterSetting
=
globalData
.
photo
.
waterSetting
this
.
waterSetting
=
globalData
.
photo
.
waterSetting
// this.cameraHeight = globalData.rpxScreenHeight
// this.cameraHeight = globalData.rpxScreenHeight
},
},
...
@@ -362,13 +365,16 @@
...
@@ -362,13 +365,16 @@
canvas
.
setFontSize
(
16
)
canvas
.
setFontSize
(
16
)
canvas
.
setFillStyle
(
'#f2f2f2'
)
canvas
.
setFillStyle
(
'#f2f2f2'
)
let
txt
=
settingTxtArr
[
i
]
let
txt
=
settingTxtArr
[
i
]
// if(txt.length>14){
if
(
txt
.
indexOf
(
'时间'
)
>=
0
){
// canvas.fillText(txt.substr(14,18), 10, canvasHeight - txtHeight * h++);
canvas
.
fillText
(
txt
,
10
,
canvasHeight
-
txtHeight
*
h
++
);
// canvas.fillText(txt.substr(0,18), 10, canvasHeight - txtHeight * h++);
}
else
{
// }else{
if
(
txt
.
length
>
14
){
// canvas.fillText(txt, 10, canvasHeight - txtHeight * h++);
canvas
.
fillText
(
txt
.
substr
(
14
,
14
),
10
,
canvasHeight
-
txtHeight
*
h
++
);
// }
canvas
.
fillText
(
txt
.
substr
(
0
,
14
),
10
,
canvasHeight
-
txtHeight
*
h
++
);
canvas
.
fillText
(
txt
,
10
,
canvasHeight
-
txtHeight
*
h
++
);
}
else
{
canvas
.
fillText
(
txt
,
10
,
canvasHeight
-
txtHeight
*
h
++
);
}
}
// canvas.fillText(txt, 10, canvasHeight - txtHeight * h++);
// canvas.fillText(txt, 10, canvasHeight - txtHeight * h++);
}
}
const
title
=
this
.
titleTxt
const
title
=
this
.
titleTxt
...
@@ -506,6 +512,9 @@
...
@@ -506,6 +512,9 @@
padding
:
20rpx
;
padding
:
20rpx
;
.txt
{
.txt
{
max-width
:
400rpx
;
max-height
:
80rpx
;
overflow
:
hidden
;
margin-top
:
5rpx
;
margin-top
:
5rpx
;
line-height
:
40rpx
;
line-height
:
40rpx
;
white-space
:
normal
;
white-space
:
normal
;
...
@@ -539,6 +548,7 @@
...
@@ -539,6 +548,7 @@
background-color
:
black
;
background-color
:
black
;
.txt
{
.txt
{
white-space
:
nowrap
;
line-height
:
60rpx
;
line-height
:
60rpx
;
color
:
#fff
;
color
:
#fff
;
}
}
...
...
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