73 lines
2.7 KiB
JavaScript
73 lines
2.7 KiB
JavaScript
"use strict";
|
|
const common_vendor = require("../../common/vendor.js");
|
|
const common_libraries_userUserLogin = require("../../common/libraries/userUserLogin.js");
|
|
require("../../common/libraries/request.js");
|
|
require("../../common/store/useWeAppAuthStore.js");
|
|
require("../../gen/Apis.js");
|
|
require("../../common/store/useWorkStore.js");
|
|
require("../../common/libraries/apiLoading.js");
|
|
if (!Array) {
|
|
const _easycom_hs_footer2 = common_vendor.resolveComponent("hs-footer");
|
|
_easycom_hs_footer2();
|
|
}
|
|
const _easycom_hs_footer = () => "../../components/hs-footer/hs-footer.js";
|
|
if (!Math) {
|
|
_easycom_hs_footer();
|
|
}
|
|
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
|
|
__name: "index",
|
|
setup(__props) {
|
|
const scanQrCode = common_vendor.ref(false);
|
|
common_vendor.onShow(async () => {
|
|
var _a, _b, _c;
|
|
await ((_a = common_vendor.getCurrentInstance()) == null ? void 0 : _a.appContext.config.globalProperties.$onLaunched);
|
|
if ((_b = common_libraries_userUserLogin.getUserLogin) == null ? void 0 : _b.getLoginStatus()) {
|
|
const getQrcode = common_vendor.index.getEnterOptionsSync();
|
|
let qrData = getQrcode == null ? void 0 : getQrcode.query;
|
|
if (!(qrData == null ? void 0 : qrData.scene)) {
|
|
scanQrCode.value = true;
|
|
} else {
|
|
let data = (_c = qrData == null ? void 0 : qrData.scene) == null ? void 0 : _c.split("_");
|
|
if (data[0] === "order") {
|
|
common_vendor.index.redirectTo({
|
|
url: `/INDEX/pay/index?id=${data[1]}`
|
|
});
|
|
}
|
|
}
|
|
} else {
|
|
common_vendor.index.showModal({
|
|
title: "提示",
|
|
content: "检测到您还未登录,是否去登录?",
|
|
confirmText: "去登录",
|
|
cancelText: "返回首页",
|
|
confirmColor: "#0082FA",
|
|
success: function(res) {
|
|
if (res.confirm) {
|
|
common_vendor.index.redirectTo({
|
|
url: "/pages/login?source=transfer"
|
|
});
|
|
console.log("用户点击确定");
|
|
} else if (res.cancel) {
|
|
common_vendor.index.switchTab({
|
|
url: "/pages/index/index"
|
|
});
|
|
console.log("用户点击取消");
|
|
}
|
|
}
|
|
});
|
|
}
|
|
});
|
|
return (_ctx, _cache) => {
|
|
return common_vendor.e({
|
|
a: !scanQrCode.value
|
|
}, !scanQrCode.value ? {} : {
|
|
b: common_vendor.p({
|
|
btnParimaryName: "返回首页"
|
|
})
|
|
});
|
|
};
|
|
}
|
|
});
|
|
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__file", "/Users/zsq/Sources/github/2025property-pay/pay-customer/src/pages/transfer/index.vue"]]);
|
|
wx.createPage(MiniProgramPage);
|