|
@@ -13,8 +13,16 @@ Page({ |
|
|
* 生命周期函数--监听页面加载 |
|
|
* 生命周期函数--监听页面加载 |
|
|
*/ |
|
|
*/ |
|
|
onLoad: function(options) { |
|
|
onLoad: function(options) { |
|
|
console.log(options,10001) |
|
|
|
|
|
|
|
|
console.log(options); |
|
|
let that = this; |
|
|
let that = this; |
|
|
|
|
|
/** |
|
|
|
|
|
* 根据接收到的值,判断跳转到哪个页面 |
|
|
|
|
|
*/ |
|
|
|
|
|
if(options&&options.type){ |
|
|
|
|
|
app.globalData.type = options.type; |
|
|
|
|
|
console.log(app.globalData.type) |
|
|
|
|
|
} |
|
|
|
|
|
// app.globalData.type = 'pc'; |
|
|
if (decodeURIComponent(options.scene) == "undefined") { |
|
|
if (decodeURIComponent(options.scene) == "undefined") { |
|
|
that.setData({ |
|
|
that.setData({ |
|
|
scene: 0 |
|
|
scene: 0 |
|
@@ -40,7 +48,6 @@ Page({ |
|
|
options.path='daping' |
|
|
options.path='daping' |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
console.log(options.couponChannelId) |
|
|
|
|
|
wx.showToast({ |
|
|
wx.showToast({ |
|
|
title: '加载中', |
|
|
title: '加载中', |
|
|
icon: "loading", |
|
|
icon: "loading", |
|
@@ -89,7 +96,7 @@ Page({ |
|
|
}); |
|
|
}); |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
if (options&&options.couponChannelId && !options.cuserId) { |
|
|
|
|
|
|
|
|
if (options && options.couponChannelId && !options.cuserId &&app.globalData.type == 'cd') { |
|
|
wx.redirectTo({ |
|
|
wx.redirectTo({ |
|
|
url: `/pages/coupon/detail/index?couponChannelId=${options.couponChannelId}`, |
|
|
url: `/pages/coupon/detail/index?couponChannelId=${options.couponChannelId}`, |
|
|
}) |
|
|
}) |
|
@@ -100,10 +107,34 @@ Page({ |
|
|
wx.redirectTo({ |
|
|
wx.redirectTo({ |
|
|
url: `/pages/coupon/detail/index?couponChannelId=${options.couponChannelId}&cuserId=${options.cuserId}&coverImg=${options.coverImg}&userName=${options.userName}&avatarUrl=${options.avatarUrl}&couponOrderId=${options.couponOrderId}&updateDate=${options.updateDate}`, |
|
|
url: `/pages/coupon/detail/index?couponChannelId=${options.couponChannelId}&cuserId=${options.cuserId}&coverImg=${options.coverImg}&userName=${options.userName}&avatarUrl=${options.avatarUrl}&couponOrderId=${options.couponOrderId}&updateDate=${options.updateDate}`, |
|
|
}) |
|
|
}) |
|
|
} else if (options &&options.orderId) { |
|
|
|
|
|
|
|
|
} else if (options&&options.orderId&&app.globalData.type=='bg') { |
|
|
wx.redirectTo({ |
|
|
wx.redirectTo({ |
|
|
url: `/pages/bargain/bargainDatail/bargainDatail?orderId=${options.orderId}&from='${"discount"}`, |
|
|
url: `/pages/bargain/bargainDatail/bargainDatail?orderId=${options.orderId}&from='${"discount"}`, |
|
|
}) |
|
|
}) |
|
|
|
|
|
} else if (app.globalData.type == 'uc'){ |
|
|
|
|
|
wx.switchTab({ |
|
|
|
|
|
url: '/pages/user/index' |
|
|
|
|
|
}); |
|
|
|
|
|
} else if (app.globalData.type == 'pc') { |
|
|
|
|
|
wx.switchTab({ |
|
|
|
|
|
url: '/pages/passCar/passCar' |
|
|
|
|
|
}); |
|
|
|
|
|
} else if (app.globalData.type == 'co') { |
|
|
|
|
|
wx.redirectTo({ |
|
|
|
|
|
url: '/pages/couponorder/index/index' |
|
|
|
|
|
}); |
|
|
|
|
|
} else if (app.globalData.type == 'or') { |
|
|
|
|
|
wx.redirectTo({ |
|
|
|
|
|
url: '/pages/couponorder/index/index' |
|
|
|
|
|
}); |
|
|
|
|
|
} else if (app.globalData.type == 'sc') { |
|
|
|
|
|
wx.redirectTo({ |
|
|
|
|
|
url: '/pages/specialcourtesy/specialcourtesy' |
|
|
|
|
|
}); |
|
|
|
|
|
}else if (app.globalData.type == 'rb') { |
|
|
|
|
|
wx.redirectTo({ |
|
|
|
|
|
url: '/pages/rushToBuy/index' |
|
|
|
|
|
}); |
|
|
}else{ |
|
|
}else{ |
|
|
wx.switchTab({ |
|
|
wx.switchTab({ |
|
|
url: '/pages/main/index' |
|
|
url: '/pages/main/index' |
|
|