修正佛前供灯bug

This commit is contained in:
2022-03-09 11:20:20 +08:00
parent c0b25db38d
commit da1287d13e
3 changed files with 20 additions and 6 deletions
+8 -5
View File
@@ -87,7 +87,7 @@
</div>
</transition>
<div class="next-group">
<span class="total">合计:<em>¥{{lightSize.price || 0}}</em></span>
<span class="total">合计:<em>¥{{totalPrice}}</em></span>
<button class="next" @click="onNextStep">下一步</button>
</div>
</div>
@@ -122,7 +122,6 @@ export default {
value: '',
spec_id: '',
step: 0,
quantity: 1,
dreamInfo: null,
anyPrice: 0, // 随喜金额
swiperOption: {
@@ -163,6 +162,10 @@ export default {
lights.push(goods.slice(0 * i, 0 * i + 15))
}
return lights;
},
totalPrice(){
if(!this.lightSize) return 0;
return this.lightSize.price * this.buy_quantity
}
},
mounted(){
@@ -202,10 +205,10 @@ export default {
goods_id: this.currentLight.id,
spec_id: this.lightSize.id,
friendly_time: this.number,
quantity: this.quantity,
quantity: this.buy_quantity,
title: this.data.details.title,
subTitle: this.currentLight.name + ':'+this.lightSize.name,
amount: this.lightSize.price,
amount: this.totalPrice,
from: 'goods_light', // 标识为通用商品
}
})
@@ -227,7 +230,7 @@ export default {
// 获取感恩功德
async getPayRecords(lType){
this.listType = lType.id;
const res = await getOrderCompare(this.query.temple_id, this.listType, this.query.goods_id, 3 );
const res = await getOrderCompare(this.query.temple_id, this.listType, this.query.goods_id, 5 );
console.log('pay record', res)
this.payList = res.list;
},
+11
View File
@@ -39,6 +39,17 @@ export default {
this.$router.replace({ name: 'merit-box', query: { temple_id: this.query.temple_id , open_box: 1}})
return
}
// 佛前供灯再结善缘
if(this.query.from === 'goods_light'){
this.$router.replace({
name: 'goods-light-detail',
query: {
goods_type: this.query.goods_type,
temple_id: this.query.temple_id,
}
})
return
}
const { goods_type, goods_id, temple_id, spec_ids } = this.query;
this.onPushToGoodsDetail(goods_type, goods_id, temple_id, spec_ids)
}
+1 -1
View File
File diff suppressed because one or more lines are too long