Commit 5373dce0 by 高淑倩

订单_ 优惠券

parent 7c3a16ae
......@@ -7,9 +7,13 @@ Component({
show: { // 显示标识
type: Boolean,
value: false
},
couponList: {
type: Array,
value: [],
observer: '_couponList'
}
},
/**
* 组件的初始数据
*/
......@@ -21,6 +25,19 @@ Component({
* 组件的方法列表
*/
methods: {
_couponList(newV, oldV) {
console.log('newV, oldV', newV)
if (newV !== oldV) {
this._updateData({
couponList: newV
})
}
},
_updateData(data) {
if (data) {
this.setData(data)
}
},
selectCoupon() {
console.log('2222')
// 当前优惠券价格
......
<view class="modal-container{{show ? ' active' : ''}}" bindtap="hidePopup"></view>
<view class="modal-content{{show ? ' active' : ''}}">
<!--{{couponList}}-->
<view class="modal-header">
<image src="/assets/imgs/7_1_0/arrow-right.png" class="modal-to-back" mode="widthFix"></image>
<text class="modal-title">选择优惠券</text>
......
......@@ -160,5 +160,5 @@
</view>
<!--goHome-->
<go-home/>
<select-coupon show="{{showSelectCoupon}}" />
<select-coupon show="{{showSelectCoupon}}" coupon-list="{{currentOrderList.couponDiscountPreviews}}"/>
......@@ -39,7 +39,7 @@
"list": []
},
"miniprogram": {
"current": 44,
"current": 17,
"list": [
{
"id": -1,
......
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