Browse Source

中转页

master
jiazhipeng 1 year ago
parent
commit
b74ce363c7
  1. 23
      subPackages/transferPage/transferPage.js

23
subPackages/transferPage/transferPage.js

@ -5,13 +5,16 @@ Page({
* 页面的初始数据
*/
data: {
back: false
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
this.setData({
back: false
})
if (options.action = 'otherMiniProgram') {
this.goOtherMiniProgrogram(options)
} else {
@ -27,7 +30,12 @@ Page({
appId: data.appId,
path: data.path,
shortLink: data.shortLink,
complete: () =>{
success: () =>{
this.setData({
back: true
})
},
fail: ()=>{
wx.navigateBack()
}
})
@ -44,7 +52,15 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow() {
if (this.data.back) {
wx.showModal({
title: '即将返回君到苏州小程序',
showCancel: false,
complete: (res) => {
wx.navigateBack()
}
})
}
},
/**
@ -58,7 +74,6 @@ Page({
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**

Loading…
Cancel
Save