cancelAppointment.ts 810 B

123456789101112131415161718192021222324252627282930313233343536
  1. Page({
  2. data: {
  3. appointmentInfo: {
  4. operateTime: '',
  5. operateDuration: '',
  6. conditioningProgramSupplierName: '',
  7. cpSupplierDetailAddress: '',
  8. cpSupplierPhone: '',
  9. cpSupplierQrCode: '',
  10. },
  11. },
  12. onLoad(options: any) {
  13. if (options.appointmentInfo) {
  14. try {
  15. const appointmentInfo = JSON.parse(decodeURIComponent(options.appointmentInfo));
  16. this.setData({ appointmentInfo });
  17. this.generateQRCode(appointmentInfo?.cpSupplierQrCode || "");
  18. return;
  19. } catch (e) {
  20. // 解析失败
  21. }
  22. }
  23. },
  24. // 生成二维码
  25. generateQRCode(qrCodeUrl: any) {
  26. this.setData({
  27. qrCodeUrl
  28. });
  29. },
  30. onBack() {
  31. wx.redirectTo({
  32. url: `/module/care/pages/offlineTreatment/offlineTreatment`,
  33. });
  34. },
  35. });