index.js 568 B

1234567891011121314151617181920212223242526272829
  1. var t = require("../../utils/public");
  2. Component({
  3. properties: {
  4. goodsDetail: Object,
  5. goodsStatus: {
  6. type: Number,
  7. value: null
  8. },
  9. cartNum: {
  10. type: Number,
  11. value: 0,
  12. observer: function(t) {
  13. console.log(t);
  14. }
  15. }
  16. },
  17. methods: {
  18. addToCart: function(e) {
  19. (0, t.collectFormIds)(e.detail.formId), this.triggerEvent("on-addToCart");
  20. },
  21. balance: function() {
  22. this.triggerEvent("on-balance");
  23. },
  24. submit: function(e) {
  25. (0, t.collectFormIds)(e.detail.formId);
  26. }
  27. }
  28. });