Commit 696d32dc authored by Mac's avatar Mac

优惠券跳转修改

parent ac83def6
......@@ -59,7 +59,7 @@ export default {
loading: false,
coupon_id:0,
isreceive:false,
type:0
type:0,//type 1是优惠券列表来的 2 是领券中心来的
};
},
......@@ -113,14 +113,18 @@ export default {
);
},
gouseUrl(g){
let id
if(this.type == 1){
id = g.ID
}else if(this.type == 2){
id = g.CouponId
let data = []
if(g.UseType==1 || g.UseType==2){
g.ProductList.forEach(x=>{
data.push(x.ProductId)
})
let id = data.toString()
uni.redirectTo({ url: '/pages/goods/list?coupon_id='+ id+'&UseType='+g.UseType });
}else{
uni.redirectTo({ url: '/pages/goods/list'});
}
uni.redirectTo({ url: '/pages/goods/list?coupon_id='+ id});
}
},
......
......@@ -93,8 +93,15 @@
onLoad(option) {
this.mainColor = this.$uiConfig.mainColor;
this.catId = option.cat_id;
if (option.coupon_id != undefined) {
this.coupon_id = option.coupon_id //优惠券带过来的参数
if (option && option.coupon_id && option.UseType) {//优惠券带过来的参数
console.log(option.coupon_id)
if(option.UseType==1){
this.msg.CategoryIds = option.coupon_id
}else if(option.UseType==2){
this.msg.GoodsIds = option.coupon_id
}
}
if (option.CategoryIds) {
this.msg.CategoryIds = option.CategoryIds;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment