This commit is contained in:
zhangmanman
2021-06-30 09:52:55 +08:00
parent 34590d9f72
commit 7cb9e1e92e
6 changed files with 104 additions and 85 deletions

View File

@@ -77,13 +77,26 @@ Page({
* 处理未登录时的转跳
*/
userNav(e){
let id = e.currentTarget.dataset.id
let newid = e.currentTarget.dataset.id,
canFrom = e.currentTarget.dataset.from
wx.getStorage({
key : 'token',
success:res=>{
wx.navigateTo({
url: '/pages/rights/rights?rightsId=' + id
})
if(canFrom == 'washcar') {
wx.$api.index.washcarUrl('', newid).then(res=>{
const newUrl = res.data
let url= encodeURIComponent(newUrl)
wx.redirectTo({
// 跳转到webview页面
url: `/pages/washcar/washcar?url=${url}`
});
})
} else {
// 跳转权益详情页
wx.navigateTo({
url: '/pages/rights/rights?rightsId=' + newid
})
}
},
fail: (err) => {
wx.navigateTo({