Fix:5397 【商城小程序】商品链接,连续快速点击“送给朋友”,重复弹出多个送礼页面
(cherry picked from commit 6d963a5bc0)
This commit is contained in:
@@ -398,7 +398,8 @@ export default {
|
||||
pageKeyId: Object.freeze('orderConfirm'),
|
||||
total: 0,
|
||||
couponTitle: '',
|
||||
hasCoupon: false
|
||||
hasCoupon: false,
|
||||
pageQuery: {}
|
||||
}
|
||||
},
|
||||
computed: mapGetters(["userInfo", "storeItems"]),
|
||||
@@ -417,17 +418,18 @@ export default {
|
||||
},
|
||||
onLoad(opts) {
|
||||
const that = this
|
||||
if (that.$yroute.query.pinkid !== undefined) {
|
||||
that.pinkId = that.$yroute.query.pinkid
|
||||
that.pageQuery = Object.assign({}, that.resolvePageQuery(), opts || {})
|
||||
if (that.pageQuery.pinkid !== undefined) {
|
||||
that.pinkId = that.pageQuery.pinkid
|
||||
}
|
||||
if (that.$yroute.query.id !== undefined) {
|
||||
that.cartid = that.$yroute.query.id
|
||||
if (that.pageQuery.id !== undefined) {
|
||||
that.cartid = that.pageQuery.id
|
||||
console.log(that.cartid)
|
||||
}
|
||||
if (that.$yroute.query.lotteryRecordId !== undefined) {
|
||||
that.lotteryRecordId = that.$yroute.query.lotteryRecordId
|
||||
if (that.pageQuery.lotteryRecordId !== undefined) {
|
||||
that.lotteryRecordId = that.pageQuery.lotteryRecordId
|
||||
}
|
||||
that.hasCoupon = opts.couponId !== ''
|
||||
that.hasCoupon = !!(opts && opts.couponId !== '')
|
||||
that.getCartInfo()
|
||||
},
|
||||
onShow() {
|
||||
@@ -452,14 +454,26 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
isNullOrEmpty,
|
||||
resolvePageQuery() {
|
||||
if (this.$yroute && this.$yroute.query) {
|
||||
return this.$yroute.query
|
||||
}
|
||||
if (this.$route && this.$route.query) {
|
||||
return this.$route.query
|
||||
}
|
||||
if (this._route && this._route.query) {
|
||||
return this._route.query
|
||||
}
|
||||
return {}
|
||||
},
|
||||
isLotteryOrder() {
|
||||
const cartInfo = Array.isArray(this.orderGroupInfo && this.orderGroupInfo.cartInfo)
|
||||
? this.orderGroupInfo.cartInfo
|
||||
: []
|
||||
return Boolean(
|
||||
this.lotteryRecordId ||
|
||||
this.$yroute.query.from === 'countyLottery' ||
|
||||
Number(this.$yroute.query.drawActivityId || 0) > 0 ||
|
||||
this.pageQuery.from === 'countyLottery' ||
|
||||
Number(this.pageQuery.drawActivityId || 0) > 0 ||
|
||||
cartInfo.some(item => Number(
|
||||
item.drawActivityId ||
|
||||
(item.productInfo && item.productInfo.drawActivityId) ||
|
||||
@@ -567,8 +581,8 @@ export default {
|
||||
}
|
||||
_this.systemStore = data.systemStore || {}
|
||||
_this.storeSelfMention = data.storeSelfMention
|
||||
if(_this.$yroute.query.address !== undefined ) {
|
||||
_this.addressInfo = JSON.parse(_this.$yroute.query.address) || {}
|
||||
if(_this.pageQuery.address !== undefined ) {
|
||||
_this.addressInfo = JSON.parse(_this.pageQuery.address) || {}
|
||||
_this.computedPrice()
|
||||
} else {
|
||||
// _this.addressInfo = uni.getStorageSync('sourceAddress') || data.addressInfo || {}
|
||||
|
||||
Reference in New Issue
Block a user