新增分享,找回密码,实名认证,签约

This commit is contained in:
唐明明
2023-08-25 14:04:31 +08:00
parent 32cc588ae7
commit 0f7c37d548
106 changed files with 2130 additions and 1313 deletions

View File

@@ -1,66 +1,53 @@
// pages/face/index.js
Page({
/**
* 页面的初始数据
*/
data: {
goFaceDone : false,
bizToken : '',
redirectUrl : ''
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
this.setData({
bizToken : options.bizToken,
redirectUrl : decodeURIComponent(options.redirectUrl),
}, this.goFaceAuth)
},
/**
* 生命周期函数--监听页面初次渲染完成
* 生命周期函数--页面再次显示
*/
onReady() {
onShow(){
const { goFaceDone, redirectUrl } = this.data
if (!goFaceDone) return
const options = wx.getEnterOptionsSync()
if(options.scene === 1038 && options.referrerInfo.extraData && options.referrerInfo.extraData.faceResult){
const pages = getCurrentPages()
const pre = pages[pages.length - 2]
if (pre.reloadPage && typeof pre.reloadPage === 'function') {
pre.reloadPage(redirectUrl + `&timeStamp=${new Date().getTime()}`)
wx.navigateBack({
delta: 1,
})
}
}
},
/**
* 生命周期函数--监听页面显示
* 打开E签报小程序
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
goFaceAuth(){
wx.navigateToMiniProgram({
appId: "wx1cf2708c2de46337",
path : "/pages/face/index?bizToken=" + this.data.bizToken,
success: () => {
this.setData({
goFaceDone: true
})
}
})
}
})

View File

@@ -1,3 +1,4 @@
{
"usingComponents": {}
"usingComponents": {},
"navigationBarTitleText": "人脸识别"
}

View File

@@ -1,2 +1,9 @@
<!--pages/face/index.wxml-->
<text>pages/face/index.wxml</text>
<view class="face">
<image class="face-icon" src="/static/icons/refresh_loding.gif" mode="widthFix"></image>
<view class="face-loding">加载中...</view>
<view class="btn-content">
<text>如未成功跳转,请手动点击按钮转跳</text>
<button size="default" bind:tap="goFaceAuth">转跳</button>
</view>
</view>

View File

@@ -1 +1,16 @@
/* pages/face/index.wxss */
.face{
width: 100vw;
height: 90vh;
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
}
.face-icon{ width: 48rpx; height: 48rpx; margin-bottom: 40rpx; }
.face-loding{ color: gray; }
.btn-content{ margin-top: 150rpx; font-size: 30rpx; color: #333; }
.btn-content button[size="default"]{ background: #da2b54; height: 90rpx; line-height: 90rpx; color: white; padding: 0; border-radius: 45rpx; width: 400rpx; margin-top: 100rpx; }