11
This commit is contained in:
parent
afd6b44644
commit
6738f0e5c9
@ -298,6 +298,7 @@ export default {
|
|||||||
boxshadow2: false,
|
boxshadow2: false,
|
||||||
id: "",
|
id: "",
|
||||||
groupById: "",
|
groupById: "",
|
||||||
|
promotional_price: "", //活动价
|
||||||
info: "",
|
info: "",
|
||||||
currentIndex: "1", //当前轮播图
|
currentIndex: "1", //当前轮播图
|
||||||
|
|
||||||
@ -579,6 +580,8 @@ export default {
|
|||||||
|
|
||||||
// 使用完整的商品数据对象,而不是itemObj
|
// 使用完整的商品数据对象,而不是itemObj
|
||||||
this.currentGG = this.info.commodity_goods_info_list[this.currentGGIndex];
|
this.currentGG = this.info.commodity_goods_info_list[this.currentGGIndex];
|
||||||
|
// 将promotional_price赋值给sales_price
|
||||||
|
this.currentGG.sales_price = this.promotional_price;
|
||||||
|
|
||||||
// 设置相关属性
|
// 设置相关属性
|
||||||
this.changeImg = this.currentGG.commodity_pic[0];
|
this.changeImg = this.currentGG.commodity_pic[0];
|
||||||
@ -611,6 +614,8 @@ export default {
|
|||||||
// 切换规格
|
// 切换规格
|
||||||
changeGG(item, index) {
|
changeGG(item, index) {
|
||||||
this.currentGG = item;
|
this.currentGG = item;
|
||||||
|
// 将promotional_price赋值给sales_price
|
||||||
|
this.currentGG.sales_price = this.promotional_price;
|
||||||
this.currentGGIndex = index;
|
this.currentGGIndex = index;
|
||||||
if (this.currentGG.cart_count) {
|
if (this.currentGG.cart_count) {
|
||||||
this.currentNum = this.currentGG.cart_count.count;
|
this.currentNum = this.currentGG.cart_count.count;
|
||||||
@ -619,7 +624,7 @@ export default {
|
|||||||
}
|
}
|
||||||
this.changeImg = item.commodity_pic[0]
|
this.changeImg = item.commodity_pic[0]
|
||||||
this.changeName = item.goods_alias
|
this.changeName = item.goods_alias
|
||||||
this.changePrice = item.sales_price
|
this.changePrice = this.currentGG.sales_price
|
||||||
},
|
},
|
||||||
car() {
|
car() {
|
||||||
const item = {
|
const item = {
|
||||||
@ -662,6 +667,7 @@ export default {
|
|||||||
goods_id:
|
goods_id:
|
||||||
this.info.commodity_goods_info_list[this.currentGGIndex].id,
|
this.info.commodity_goods_info_list[this.currentGGIndex].id,
|
||||||
count: countVal,
|
count: countVal,
|
||||||
|
price: this.changePrice
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
group_buy_id: this.info.commodity_goods_info_list[this.currentGGIndex].group_buy_activity_id,
|
group_buy_id: this.info.commodity_goods_info_list[this.currentGGIndex].group_buy_activity_id,
|
||||||
@ -774,6 +780,7 @@ export default {
|
|||||||
this.localHeight = meun.height;
|
this.localHeight = meun.height;
|
||||||
this.id = this.itemObj.commodity_id ? this.itemObj.commodity_id : this.itemObj.id;
|
this.id = this.itemObj.commodity_id ? this.itemObj.commodity_id : this.itemObj.id;
|
||||||
this.groupById = this.itemObj.groupById
|
this.groupById = this.itemObj.groupById
|
||||||
|
this.promotional_price = this.itemObj.promotional_price
|
||||||
this.getBuyRecord()
|
this.getBuyRecord()
|
||||||
this.getEndTheCountdown(this.endTime)
|
this.getEndTheCountdown(this.endTime)
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user