"use strict";
const common_vendor = require("../../common/vendor.js");
if (!Array) {
  const _easycom_uv_qrcode2 = common_vendor.resolveComponent("uv-qrcode");
  _easycom_uv_qrcode2();
}
const _easycom_uv_qrcode = () => "../../uni_modules/uv-qrcode/components/uv-qrcode/uv-qrcode.js";
if (!Math) {
  _easycom_uv_qrcode();
}
const _sfc_main = {
  __name: "QRCode",
  setup(__props) {
    const qrcode = common_vendor.ref(null);
    const flag = common_vendor.ref(null);
    const QRCodeUrl = common_vendor.ref("https://chtech.ncjti.edu.cn/testingServer/repairManage/test");
    const over = (e) => {
      flag.value = e.success;
    };
    const handleSave = () => {
      if (flag.value) {
        qrcode.value.save({
          success: (e) => {
            common_vendor.index.showToast({
              title: "保存成功",
              icon: "success"
            });
          },
          fail: (err) => {
            common_vendor.index.showToast({
              title: "保存失败",
              icon: "fail"
            });
          }
        });
      } else {
        common_vendor.index.showToast({
          title: "二维码加载失败，无法保存",
          icon: "none"
        });
      }
    };
    return (_ctx, _cache) => {
      return {
        a: common_vendor.sr(qrcode, "6190a91a-0", {
          "k": "qrcode"
        }),
        b: common_vendor.o(over),
        c: common_vendor.p({
          size: "300rpx",
          value: QRCodeUrl.value
        }),
        d: common_vendor.o(handleSave)
      };
    };
  }
};
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-6190a91a"], ["__file", "E:/workSpace/WanZai_School_app/pagesReservation/QRCode/QRCode.vue"]]);
wx.createPage(MiniProgramPage);
