Commit 5373dce0 by 高淑倩

订单_ 优惠券

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