新增分享,找回密码,实名认证,签约
This commit is contained in:
@@ -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
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
Reference in New Issue
Block a user