Commit d092123b by 高淑倩

注释 开卡

parent 3ad27d86
...@@ -74,28 +74,26 @@ Component({ ...@@ -74,28 +74,26 @@ Component({
}, },
setUserInfo: function (e) { setUserInfo: function (e) {
console.log('开卡') console.log('开卡')
if (!app.globalData.openCard) { // 没有开卡并且需要开卡 // if (!app.globalData.openCard) { // 没有开卡并且需要开卡
wxService.openCard() // wxService.openCard()
return false // return false
}
const urls = getCurrentPages()
// setTimeout(() => {
// const item = urls[0].options
// if (item.route) {
// try {
// const options = JSON.parse(item.options)
// wxService.router(`/${item.route}`).search(options).replace()
// } catch (e) {
// wx.switchTab({
// url: '/pages/userCenter/userCenter'
// })
// } // }
// } else { // 跳转
// wx.switchTab({ const urls = getCurrentPages()
// url: '/pages/userCenter/userCenter' setTimeout(() => {
// }) const item = urls[0].options
// } console.log('----', item.route)
// }, 200) if (item.route) {
try {
const options = JSON.parse(item.options)
wxService.router(`/${item.route}`).search(options).replace()
} catch (e) {
wxService.router('/pages/userCenter/userCenter')
}
} else {
wxService.router('/pages/userCenter/userCenter')
}
}, 200)
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment