coupon-select.js
679 Bytes
import OrderListService from '../../pages/orderList/orderListService.js';
import OrderActionService from './orderActionService.js';
import event from '../../utils/event';
Component({
properties: {
show: {
type: Boolean,
value: false
},
coupons: {
type: Array,
value: [{value: 100}, {value: 200}, {value: 200}, {value: 200}, {value: 200}, {value: 200}]
}
},
data: {
},
methods: {
confirm: function () {
if (this.data.coupons.length) {
this.triggerEvent('confirmselect')
} else {
this.triggerEvent('cancel')
}
},
cancel: function () {
this.triggerEvent('cancel')
}
}
});