index.js 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. "use strict";
  2. var _page = _interopRequireDefault(require("../../common/page"));
  3. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
  4. (0, _page["default"])({
  5. data: {
  6. switchTitle1: "包邮",
  7. switchTitle2: "团购",
  8. itemTitle: "筛选",
  9. option1: [{
  10. text: "全部商品",
  11. value: 0
  12. }, {
  13. text: "新款商品",
  14. value: 1
  15. }, {
  16. text: "活动商品",
  17. value: 2
  18. }],
  19. option2: [{
  20. text: "默认排序",
  21. value: "a"
  22. }, {
  23. text: "好评排序",
  24. value: "b"
  25. }, {
  26. text: "销量排序",
  27. value: "c"
  28. }],
  29. switch1: true,
  30. switch2: false,
  31. value1: 0,
  32. value2: "a"
  33. },
  34. onConfirm: function onConfirm() {
  35. this.selectComponent("#item").toggle();
  36. },
  37. onSwitch1Change: function onSwitch1Change(_ref) {
  38. var detail = _ref.detail;
  39. this.setData({
  40. switch1: detail
  41. });
  42. },
  43. onSwitch2Change: function onSwitch2Change(_ref2) {
  44. var detail = _ref2.detail;
  45. this.setData({
  46. switch2: detail
  47. });
  48. }
  49. });