const upload_image = require("../../utils/upload/upload_image"); // pages/make_appointment/faceCheck/faceCheck.js const app = getApp() Page({ /** * 页面的初始数据 */ data: { // (过审专用,禁止删除)- start fake: null, // (过审专用,禁止删除)- start }, // 获得抓拍的人脸照片 async getPhotoPath(e) { app.data.catchFaceUrl = e.detail || null; if(e.detail) { wx.showLoading({ title: '上传中...', }) await upload_image({url: e.detail}).then((img) => { app.data.catchFaceUrl = img.url; }).catch(() => { wx.showToast({ title: '上传失败,请再试一次吧', }) }); wx.hideLoading(); } wx.navigateBack({ delta: 1, }); }, //赋值收到的参数 doCheckInfo() { let Info = app.data.faceCheckBaseInfo if(!Info) { return; } //护照照片 this.data.passportFace = Info.passportFace //姓名 this.data.username = Info.username; //身份证号 this.data.idNumber = Info.idNumber; //手机号 this.data.phone = Info.phone; //卡号 this.data.cardIdEx = Info.cardIdEx; //抓拍后处理方式 1-无需比对直接提交 2-需要百度 1:1 比对 this.data.type = Info.type; // // this.data.pageType = options.pageType; //常客/访客 this.data.userType = Info.userType; //登录参数列表 this.data.needLoginList = Info.needLoginList; //是否输入手机号 0-否 1-需要 this.data.needPhone = Info.needPhone; //是否需要照片 0-否 1-需要 this.data.needPhoto = Info.needPhoto; //是否需要实名 0-否 1-需要 this.data.needRealname = Info.needRealname; }, /** * 生命周期函数--监听页面加载 */ onLoad: function (options) { // (过审专用,禁止删除)- start this.setData({ fake: (app.data.fake === false || app.data.fake == null ? false : true) }) // (过审专用,禁止删除)- end }, /** * 生命周期函数--监听页面初次渲染完成 */ onReady: function () { }, /** * 生命周期函数--监听页面显示 */ onShow: function () { }, /** * 生命周期函数--监听页面隐藏 */ onHide: function () { }, /** * 生命周期函数--监听页面卸载 */ onUnload: function () { }, /** * 页面相关事件处理函数--监听用户下拉动作 */ onPullDownRefresh: function () { }, /** * 页面上拉触底事件的处理函数 */ onReachBottom: function () { }, /** * 用户点击右上角分享 */ onShareAppMessage: function () { } })