WXL
11 小时以前 05c363fdd7ab04e3bd9a753e2c5d5bfff04d681c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
"use strict";
const common_vendor = require("../../common/vendor.js");
const _sfc_main = {
  __name: "case",
  setup(__props) {
    const case_ = common_vendor.ref({
      id: 1,
      title: "颈椎病针灸治疗案例",
      tag: "针灸治疗",
      doctor: "张医生",
      date: "2024-03-20",
      image: "/static/tcm/case1.jpg",
      patient: {
        gender: "女",
        age: 45,
        symptoms: "颈部疼痛、头晕、手麻",
        duration: "3个月"
      },
      process: `
    <p style="text-indent: 2em; margin-bottom: 1em;">患者因长期伏案工作,出现颈部疼痛、头晕、双手发麻等症状,经检查诊断为颈椎病。</p>
    <p style="text-indent: 2em; margin-bottom: 1em;">采用针灸配合推拿治疗,主要取穴包括风池、天柱、肩井等穴位,每次治疗约40分钟。</p>
  `,
      processImages: [
        "/static/tcm/process1.jpg",
        "/static/tcm/process2.jpg"
      ],
      effect: `
    <p style="text-indent: 2em; margin-bottom: 1em;">经过8次治疗,患者颈部疼痛明显缓解,头晕、手麻等症状基本消失,颈椎活动度明显改善。</p>
  `,
      beforeAfter: [
        {
          before: "/static/tcm/before1.jpg",
          after: "/static/tcm/after1.jpg"
        }
      ],
      review: {
        name: "张**",
        avatar: "/static/avatar/user1.jpg",
        time: "2024-03-20",
        content: "张医生技术很好,态度也很亲切。经过治疗后,困扰我多时的颈椎问题得到了很大改善,现在工作生活都舒服多了。"
      },
      relatedProjects: [
        {
          id: 1,
          name: "针灸治疗",
          price: 300,
          image: "/static/tcm/acupuncture.jpg"
        },
        {
          id: 2,
          name: "推拿理疗",
          price: 200,
          image: "/static/tcm/massage.jpg"
        }
      ]
    });
    const previewImage = (index, type) => {
      const images = case_.value.processImages;
      common_vendor.index.previewImage({
        urls: images,
        current: index
      });
    };
    const previewCompare = (index, type) => {
      const images = case_.value.beforeAfter.map((item) => item[type]);
      common_vendor.index.previewImage({
        urls: images,
        current: index
      });
    };
    const viewProject = (project) => {
      common_vendor.index.navigateTo({
        url: `/pages/featured/project?id=${project.id}`
      });
    };
    const showConsult = () => {
      common_vendor.index.showModal({
        title: "提示",
        content: "是否开始在线咨询?",
        success: (res) => {
          if (res.confirm)
            ;
        }
      });
    };
    const makeAppointment = () => {
      common_vendor.index.navigateTo({
        url: `/pages/appointment/department?type=tcm&case=${case_.value.id}`
      });
    };
    common_vendor.onMounted(() => {
      var _a;
      const pages = getCurrentPages();
      const page = pages[pages.length - 1];
      const { id } = ((_a = page.$page) == null ? void 0 : _a.options) || {};
      common_vendor.index.__f__("log", "at pages/featured/case.vue:225", "加载案例详情:", id);
    });
    return (_ctx, _cache) => {
      var _a, _b, _c, _d;
      return common_vendor.e({
        a: case_.value.image,
        b: common_vendor.t(case_.value.title),
        c: common_vendor.t(case_.value.tag),
        d: common_vendor.t(case_.value.doctor),
        e: common_vendor.t(case_.value.date),
        f: common_vendor.t(case_.value.patient.gender),
        g: common_vendor.t(case_.value.patient.age),
        h: common_vendor.t(case_.value.patient.symptoms),
        i: common_vendor.t(case_.value.patient.duration),
        j: case_.value.process,
        k: (_a = case_.value.processImages) == null ? void 0 : _a.length
      }, ((_b = case_.value.processImages) == null ? void 0 : _b.length) ? {
        l: common_vendor.f(case_.value.processImages, (image, index, i0) => {
          return {
            a: index,
            b: image,
            c: common_vendor.o(($event) => previewImage(index), index)
          };
        })
      } : {}, {
        m: case_.value.effect,
        n: (_c = case_.value.beforeAfter) == null ? void 0 : _c.length
      }, ((_d = case_.value.beforeAfter) == null ? void 0 : _d.length) ? {
        o: common_vendor.f(case_.value.beforeAfter, (item, index, i0) => {
          return {
            a: item.before,
            b: common_vendor.o(($event) => previewCompare(index, "before"), index),
            c: item.after,
            d: common_vendor.o(($event) => previewCompare(index, "after"), index),
            e: index
          };
        })
      } : {}, {
        p: case_.value.review.avatar,
        q: common_vendor.t(case_.value.review.name),
        r: common_vendor.t(case_.value.review.time),
        s: common_vendor.f(5, (n, k0, i0) => {
          return {
            a: n
          };
        }),
        t: common_vendor.t(case_.value.review.content),
        v: common_vendor.f(case_.value.relatedProjects, (item, index, i0) => {
          return {
            a: item.image,
            b: common_vendor.t(item.name),
            c: common_vendor.t(item.price),
            d: index,
            e: common_vendor.o(($event) => viewProject(item), index)
          };
        }),
        w: common_vendor.o(showConsult),
        x: common_vendor.o(makeAppointment),
        y: common_vendor.gei(_ctx, "")
      });
    };
  }
};
wx.createPage(_sfc_main);
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/featured/case.js.map