success-page.ts 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. import PageContainerBehavior from "../../../../core/behavior/page-container.behavior";
  2. import tickleBehavior, { getTickleContext } from "../../../../core/behavior/tickle.behavior";
  3. import { getDietMethod } from "../../request";
  4. // module/diet/pages/delivery-address/delivery-address.ts
  5. Page({
  6. behaviors: [
  7. PageContainerBehavior,
  8. tickleBehavior,
  9. ],
  10. lifetimes: {
  11. attached() {
  12. }
  13. },
  14. properties: {
  15. },
  16. data: {
  17. title: '',
  18. successImg: 'https://wx.hzliuzhi.com:4433/manager/file/statics/2025/07/11/img_success@3x_20250711171518A500.png',
  19. },
  20. onLoad(options: any) {
  21. console.log(options, "options");
  22. if (options.title) {
  23. this.setData({ title: options.title });
  24. }
  25. },
  26. onBackOrderList() {
  27. wx.redirectTo({ url: '/module/article/pages/order-list/order-list' });
  28. },
  29. async load() {
  30. wx.showLoading({ title: '加载中' });
  31. try {
  32. const dataset = await getDietMethod(this.data.id);
  33. this.setData({ dataset, title: dataset.name });
  34. } catch (error) {
  35. getTickleContext.call(this).showWarnMessage(error.errMsg);
  36. }
  37. wx.hideLoading();
  38. },
  39. })