Commit 4a6857f1 authored by qipeng's avatar qipeng

我的影集 新增接口 优惠券

parent 5d9cf187
...@@ -166,6 +166,7 @@ export default { ...@@ -166,6 +166,7 @@ export default {
favorablePrice:0,//优惠 favorablePrice:0,//优惠
priceNum:0,//选购了多少照片 priceNum:0,//选购了多少照片
merchantMessage:[],//景区基础参数 merchantMessage:[],//景区基础参数
masterSlaveCouponList:[],//优惠券
} }
}, },
onLoad(option) { onLoad(option) {
...@@ -243,8 +244,10 @@ export default { ...@@ -243,8 +244,10 @@ export default {
this.previewData = res.data this.previewData = res.data
this.previewData.forEach((item,index)=>{ this.previewData.forEach((item,index)=>{
item['checkType'] = false item['checkType'] = false
this.originalPrice = item.originalPrice//原价. if(item.sellingPrice!=null){
this.sellingPrice = item.sellingPrice//售价 this.originalPrice = item.originalPrice//原价.
this.sellingPrice = item.sellingPrice//售价
}
item['image']=item.faceSourceUrl||item.faceAiUrl item['image']=item.faceSourceUrl||item.faceAiUrl
item['title']='' item['title']=''
}) })
...@@ -312,10 +315,34 @@ export default { ...@@ -312,10 +315,34 @@ export default {
if(item.checkType==true){ if(item.checkType==true){
this.originalPrices += item.originalPrice//原价 this.originalPrices += item.originalPrice//原价
this.sellingPrices += item.sellingPrice//售价 this.sellingPrices += item.sellingPrice//售价
console.log(item.sellingPrice)
this.priceNum++ this.priceNum++
} }
}) })
//金额是否达到优惠券资格
var data = {
openid:this.openid,//用户ID
money:this.sellingPrices,//当前选购金额
singleMoney:this.sellingPrices,//当前选购金额
merchantId:this.merchantMessage[0].merchantId,
tickets:1,
productId:this.merchantMessage[0].merchantExtendProjectId,
}
this.$request('wechatUser/myPage/usableCouponList',data).then((res)=>{
if(res.code=='00'){
res.data.masterSlaveCouponList.forEach(item=>{
item['couponPrice']=item.deductPrice
})
this.masterSlaveCouponList = res.data.masterSlaveCouponList
this.favorablePrice = this.masterSlaveCouponList[0].deductPrice
this.sellingPrices = this.sellingPrices-this.masterSlaveCouponList[0].deductPrice
}else{
this.$refs.uToast.show({
title: res.message,
type: 'error',
})
}
})
}, },
projectMoreFun() { //更多产品显示 projectMoreFun() { //更多产品显示
if (this.projectMoreType == false) { if (this.projectMoreType == false) {
...@@ -350,7 +377,10 @@ export default { ...@@ -350,7 +377,10 @@ export default {
extendContent:'', extendContent:'',
unitPrice:this.sellingPrice,//产品单价 unitPrice:this.sellingPrice,//产品单价
orderImgList:[],////订单图片 orderImgList:[],////订单图片
couponList:[],//券信息
} }
orderProductListData.couponList.push(this.masterSlaveCouponList[0])
this.previewData.forEach((item,index)=>{ this.previewData.forEach((item,index)=>{
if(item.checkType==true){ if(item.checkType==true){
var imgList = { var imgList = {
......
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