新增分享,找回密码,实名认证,签约
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
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
@@ -1,3 +1,4 @@
|
||||
{
|
||||
"usingComponents": {}
|
||||
"usingComponents": {},
|
||||
"navigationBarTitleText": "人脸识别"
|
||||
}
|
||||
@@ -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>
|
||||
|
||||
@@ -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; }
|
||||
|
||||
Reference in New Issue
Block a user