Commit 872b4d15 authored by 李俊赕's avatar 李俊赕

edit-page-take

parent eec44dbe
......@@ -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()
......
<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="locationText u-m-l-20 u-m-t-30">经度:{{longitude}}</cover-view>
<cover-view class="locationText u-m-l-20 u-m-t-10">维度:{{latitude}}</cover-view>
<cover-view class="locationText u-m-l-20 u-m-t-10">地址:{{address}}</cover-view>
<cover-view class="locationText u-m-l-20 u-m-t-10">时间:{{date}}</cover-view>
<cover-view class="txt u-m-l-20 u-m-t-30">经度:{{longitude}}</cover-view>
<cover-view class="txt u-m-l-20 u-m-t-10">维度:{{latitude}}</cover-view>
<cover-view class="txt u-m-l-20 u-m-t-10">地址:{{address}}</cover-view>
<cover-view class="txt 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:240rpx;
bottom: 20rpx;
padding:20rpx;
.txt{
color: #fff;
}
}
.bottom-box{
position: absolute;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment