appointment-success.ts 926 B

12345678910111213141516171819202122232425262728
  1. import PageContainerBehavior from "../../../../core/behavior/page-container.behavior";
  2. import DictionariesBehavior from "../../../../core/behavior/dictionaries.behavior";
  3. import tickleBehavior from "../../../../core/behavior/tickle.behavior";
  4. // module/order/pages/appointment-success/appointment-success.ts
  5. Page({
  6. behaviors: [PageContainerBehavior, DictionariesBehavior, tickleBehavior],
  7. data: {
  8. appointmentInfo: {
  9. },
  10. },
  11. onLoad(options: any) {
  12. if(options.goodsInfo){
  13. const goodsInfo = JSON.parse(decodeURIComponent(options.goodsInfo));
  14. this.setData({
  15. appointmentInfo: goodsInfo,
  16. });
  17. }
  18. },
  19. // 返回非药物治疗页面
  20. onReturn() {
  21. // 返回到非药物治疗页面,传递预约成功参数
  22. const { appointmentInfo } = this.data;
  23. wx.redirectTo({
  24. url: `/module/care/pages/offlineTreatment/offlineTreatment?id=${appointmentInfo?.id}`,
  25. });
  26. },
  27. })