index.js 723 B

12345678910111213141516171819202122232425262728293031323334
  1. Component({
  2. properties: {
  3. goodDetail: {
  4. type: Object,
  5. value: {
  6. spuImages: [],
  7. spuName: "",
  8. limitMemberNum: 0,
  9. limitOrderNum: 0,
  10. quantity: 0,
  11. stockNum: 0,
  12. targetTime: "",
  13. integerPrice: "0",
  14. decimalPrice: "0"
  15. }
  16. },
  17. showTitle: String,
  18. endTime: String
  19. },
  20. data: {
  21. showDay: true,
  22. showTitle: ""
  23. },
  24. methods: {
  25. actEnd: function () {
  26. var t = void 0;
  27. "willSale" === this.data.showTitle ? (this.setData({
  28. showTitle: "onSale"
  29. }), t = 0) : "onSale" === this.data.showTitle && (this.setData({
  30. showTitle: "endSale"
  31. }), t = 2), this.triggerEvent("actEnd", t);
  32. }
  33. }
  34. });