|
|
|
@ -209,11 +209,17 @@ |
|
|
|
</view> |
|
|
|
|
|
|
|
<view> |
|
|
|
<!-- totalnum 商品价格 --> |
|
|
|
<!-- 最低多少钱才能使用的优惠券 item.min_goods_amount --> |
|
|
|
<view class="select_cop" |
|
|
|
v-show="current!=index &&item.use==true&& (parseFloat(item.min_goods_amount) < totalnum ||parseFloat(item.min_goods_amount) ==totalnum) && bonus != item.type_money "> |
|
|
|
<image src="../../static/icon/flase.png" @click="current=index,useCoupons(index,item)"> |
|
|
|
</image> |
|
|
|
</view> |
|
|
|
<!-- 优惠价的价格 bonus --> |
|
|
|
<!-- 优惠价的价格 item.type_money --> |
|
|
|
<!-- 选中的 current --> |
|
|
|
<!-- 序列 index --> |
|
|
|
<view class="select_cop" v-show="current == index || bonus == item.type_money"> |
|
|
|
<image src="../../static/icon/true.png" |
|
|
|
@click="current=-1,bonus=0,total.bonus = 0,useCoupons(index,item)"></image> |
|
|
|
@ -303,7 +309,7 @@ |
|
|
|
goods_list: [], |
|
|
|
shipping_list: [], |
|
|
|
bonus_list: [], |
|
|
|
bonus: 0, |
|
|
|
bonus: 0, // 优惠价的价格 |
|
|
|
total: {}, |
|
|
|
order: { |
|
|
|
shipping_id: 11 |
|
|
|
@ -319,7 +325,7 @@ |
|
|
|
use: true, |
|
|
|
nouse: false, |
|
|
|
bouns_id: '', |
|
|
|
totalnum: 0, |
|
|
|
totalnum: 0, // 价格 |
|
|
|
|
|
|
|
} |
|
|
|
}, |
|
|
|
@ -369,14 +375,11 @@ |
|
|
|
console.log(this.current + '=====================') |
|
|
|
// this.bouns_id = item.bonus_id |
|
|
|
console.log(total) |
|
|
|
console.log(item) |
|
|
|
|
|
|
|
if (this.current == index) { |
|
|
|
this.bonus = item.type_money |
|
|
|
console.log(this.bonus) |
|
|
|
console.log(item.type_money) |
|
|
|
console.log(this.total.bonus) |
|
|
|
this.total.bonus = item.type_money |
|
|
|
console.log(this.total.bonus) |
|
|
|
let id = item.bonus_id |
|
|
|
this.bouns_id = item.bonus_id |
|
|
|
let data = { |
|
|
|
@ -594,7 +597,7 @@ |
|
|
|
this.total = res.data.total |
|
|
|
//console.log(this.total) |
|
|
|
this.totalnum = this.total.amount |
|
|
|
// console.log(typeof(this.totalnum)) |
|
|
|
console.log(typeof(this.totalnum)) |
|
|
|
uni.setStorageSync('total', (res.data.total)) |
|
|
|
this.order = res.data.order |
|
|
|
// console.log(res.data) |
|
|
|
@ -643,7 +646,7 @@ |
|
|
|
////////console.info(res) |
|
|
|
if (res.error == 0) { |
|
|
|
this.list = res.data |
|
|
|
console.log(this.list + '===========sasass'); |
|
|
|
console.log(this.list); |
|
|
|
////console.log(this.list[0].type_money) |
|
|
|
// this.bonus = this.list[0].type_money |
|
|
|
// console.log(this.total.amount) |
|
|
|
@ -653,7 +656,13 @@ |
|
|
|
let hb_time = new Date(Date.parse(item.use_end_date)) |
|
|
|
// console.log(new Date(Date.parse(item.use_end_date))) |
|
|
|
item.use = hb_time > new Date(Date.parse(today)) |
|
|
|
// console.log(item.use); |
|
|
|
// console.log('item-use'); |
|
|
|
// this.list = [] |
|
|
|
|
|
|
|
console.log(item.use); |
|
|
|
console.log(item); |
|
|
|
console.log(111111111111111); |
|
|
|
list.push(item) |
|
|
|
this.list = list |
|
|
|
if (parseFloat(item.min_goods_amount) < this.totalnum) { |
|
|
|
@ -663,13 +672,16 @@ |
|
|
|
}) |
|
|
|
|
|
|
|
if (list2.length > 0) { |
|
|
|
let max = 0 |
|
|
|
let max = 0; |
|
|
|
for (let i = 0; i < list2.length; i++) { |
|
|
|
if (max < list2[i].type_money) { |
|
|
|
max = list2[i].type_money |
|
|
|
let num = parseInt(list2[i].type_money); |
|
|
|
if (num > max) { |
|
|
|
max = num; |
|
|
|
} |
|
|
|
} |
|
|
|
this.bonus = max |
|
|
|
console.log(list2); |
|
|
|
console.log(max); |
|
|
|
this.bonus = max.toFixed(2) |
|
|
|
this.isusebonus = 1 |
|
|
|
} else if (list2.length == 0) { |
|
|
|
this.isusebonus = 0 |
|
|
|
@ -814,7 +826,7 @@ |
|
|
|
////console.log(e.orderId) |
|
|
|
|
|
|
|
// this.getList(query2) |
|
|
|
|
|
|
|
// this.useCoupons() |
|
|
|
}, |
|
|
|
onShow(e) { |
|
|
|
// this.query=JSON.parse(e.query) |
|
|
|
|