coupon.js 451 B

123456789101112131415161718192021222324252627282930
  1. // component/coupon/coupon.js
  2. Component({
  3. /**
  4. * 组件的属性列表
  5. */
  6. properties: {
  7. info: Object,
  8. goods: String|Object,
  9. type: {
  10. type: Number,
  11. value: 1
  12. } //1领取 2使用
  13. },
  14. /**
  15. * 组件的初始数据
  16. */
  17. data: {
  18. },
  19. /**
  20. * 组件的方法列表
  21. */
  22. methods: {
  23. couponTap(e){
  24. this.triggerEvent('couponTap',{info: this.data.info,type:e.currentTarget.dataset.type})
  25. }
  26. }
  27. })