"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: "quickMark",
  setup(__props) {
    const QRCodeUrl = common_vendor.ref("");
    const brightness = common_vendor.ref(0);
    const options = {
      typeNumber: 4,
      foregroundImageBorderRadius: 5,
      foregroundImageSrc: "/static/images/school-logo.jpg"
    };
    common_vendor.onLoad((data) => {
      common_vendor.index.onUserCaptureScreen(showTips);
      QRCodeUrl.value = data.value;
      getBrightness();
      setBrightness(1);
    });
    common_vendor.onUnload(() => {
      common_vendor.index.offUserCaptureScreen();
      setBrightness(brightness.value);
    });
    const getBrightness = () => {
      common_vendor.index.getScreenBrightness({
        success: (res) => {
          brightness.value = res.value;
        }
      });
    };
    const setBrightness = (data) => {
      common_vendor.index.setScreenBrightness({
        value: data
      });
    };
    const showTips = () => {
      common_vendor.index.showToast({
        title: "不要把二维码给他人使用，否则将冻结账号",
        icon: "none",
        duration: 3500
      });
    };
    return (_ctx, _cache) => {
      return {
        a: common_vendor.sr("qrcodeRef", "c8904830-0"),
        b: common_vendor.p({
          size: "400rpx",
          value: QRCodeUrl.value,
          options
        })
      };
    };
  }
};
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-c8904830"], ["__file", "E:/workSpace/WanZai_School_app/pages/quickMark/quickMark.vue"]]);
wx.createPage(MiniProgramPage);
