添加人脸识别
This commit is contained in:
@ -12,18 +12,39 @@
|
||||
<view class="btn1" @click="seeOrder">查看订单</view>
|
||||
<view class="btn2" @click="done">完成</view>
|
||||
</view>
|
||||
|
||||
<!-- 人脸录入提示 -->
|
||||
<Popup :show="facePopup" radius="16rpx">
|
||||
<view class="notice-popup" style="width: 100%; position: relative;">
|
||||
<image style="width: 36rpx;height: 36rpx;position: absolute; top: 0; right: 46rpx;" src="https://xh.stnav.com/uploads/sport/icon_close.png" mode="" @click="facePopup = false"></image>
|
||||
|
||||
<view class="title">提示</view>
|
||||
<view class="desc" style="text-align: center;">
|
||||
为了给您提供更安全、便捷的入场体验,请完成人脸识别认证。只需几秒钟,轻松刷脸入场!
|
||||
</view>
|
||||
<view class="btn" @click="toTakeFacePhoto">去录入</view>
|
||||
</view>
|
||||
</Popup>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Popup from '@/components/uni-popup.vue';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
Popup,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
order_id: 0
|
||||
order_id: 0,
|
||||
ground_type: 1, // 1 网球 2篮球
|
||||
facePopup: false,
|
||||
};
|
||||
},
|
||||
|
||||
onLoad(args) {
|
||||
this.ground_type = args.ground_type || 1;
|
||||
this.order_id = args.order_id || 0;
|
||||
},
|
||||
|
||||
@ -39,10 +60,23 @@
|
||||
},
|
||||
|
||||
done() {
|
||||
uni.reLaunch({
|
||||
url: '/pages/index/index'
|
||||
if (this.ground_type == 1) {
|
||||
uni.reLaunch({
|
||||
url: '/pages/index/index'
|
||||
});
|
||||
} else if (this.ground_type == 2) {
|
||||
// 篮球场需要人脸录入
|
||||
this.facePopup = true;
|
||||
}
|
||||
},
|
||||
|
||||
// 去录入人脸照片
|
||||
toTakeFacePhoto() {
|
||||
this.facePopup = false;
|
||||
uni.navigateTo({
|
||||
url: `/bundle/face/face-info?order_id=${this.order_id}`
|
||||
});
|
||||
}
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
@ -111,4 +145,35 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.notice-popup {
|
||||
padding-bottom: 20rpx;
|
||||
|
||||
.title {
|
||||
font-size: 36rpx;
|
||||
color: #303133;
|
||||
line-height: 50rpx;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.desc {
|
||||
margin-top: 48rpx;
|
||||
font-weight: 400;
|
||||
font-size: 32rpx;
|
||||
color: #303133;
|
||||
line-height: 52rpx;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.btn {
|
||||
font-size: 32rpx;
|
||||
background: #365A9A;
|
||||
border-radius: 8rpx;
|
||||
margin: 92rpx 44rpx 0;
|
||||
height: 80rpx;
|
||||
line-height: 80rpx;
|
||||
text-align: center;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user