This commit is contained in:
wuxw 2020-01-06 21:05:53 +08:00
commit b684247dc5
7 changed files with 110 additions and 0 deletions

View File

@ -22,6 +22,7 @@
"pages/complaintList/complaintList",
"pages/viewApplicationKeyUser/viewApplicationKeyUser",
"pages/viewPersonFace/viewPersonFace",
"pages/collectFace/collectFace",
"pages/complaint/complaint",
"pages/viewComplaint/viewComplaint"

BIN
images/camera.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.8 KiB

View File

@ -0,0 +1,77 @@
// pages/collectFace/collectFace.js
Page({
/**
* 页面的初始数据
*/
data: {
src:''
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
},
takePhoto:function() {
const ctx = wx.createCameraContext()
ctx.takePhoto({
quality: 'high',
success: (res) => {
this.setData({
src: res.tempImagePath
})
}
})
}
})

View File

@ -0,0 +1,3 @@
{
"navigationBarTitleText": "采集人脸"
}

View File

@ -0,0 +1,10 @@
<view>
<camera mode="normal" device-position="front" flash="auto" binderror="error" style="width: 100%; height: 800rpx;">
<cover-view class="controls">
<cover-image class="img" src="../../images/camera.png" style="width:100%; height:100%"/>
</cover-view>
<cover-view class="cf_text_na">拿起手机,面向手机</cover-view>
</camera>
<button type="primary" bindtap="takePhoto">人脸采集</button>
</view>

View File

@ -0,0 +1,16 @@
.controls {
position: relative;
display: flex;
}
.cf_text_na{
font-size: 48rpx;
text-align: center;
margin:80rpx 0rpx;
font-display: 700;
}
.noticeTXT{
font-size: 10PX;
color: rgb(12, 242, 240);
text-align: center
}

View File

@ -69,6 +69,9 @@ Page({
collectFace:function(){
//采集人脸
console.log('采集人脸');
wx.navigateTo({
url: '/pages/collectFace/collectFace',
})
},
/**
* 查询业主人脸