WXL
18 小时以前 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
"use strict";
const common_vendor = require("../../common/vendor.js");
const _sfc_main = {
  __name: "index",
  setup(__props) {
    const order = common_vendor.ref({
      amount: 100,
      hospital: "青岛镜湖医院",
      department: "心内科",
      doctorName: "张医生",
      doctorTitle: "主任医师",
      patientName: "张三",
      date: "2024-03-21",
      time: "09:00",
      orderNo: "AP202403210001"
    });
    const paymentMethods = [
      {
        name: "微信支付",
        value: "wechat",
        icon: "/static/payment/wechat.png"
      },
      {
        name: "支付宝",
        value: "alipay",
        icon: "/static/payment/alipay.png"
      }
    ];
    const selectedMethod = common_vendor.ref("wechat");
    const selectMethod = (method) => {
      selectedMethod.value = method;
    };
    const confirmPay = () => {
      common_vendor.index.showLoading({
        title: "支付中..."
      });
      setTimeout(() => {
        common_vendor.index.hideLoading();
        common_vendor.index.showModal({
          title: "支付成功",
          content: "您的预约已完成支付",
          showCancel: false,
          success: () => {
            common_vendor.index.redirectTo({
              url: "/pages/appointment/record"
            });
          }
        });
      }, 1500);
    };
    return (_ctx, _cache) => {
      return {
        a: common_vendor.t(order.value.amount),
        b: common_vendor.t(order.value.hospital),
        c: common_vendor.t(order.value.department),
        d: common_vendor.t(order.value.doctorName),
        e: common_vendor.t(order.value.doctorTitle),
        f: common_vendor.t(order.value.patientName),
        g: common_vendor.t(order.value.date),
        h: common_vendor.t(order.value.time),
        i: common_vendor.t(order.value.orderNo),
        j: common_vendor.f(paymentMethods, (method, index, i0) => {
          return {
            a: method.icon,
            b: common_vendor.t(method.name),
            c: index,
            d: selectedMethod.value === method.value ? 1 : "",
            e: common_vendor.o(($event) => selectMethod(method.value), index)
          };
        }),
        k: common_vendor.t(order.value.amount),
        l: common_vendor.o(confirmPay),
        m: common_vendor.gei(_ctx, "")
      };
    };
  }
};
wx.createPage(_sfc_main);
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/payment/index.js.map