|
|
@@ -324,15 +324,19 @@ export default {
|
|
|
this.popupShow = false;
|
|
|
},
|
|
|
buyAlbum(){
|
|
|
- let account = this.option.account ? this.option.account : 0
|
|
|
- this.$util.pageTo({url: "/pages/home/mall?account="+account+'&hdId='+this.hdId,type:2})
|
|
|
+ let account = this.option.account ? this.option.account : (uni.getStorageSync('account') || 0)
|
|
|
+ let realHdId = this.hdId || uni.getStorageSync('hdId') || 0
|
|
|
+ this.$util.pageTo({url: "/pages/home/mall?account="+account+'&hdId='+realHdId,type:2})
|
|
|
},
|
|
|
buyHs(){
|
|
|
- let account = this.option.account ? this.option.account : 0
|
|
|
- this.$util.pageTo({url: "/pages/home/category?account="+account+'&hdId='+this.hdId,type:2})
|
|
|
+ let account = this.option.account ? this.option.account : (uni.getStorageSync('account') || 0)
|
|
|
+ let realHdId = this.hdId || uni.getStorageSync('hdId') || 0
|
|
|
+ this.$util.pageTo({url: "/pages/home/category?account="+account+'&hdId='+realHdId,type:2})
|
|
|
},
|
|
|
showBigCover(item){
|
|
|
- this.$util.pageTo({url: "/pages/item/detail?id="+item.id+"&account="+this.option.account+'&hdId='+this.hdId})
|
|
|
+ let account = this.option.account ? this.option.account : (uni.getStorageSync('account') || 0)
|
|
|
+ let realHdId = this.hdId || uni.getStorageSync('hdId') || 0
|
|
|
+ this.$util.pageTo({url: "/pages/item/detail?id="+item.id+"&account="+account+'&hdId='+realHdId})
|
|
|
},
|
|
|
init(){
|
|
|
this.init = false
|
|
|
@@ -340,6 +344,12 @@ export default {
|
|
|
if(this.option.hdId && Number(this.option.hdId) > 0){
|
|
|
this.hdId = this.option.hdId
|
|
|
uni.setStorageSync('hdId', this.hdId)
|
|
|
+ } else {
|
|
|
+ // 兜底:如果URL中没有,尝试从缓存取
|
|
|
+ let cacheHdId = uni.getStorageSync('hdId')
|
|
|
+ if (cacheHdId && Number(cacheHdId) > 0) {
|
|
|
+ this.hdId = cacheHdId
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
const shopId = uni.getStorageSync('account')
|
|
|
@@ -525,17 +535,19 @@ export default {
|
|
|
this.$msg("有花材超出限购")
|
|
|
return
|
|
|
}
|
|
|
- this.limitBuyWarnList = []
|
|
|
- this.setLimitBuyInfoByType({ type: this.pageType, info: limitBuyInfo });
|
|
|
- this.setSelectInfoByType({ type: this.pageType, info: list });
|
|
|
- this.pageTo({url: '/pages/billing/affirmGhs?account='+account+'&hdId='+this.hdId,type:2})
|
|
|
- })
|
|
|
- } else {
|
|
|
- this.limitBuyWarnList = []
|
|
|
- this.setLimitBuyInfoByType({ type: this.pageType, info: [] });
|
|
|
- this.setSelectInfoByType({ type: this.pageType, info: list });
|
|
|
- this.pageTo({url: '/pages/billing/affirmGhs?account='+account+'&hdId='+this.hdId,type:2})
|
|
|
- }
|
|
|
+ this.limitBuyWarnList = []
|
|
|
+ this.setLimitBuyInfoByType({ type: this.pageType, info: limitBuyInfo });
|
|
|
+ this.setSelectInfoByType({ type: this.pageType, info: list });
|
|
|
+ let realHdId = this.hdId || uni.getStorageSync('hdId') || 0
|
|
|
+ this.pageTo({url: '/pages/billing/affirmGhs?account='+account+'&hdId='+realHdId,type:2})
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ this.limitBuyWarnList = []
|
|
|
+ this.setLimitBuyInfoByType({ type: this.pageType, info: [] });
|
|
|
+ this.setSelectInfoByType({ type: this.pageType, info: list });
|
|
|
+ let realHdId = this.hdId || uni.getStorageSync('hdId') || 0
|
|
|
+ this.pageTo({url: '/pages/billing/affirmGhs?account='+account+'&hdId='+realHdId,type:2})
|
|
|
+ }
|
|
|
} else {
|
|
|
this.$msg("请选择花材");
|
|
|
}
|