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

edit-page-take

parent eec44dbe
...@@ -97,12 +97,14 @@ ...@@ -97,12 +97,14 @@
signUrl:'', signUrl:'',
jumpLoginStatus:true, jumpLoginStatus:true,
settleRecommend:'' settleRecommend:'',
navHeight:0, //导航栏高度
rpxScreenHeight:0,// 照相视框高度
}, },
onLaunch: function() { onLaunch: function() {
this.getSystemInfo()
this.checkUpdate() this.checkUpdate()
var that=this var that=this
...@@ -122,7 +124,18 @@ ...@@ -122,7 +124,18 @@
}, },
onShow: function() {}, onShow: function() {},
methods: { 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 () { checkUpdate: function () {
const updateManager = wx.getUpdateManager() const updateManager = wx.getUpdateManager()
......
<template> <template>
<view class="camera-container"> <view class="camera-container">
<cover-view class="header-box"> <cover-view class="header-box" :style="{'height':navHeight + 'rpx'}">
<cover-image bindtap="changeScale" class="icon" mode="aspectFit" src="/static/photo/icon-switch.png"></cover-image> <cover-view class="inner">
<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-switch.png"></cover-image>
<cover-image bindtap="changeScale" class="icon" mode="aspectFit" src="/static/photo/icon-setting.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> </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="mark-box">
<cover-view class="locationText u-m-l-20 u-m-t-30">经度:{{longitude}}</cover-view> <cover-view class="txt 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="txt 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="txt 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-10">时间:{{date}}</cover-view>
</cover-view> </cover-view>
<cover-image class="mark-water liveWatermarkNormal" mode="aspectFit" :src="liveWaterMarkImage"></cover-image> <cover-image class="mark-water liveWatermarkNormal" mode="aspectFit" :src="liveWaterMarkImage"></cover-image>
</camera> </camera>
<cover-view class="bottom-box"> <cover-view class="bottom-box">
<cover-image class="icon" :src="icon_arrow_down" mode="" @click="simpleBack"></cover-image> <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-image class='icon-take icon' src='/static/photo/icon-take.png' @click="takePhoto()"> </cover-image>
<cover-view class="txt">拍照要求</cover-view> <cover-view class="txt">拍照要求</cover-view>
<!--cover-image class='flashIcon' :src='icon_light_on_white' @click="flashClick()"> </cover-image-->
</cover-view> </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> <canvas v-show='showImage' canvas-id="canvas" :style="{'width':canvasWidth+'px','height': canvasHeight + 'px'}"></canvas>
</view> </view>
...@@ -65,7 +63,11 @@ ...@@ -65,7 +63,11 @@
canvasWidth: 0, canvasWidth: 0,
canvasHeight: 0, canvasHeight: 0,
restuleImage: '', restuleImage: '',
authSetting: [] authSetting: [],
navHeight:0,
cameraHeight:(4 / 3 * 750),
} }
}, },
onLoad(e) { onLoad(e) {
...@@ -82,6 +84,10 @@ ...@@ -82,6 +84,10 @@
//this.address = '' //this.address = ''
}, },
onShow() { onShow() {
const globalData = getApp().globalData
console.log(globalData,'globalData')
this.navHeight = globalData.navHeight
// this.cameraHeight = globalData.rpxScreenHeight
// uni.authorize({ // uni.authorize({
// scope: 'scope.writePhotosAlbum', // scope: 'scope.writePhotosAlbum',
// success() { // success() {
...@@ -626,21 +632,36 @@ ...@@ -626,21 +632,36 @@
} }
} }
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.camera-container{ .camera-container{
padding-top:var(--status-bar-height); // padding-top:var(--status-bar-height);
min-height: 100vh;
background-color: black; background-color: black;
} }
.header-box{ .header-box{
padding:10rpx 20rpx; // padding:10rpx 20rpx;
display: flex; position: relative;
.inner{
display: flex;
position: absolute;
left:0;right:0;
bottom:0;
}
.icon{ .icon{
margin:20rpx;
display: block; display: block;
width:50rpx; width:50rpx;
height:50rpx; height:50rpx;
} }
} }
.camera-box{
position: relative;
width: 100%;
height: 100vh;
z-index: 1;
}
.mark-water{ .mark-water{
position: absolute; position: absolute;
left: 50%; left: 50%;
...@@ -653,8 +674,11 @@ ...@@ -653,8 +674,11 @@
.mark-box{ .mark-box{
position: absolute; position: absolute;
left:0; left:0;
bottom:240rpx; bottom: 20rpx;
padding:20rpx; padding:20rpx;
.txt{
color: #fff;
}
} }
.bottom-box{ .bottom-box{
position: absolute; 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