mirror of
https://gitee.com/elegant_wings/dbd-meeting-wx-small.git
synced 2025-06-21 04:59:37 +08:00
描述: 如果大于1个页面就后退
This commit is contained in:
parent
3c2689c7f5
commit
2fb0a73c16
@ -78,8 +78,18 @@ Page({
|
||||
wx.setStorageSync('token', token)
|
||||
wx.setStorageSync('parkId', user.parkId)
|
||||
wx.setStorageSync('parkName', user.parkName)
|
||||
// 跳转首页
|
||||
wx.navigateBack()
|
||||
|
||||
let currentPages = getCurrentPages();
|
||||
console.log('currentPages' , currentPages);
|
||||
// 大于一个页面就后退,否则直接跳转首页
|
||||
if(currentPages.length > 1){
|
||||
wx.navigateBack()
|
||||
}else{
|
||||
// 跳转首页
|
||||
wx.reLaunch({
|
||||
url: '/pages/index/index',
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user