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
872b4d15
Commit
872b4d15
authored
Mar 20, 2021
by
李俊赕
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
edit-page-take
parent
eec44dbe
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
60 additions
and
23 deletions
+60
-23
App.vue
take-order/App.vue
+17
-4
take.vue
take-order/pages/photo/take.vue
+43
-19
No files found.
take-order/App.vue
View file @
872b4d15
...
...
@@ -97,12 +97,14 @@
signUrl
:
''
,
jumpLoginStatus
:
true
,
settleRecommend
:
''
settleRecommend
:
''
,
navHeight
:
0
,
//导航栏高度
rpxScreenHeight
:
0
,
// 照相视框高度
},
onLaunch
:
function
()
{
this
.
getSystemInfo
()
this
.
checkUpdate
()
var
that
=
this
...
...
@@ -122,7 +124,18 @@
},
onShow
:
function
()
{},
methods
:
{
getSystemInfo
(){
try
{
let
a
=
wx
.
getSystemInfoSync
();
// this.globalData.platform = systemInfo.platform, this.globalData.pixelRatio = a.pixelRatio,
// this.globalData.statusBarHeight = a.statusBarHeight, this.globalData.navHeight = a.statusBarHeight / a.screenWidth * 750 + 90,
// this.globalData.rpxScreenHeight = a.screenHeight / a.screenWidth * 750, this.globalData.screenWidth = a.screenWidth,
// this.globalData.screenHeight = a.screenHeight;
this
.
globalData
.
navHeight
=
a
.
statusBarHeight
/
a
.
screenWidth
*
750
+
90
this
.
globalData
.
rpxScreenHeight
=
a
.
screenHeight
/
a
.
screenWidth
*
750
}
catch
(
a
)
{}
},
//检查更新
checkUpdate
:
function
()
{
const
updateManager
=
wx
.
getUpdateManager
()
...
...
take-order/pages/photo/take.vue
View file @
872b4d15
<
template
>
<view
class=
"camera-container"
>
<cover-view
class=
"header-box"
>
<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-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-view>
</cover-view>
<camera
device-position=
"front"
flash=
"on"
style=
'width:100%; height:100vh; overflow: hidden;'
@
error=
"cameraRefuse"
>
<camera
class=
"camera-box"
device-position=
"front"
flash=
"on"
:style=
"
{'height':cameraHeight + 'rpx','line-height':cameraHeight + 'rpx'}"
@error="cameraRefuse">
<cover-view
class=
"mark-box"
>
<cover-view
class=
"
locationTe
xt u-m-l-20 u-m-t-30"
>
经度:
{{
longitude
}}
</cover-view>
<cover-view
class=
"
locationTe
xt u-m-l-20 u-m-t-10"
>
维度:
{{
latitude
}}
</cover-view>
<cover-view
class=
"
locationTe
xt u-m-l-20 u-m-t-10"
>
地址:
{{
address
}}
</cover-view>
<cover-view
class=
"
locationTe
xt u-m-l-20 u-m-t-10"
>
时间:
{{
date
}}
</cover-view>
<cover-view
class=
"
t
xt u-m-l-20 u-m-t-30"
>
经度:
{{
longitude
}}
</cover-view>
<cover-view
class=
"
t
xt u-m-l-20 u-m-t-10"
>
维度:
{{
latitude
}}
</cover-view>
<cover-view
class=
"
t
xt u-m-l-20 u-m-t-10"
>
地址:
{{
address
}}
</cover-view>
<cover-view
class=
"
t
xt u-m-l-20 u-m-t-10"
>
时间:
{{
date
}}
</cover-view>
</cover-view>
<cover-image
class=
"mark-water liveWatermarkNormal"
mode=
"aspectFit"
:src=
"liveWaterMarkImage"
></cover-image>
</camera>
<cover-view
class=
"bottom-box"
>
<cover-image
class=
"icon"
:src=
"icon_arrow_down"
mode=
""
@
click=
"simpleBack"
></cover-image>
<!--cover-image class='switchIcon' :src='icon_switch_white' @click="switchClick()">
</cover-image-->
<cover-image
class=
'icon-take icon'
src=
'/static/photo/icon-take.png'
@
click=
"takePhoto()"
>
</cover-image>
<cover-view
class=
"txt"
>
拍照要求
</cover-view>
<!--cover-image class='flashIcon' :src='icon_light_on_white' @click="flashClick()">
</cover-image-->
</cover-view>
<!--button @click="openSetting">打开设置页
</button-->
<!--button open-type="openSetting" @opensetting="callback">打开设置页1111
</button-->
<canvas
v-show=
'showImage'
canvas-id=
"canvas"
:style=
"
{'width':canvasWidth+'px','height': canvasHeight + 'px'}">
</canvas>
</view>
...
...
@@ -65,7 +63,11 @@
canvasWidth
:
0
,
canvasHeight
:
0
,
restuleImage
:
''
,
authSetting
:
[]
authSetting
:
[],
navHeight
:
0
,
cameraHeight
:(
4
/
3
*
750
),
}
},
onLoad
(
e
)
{
...
...
@@ -82,6 +84,10 @@
//this.address = ''
},
onShow
()
{
const
globalData
=
getApp
().
globalData
console
.
log
(
globalData
,
'globalData'
)
this
.
navHeight
=
globalData
.
navHeight
// this.cameraHeight = globalData.rpxScreenHeight
// uni.authorize({
// scope: 'scope.writePhotosAlbum',
// success() {
...
...
@@ -626,21 +632,36 @@
}
}
</
script
>
<
style
scoped
lang=
"scss"
>
.camera-container
{
padding-top
:var
(
--status-bar-height
)
;
// padding-top:var(--status-bar-height);
min-height
:
100vh
;
background-color
:
black
;
}
.header-box
{
padding
:
10rpx
20rpx
;
display
:
flex
;
// padding:10rpx 20rpx;
position
:
relative
;
.inner
{
display
:
flex
;
position
:
absolute
;
left
:
0
;
right
:
0
;
bottom
:
0
;
}
.icon
{
margin
:
20rpx
;
display
:
block
;
width
:
50rpx
;
height
:
50rpx
;
}
}
.camera-box
{
position
:
relative
;
width
:
100%
;
height
:
100vh
;
z-index
:
1
;
}
.mark-water
{
position
:
absolute
;
left
:
50%
;
...
...
@@ -653,8 +674,11 @@
.mark-box
{
position
:
absolute
;
left
:
0
;
bottom
:
24
0rpx
;
bottom
:
2
0rpx
;
padding
:
20rpx
;
.txt
{
color
:
#fff
;
}
}
.bottom-box
{
position
:
absolute
;
...
...
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