|
@@ -31,7 +31,7 @@ Page({
|
|
|
wx.navigateTo({ url })
|
|
|
return;
|
|
|
}
|
|
|
- wx.redirectTo({
|
|
|
+ wx.navigateTo({
|
|
|
url: "/pages/downloadPage/index"
|
|
|
})
|
|
|
}
|
|
@@ -50,81 +50,68 @@ Page({
|
|
|
* 生命周期函数--监听页面加载
|
|
|
*/
|
|
|
onLoad() {
|
|
|
- if (!app.globalData.configPage) app.getPageInfo({
|
|
|
+ app.getPageInfo({
|
|
|
success: (res: any) => {
|
|
|
- app.globalData.configPage = res || {};
|
|
|
- this.inited(app.globalData.configPage);
|
|
|
+ const configPage = res || {};
|
|
|
+ this.inited(configPage);
|
|
|
}
|
|
|
})
|
|
|
- else this.inited(app.globalData.configPage);
|
|
|
},
|
|
|
|
|
|
/**
|
|
|
* 生命周期函数--监听页面初次渲染完成
|
|
|
*/
|
|
|
- onReady() {
|
|
|
-
|
|
|
- },
|
|
|
+ onReady() { },
|
|
|
|
|
|
/**
|
|
|
* 生命周期函数--监听页面显示
|
|
|
*/
|
|
|
onShow() {
|
|
|
// 获取用户信息
|
|
|
- app.getUser({
|
|
|
- data: {},
|
|
|
- success: (res: any) => {
|
|
|
- if (!res) return;
|
|
|
- if (res.UPLOAD_FACE && res.SAVE_USER_INFO) {
|
|
|
- // 已经录过脸并且用户信息已经上传,跳转视频下载页
|
|
|
- // this.setData({
|
|
|
- // btnText: "进入下载页"
|
|
|
- // })
|
|
|
- return wx.reLaunch({
|
|
|
- url: "/pages/downloadPage/index"
|
|
|
- })
|
|
|
- }
|
|
|
- },
|
|
|
- complete: () => {
|
|
|
- app.globalData.getUserLoad = false;
|
|
|
- }
|
|
|
- })
|
|
|
+ // app.getUser({
|
|
|
+ // data: {},
|
|
|
+ // success: (res: any) => {
|
|
|
+ // if (!res) return;
|
|
|
+ // if (res.UPLOAD_FACE && res.SAVE_USER_INFO) {
|
|
|
+ // // 已经录过脸并且用户信息已经上传,跳转视频下载页
|
|
|
+ // // this.setData({
|
|
|
+ // // btnText: "进入下载页"
|
|
|
+ // // })
|
|
|
+ // return wx.reLaunch({
|
|
|
+ // url: "/pages/downloadPage/index"
|
|
|
+ // })
|
|
|
+ // }
|
|
|
+ // },
|
|
|
+ // complete: () => {
|
|
|
+ // app.globalData.getUserLoad = false;
|
|
|
+ // }
|
|
|
+ // })
|
|
|
},
|
|
|
|
|
|
/**
|
|
|
* 生命周期函数--监听页面隐藏
|
|
|
*/
|
|
|
- onHide() {
|
|
|
-
|
|
|
- },
|
|
|
+ onHide() { },
|
|
|
|
|
|
/**
|
|
|
* 生命周期函数--监听页面卸载
|
|
|
*/
|
|
|
- onUnload() {
|
|
|
-
|
|
|
- },
|
|
|
+ onUnload() { },
|
|
|
|
|
|
/**
|
|
|
* 页面相关事件处理函数--监听用户下拉动作
|
|
|
*/
|
|
|
- onPullDownRefresh() {
|
|
|
-
|
|
|
- },
|
|
|
+ onPullDownRefresh() { },
|
|
|
|
|
|
/**
|
|
|
* 页面上拉触底事件的处理函数
|
|
|
*/
|
|
|
- onReachBottom() {
|
|
|
-
|
|
|
- },
|
|
|
+ onReachBottom() { },
|
|
|
|
|
|
/**
|
|
|
* 用户点击右上角分享
|
|
|
*/
|
|
|
- onShareAppMessage() {
|
|
|
-
|
|
|
- }
|
|
|
+ onShareAppMessage() { }
|
|
|
})
|
|
|
|
|
|
export { }
|