标签:写法 var 中继 程序 func 实现 hat cti else
界面从A->B->C,其中B是中转界面,想要在C返回的时候实现
C-> A
只需要在B界面加上一个中转标志,从A->B触发到C界面的标志
从C->B 触发到A的标志,下面的是中继界面B的写法
Page({
data: {
hidden: false,
backflag : 0
},
onLoad:function(res){
},
onShow:function(){
console.log(this.data.backflag)
var that = this;
if (that.data.backflag == 0) {
wx.navigateTo({
url: ‘C界面路径‘,
success: function (res) {
that.setData({
backflag: 1
})
}
})
}
else {
wx.navigateBack({
//这个直接返回A界面
})
}
},
onReady:function(){
}
})
标签:写法 var 中继 程序 func 实现 hat cti else
原文地址:https://www.cnblogs.com/masterchd/p/9739904.html