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
8a2015b3
Commit
8a2015b3
authored
Mar 25, 2021
by
李俊赕
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改拍照页面
parent
42e0ed77
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
6 deletions
+35
-6
take.vue
take-order/pages/photo/take.vue
+35
-6
No files found.
take-order/pages/photo/take.vue
View file @
8a2015b3
...
...
@@ -3,12 +3,12 @@
<view
class=
"camera-container"
>
<cover-view
class=
"header-box"
:style=
"
{'height':navHeight + 'rpx'}">
<cover-view
class=
"inner"
>
<cover-image
bindtap=
"changeScale
"
class=
"icon"
mode=
"aspectFit"
src=
"/static/photo/icon-switch.png"
></cover-image>
<cover-image
bindtap=
"changeScale
"
class=
"icon"
mode=
"aspectFit"
src=
"/static/photo/icon-light.png"
></cover-image>
<cover-image
bindtap=
"changeScale
"
class=
"icon"
mode=
"aspectFit"
src=
"/static/photo/icon-setting.png"
></cover-image>
<cover-image
@
click=
"setCameraInfo('devicePosition')
"
class=
"icon"
mode=
"aspectFit"
src=
"/static/photo/icon-switch.png"
></cover-image>
<cover-image
@
click=
"setCameraInfo('flash')
"
class=
"icon"
mode=
"aspectFit"
src=
"/static/photo/icon-light.png"
></cover-image>
<cover-image
@
click=
"goPage('/pages/photo/markSetting')
"
class=
"icon"
mode=
"aspectFit"
src=
"/static/photo/icon-setting.png"
></cover-image>
</cover-view>
</cover-view>
<camera
class=
"camera-box"
v-if=
"cameraChange"
device-position=
"front"
flash=
"on
"
:style=
"
{'height':cameraHeight + 'rpx'}"
<camera
class=
"camera-box"
v-if=
"cameraChange"
:device-position=
"cameraInfo.devicePosition"
:flash=
"cameraInfo.flash
"
:style=
"
{'height':cameraHeight + 'rpx'}"
@error="cameraError">
<cover-view
class=
"mark-box"
>
<cover-view
class=
"txt u-m-l-20 u-m-t-30"
>
经度:
{{
waterInfo
.
longitude
||
'正在获取中...'
}}
</cover-view>
...
...
@@ -18,12 +18,12 @@
</cover-view>
<cover-image
class=
"mark-water"
mode=
"aspectFit"
:src=
"waterInfo.markImage"
></cover-image>
</camera>
<cover-view
class=
"bottom-box"
>
<cover-view
class=
"bottom-box"
v-show=
"!standardShow"
>
<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'
src=
'/static/photo/icon-standard.png'
@
click=
"standardShow = true"
>
</cover-image>
</cover-view>
<canvas
canvas-id=
"canvas"
class=
"canvas"
:style=
"
{'width':750 + 'rpx','height': cameraHeight + 'rpx'}">
</canvas>
<canvas
canvas-id=
"canvas"
id=
"photoCanvas"
class=
"canvas"
:style=
"
{'width':750 + 'rpx','height': cameraHeight + 'rpx'}">
</canvas>
<cover-view
class=
"page-mask"
v-if=
"standardShow"
>
<photo-standard
:currentItem=
"currentItem"
/>
<cover-view
class=
"btn-close"
@
click=
"standardShow = false"
>
...
...
@@ -51,6 +51,10 @@
images
:[
'https://qn-static.banshouhui.com/live_mark.png'
,
'https://qn-static.banshouhui.com/live_mark.png'
,
'https://qn-static.banshouhui.com/live_mark.png'
],
},
standardShow
:
false
,
cameraInfo
:{
devicePosition
:
'front'
,
flash
:
'off'
},
waterInfo
:
{
longitude
:
''
,
// 经度
latitude
:
''
,
// 维度
...
...
@@ -115,6 +119,31 @@
url
:
'/pages/photo/brand'
})
},
goPage
(
url
){
url
=
url
||
'/pages/photo/index'
;
console
.
log
(
url
,
'url'
)
uni
.
navigateTo
({
url
:
url
})
},
setCameraInfo
(
type
){
// 设置相机前置后置、闪关灯等
const
cameraInfo
=
this
.
cameraInfo
let
val
=
cameraInfo
[
type
]
switch
(
type
){
case
'devicePosition'
:
val
=
val
===
'back'
?
'front'
:
'back'
break
;
case
'flash'
:
val
=
val
===
'auto'
?
'on'
:
'auto'
break
;
defalut
:
break
;
}
console
.
log
(
type
,
'type'
,
val
,
'val'
)
this
.
cameraInfo
[
type
]
=
val
},
initData
()
{
const
globalData
=
getApp
().
globalData
this
.
navHeight
=
globalData
.
navHeight
...
...
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