Commit 71a8efea authored by renjie's avatar renjie

相册扫脸页面优化

parent 60477c9c
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
</view> </view>
</view> </view>
<text class="tip">获取照片需先在拍摄点摄影</text> <text class="tip">获取照片需先在拍摄点摄影</text>
<u-mask :show="maskShow" @click="maskShow = false"> <u-mask :show="maskShow" @click="closeClick">
<view class="mask"> <view class="mask">
<text class="countdown" :class="{'hidden': maskCount <= 0}">{{maskCount}}s</text> <text class="countdown" :class="{'hidden': maskCount <= 0}">{{maskCount}}s</text>
<view class="tip"> <view class="tip">
...@@ -58,6 +58,7 @@ export default { ...@@ -58,6 +58,7 @@ export default {
queryData: {},//查询参数 queryData: {},//查询参数
defaultBrightness: 0.5,//屏幕亮度 defaultBrightness: 0.5,//屏幕亮度
options: {},//路由传参 options: {},//路由传参
loop: null//弹窗关闭倒计时
} }
}, },
methods: { methods: {
...@@ -68,6 +69,11 @@ export default { ...@@ -68,6 +69,11 @@ export default {
delta: 1 delta: 1
}) })
}, },
closeClick() {
if(this.maskCount > 0) return
this.maskShow = false
this.takePhoto()
},
recordDeviceInfo() {//---记录设备信息 recordDeviceInfo() {//---记录设备信息
this.statusBarHeight = uni.getSystemInfoSync().statusBarHeight // 状态栏高度 this.statusBarHeight = uni.getSystemInfoSync().statusBarHeight // 状态栏高度
this.capsule = uni.getMenuButtonBoundingClientRect() // 胶囊大小、位置数据 this.capsule = uni.getMenuButtonBoundingClientRect() // 胶囊大小、位置数据
...@@ -179,6 +185,7 @@ export default { ...@@ -179,6 +185,7 @@ export default {
}, },
handleNotFound() {//---处理没有找到照片或返回错误的逻辑 handleNotFound() {//---处理没有找到照片或返回错误的逻辑
this.maskShow = true this.maskShow = true
this.maskCount = 3
var loop = setInterval(() => { var loop = setInterval(() => {
this.maskCount -= 1 this.maskCount -= 1
if(this.maskCount <= 0) { if(this.maskCount <= 0) {
...@@ -274,11 +281,13 @@ export default { ...@@ -274,11 +281,13 @@ export default {
width: 100%; width: 100%;
height: 100%; height: 100%;
border-radius: 50%; border-radius: 50%;
overflow: hidden;
} }
.circle { .circle {
border: 1px dashed #999; border: 1px dashed #999;
box-sizing: border-box; box-sizing: border-box;
background-color: #fff; background-color: #fff;
-webkit-transform: rotate(0deg);
// z-index: 100; // z-index: 100;
} }
.surface { .surface {
......
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