index.js 884 B

12345678910111213141516171819202122232425262728293031323334
  1. "use strict";
  2. var _page = _interopRequireDefault(require("../../common/page"));
  3. var _toast = _interopRequireDefault(require("../../dist/toast/toast"));
  4. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
  5. (0, _page["default"])({
  6. data: {
  7. time: 30 * 60 * 60 * 1000,
  8. timeData: {}
  9. },
  10. onChange: function onChange(e) {
  11. this.setData({
  12. timeData: e.detail
  13. });
  14. },
  15. start: function start() {
  16. var countDown = this.selectComponent(".control-count-down");
  17. countDown.start();
  18. },
  19. pause: function pause() {
  20. var countDown = this.selectComponent(".control-count-down");
  21. countDown.pause();
  22. },
  23. reset: function reset() {
  24. var countDown = this.selectComponent(".control-count-down");
  25. countDown.reset();
  26. },
  27. finished: function finished() {
  28. (0, _toast["default"])("倒计时结束");
  29. }
  30. });