Commit 175e6e7b by 杨北旺

修复bug

1 parent 4c5e2bed
...@@ -14,7 +14,6 @@ Page({ ...@@ -14,7 +14,6 @@ Page({
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad: function (options) { onLoad: function (options) {
wx.p.routerApi.decodeUrlLink(options)
if (!options.id) { if (!options.id) {
return return
} }
......
...@@ -157,6 +157,7 @@ Component({ ...@@ -157,6 +157,7 @@ Component({
item item
} = e.currentTarget.dataset } = e.currentTarget.dataset
const B_userInfo = wx.p.storage.get('userInfo') const B_userInfo = wx.p.storage.get('userInfo')
this.jumpEvent = true
if (B_userInfo && B_userInfo.userType) { if (B_userInfo && B_userInfo.userType) {
wx.navigateTo({ wx.navigateTo({
url: '/pages/Login/Login' url: '/pages/Login/Login'
...@@ -233,6 +234,7 @@ Component({ ...@@ -233,6 +234,7 @@ Component({
} = e.currentTarget.dataset } = e.currentTarget.dataset
const authStatus = await wx.p.router.intercept() const authStatus = await wx.p.router.intercept()
if (authStatus) return if (authStatus) return
this.jumpEvent = true
if (this.data.hasCarOwnerCouponFlag) { if (this.data.hasCarOwnerCouponFlag) {
wx.p.router.go(`/packageMall/pages/getCoupon/getCoupon?discoverGoodsType=2&from=2`, { notIntercept: true }); wx.p.router.go(`/packageMall/pages/getCoupon/getCoupon?discoverGoodsType=2&from=2`, { notIntercept: true });
return return
...@@ -244,12 +246,12 @@ Component({ ...@@ -244,12 +246,12 @@ Component({
goodsId: item.id, goodsId: item.id,
} }
let _para = { let _para = {
goodsList:deliveryType==1? goodsListItem:[goodsListItem], goodsList: [goodsListItem],
isCarOwner: true, isCarOwner: true,
showAddr: deliveryType==0?1:0, showAddr: deliveryType == 0 ? 1 : 0,
buyType: 'pay', buyType: 'pay',
discoverGoodsSource: item.discoverGoodsSource, discoverGoodsSource: item.discoverGoodsSource,
deliveryType:deliveryType deliveryType: 0
} }
wx.p.router.go('/packageDiscovery/pages/pay/index', _para) wx.p.router.go('/packageDiscovery/pages/pay/index', _para)
// const res = await shopmallApi.addShoppingcart(_para) // const res = await shopmallApi.addShoppingcart(_para)
...@@ -275,7 +277,9 @@ Component({ ...@@ -275,7 +277,9 @@ Component({
this.init() this.init()
}, },
init() { init() {
if (!this.jumpEvent) {
this.getCategoryList() this.getCategoryList()
}
// const B_userInfo = wx.p.storage.get('userInfo') // const B_userInfo = wx.p.storage.get('userInfo')
// if (B_userInfo && B_userInfo.userType) return // if (B_userInfo && B_userInfo.userType) return
// this.getBuyCarList() // this.getBuyCarList()
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!