WXL
13 小时以前 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
"use strict";
const common_vendor = require("../../common/vendor.js");
const _sfc_main = {
  __name: "detail",
  setup(__props) {
    const news = common_vendor.ref({
      id: 1,
      title: "青岛镜湖医院引进最新达芬奇手术机器人,提升微创手术水平",
      tag: "医院动态",
      time: "2024-03-25 10:30",
      views: 1580,
      image: "/static/news/news1.jpg",
      content: `
    <p style="text-indent: 2em; margin-bottom: 1em;">近日,青岛镜湖医院正式引进第四代达芬奇手术机器人系统,这标志着医院在微创手术领域迈入新的里程碑。</p>
    <p style="text-indent: 2em; margin-bottom: 1em;">达芬奇手术机器人系统是目前全球最先进的微创手术平台之一,具有三维高清视觉系统、灵活的机械臂和精准的操作系统等优势。</p>
    <p style="text-indent: 2em; margin-bottom: 1em;">医院外科主任表示,引进达芬奇手术机器人后,将进一步提升医院在泌尿外科、胸外科、妇科等领域的微创手术水平,为患者提供更精准、更安全的手术治疗方案。</p>
  `,
      images: [
        "/static/news/robot1.jpg",
        "/static/news/robot2.jpg",
        "/static/news/robot3.jpg"
      ],
      liked: false,
      related: [
        {
          id: 2,
          title: "春季养生指南:中医专家教你调理身体",
          image: "/static/news/news2.jpg",
          tag: "健康科普",
          time: "2024-03-24"
        },
        {
          id: 3,
          title: '医院举办"世界睡眠日"主题义诊活动',
          image: "/static/news/news3.jpg",
          tag: "活动资讯",
          time: "2024-03-23"
        }
      ]
    });
    const previewImage = (index) => {
      common_vendor.index.previewImage({
        urls: news.value.images,
        current: index
      });
    };
    const toggleLike = () => {
      news.value.liked = !news.value.liked;
      common_vendor.index.showToast({
        title: news.value.liked ? "点赞成功" : "已取消点赞",
        icon: "none"
      });
    };
    const viewNews = (item) => {
      common_vendor.index.navigateTo({
        url: `/pages/news/detail?id=${item.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/news/detail.vue:154", "加载资讯详情:", id);
    });
    return (_ctx, _cache) => {
      var _a, _b;
      return common_vendor.e({
        a: common_vendor.t(news.value.title),
        b: news.value.tag
      }, news.value.tag ? {
        c: common_vendor.t(news.value.tag)
      } : {}, {
        d: common_vendor.t(news.value.time),
        e: common_vendor.t(news.value.views),
        f: news.value.image
      }, news.value.image ? {
        g: news.value.image
      } : {}, {
        h: news.value.content,
        i: (_a = news.value.images) == null ? void 0 : _a.length
      }, ((_b = news.value.images) == null ? void 0 : _b.length) ? {
        j: common_vendor.f(news.value.images, (image, index, i0) => {
          return {
            a: index,
            b: image,
            c: common_vendor.o(($event) => previewImage(index), index)
          };
        })
      } : {}, {
        k: common_vendor.f(news.value.related, (item, index, i0) => {
          return common_vendor.e({
            a: item.image,
            b: common_vendor.t(item.title),
            c: item.tag
          }, item.tag ? {
            d: common_vendor.t(item.tag)
          } : {}, {
            e: common_vendor.t(item.time),
            f: index,
            g: common_vendor.o(($event) => viewNews(item), index)
          });
        }),
        l: common_vendor.t(news.value.liked ? "已点赞" : "点赞"),
        m: news.value.liked ? 1 : "",
        n: common_vendor.o(toggleLike),
        o: common_vendor.gei(_ctx, "")
      });
    };
  }
};
wx.createPage(_sfc_main);
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/news/detail.js.map