index.js 505 B

123456789101112131415161718192021222324252627282930313233
  1. import { createSubscribe } from 'applet-page-component';
  2. import { getRemind } from '../utils/service';
  3. Component(createSubscribe({
  4. onShow() {
  5. this.getRemindInfo();
  6. }
  7. })({
  8. props: {
  9. show: false,
  10. componentData: {}
  11. },
  12. data: {
  13. remindInfo: null
  14. },
  15. didMount() {
  16. this.getRemindInfo();
  17. },
  18. methods: {
  19. async getRemindInfo() {
  20. const [, res] = await getRemind({});
  21. if (res) {
  22. this.setData({
  23. remindInfo: res
  24. });
  25. }
  26. }
  27. }
  28. }));