Fix:5498 【商城小程序】将抽奖商品加入购物车,从购物车进商品详情页,点击【送给朋友】仍可使用优惠券,改为不可使用
This commit is contained in:
@@ -732,6 +732,7 @@ export default {
|
||||
console.log("getLaunchOptionsSync", uni.getLaunchOptionsSync())
|
||||
console.log("getEnterOptionsSync", uni.getEnterOptionsSync())
|
||||
uni.removeStorageSync('couponId')
|
||||
const pageQuery = Object.assign({}, this.resolvePageQuery(), options || {})
|
||||
const from = options.from
|
||||
const id = options.id
|
||||
switch (from) {
|
||||
@@ -779,10 +780,10 @@ export default {
|
||||
if (url && url.productId) {
|
||||
this.id = url.productId
|
||||
} else if (options.id) {
|
||||
this.id = options.id || null
|
||||
this.partnerId = options.partnerId || null
|
||||
this.activityId = this._route.query.activityId
|
||||
this.source = this._route.query.from || ''
|
||||
this.id = pageQuery.id || options.id || null
|
||||
this.partnerId = pageQuery.partnerId || options.partnerId || null
|
||||
this.activityId = Number(pageQuery.activityId || pageQuery.drawActivityId || 0)
|
||||
this.source = pageQuery.from || ''
|
||||
} else {
|
||||
const obj = uni.getEnterOptionsSync()
|
||||
if (options.scene != null || obj.query.scene != null) {
|
||||
@@ -847,6 +848,18 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
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 {}
|
||||
},
|
||||
gift() {
|
||||
this.goCat(2)
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user