54 lines
1.9 KiB
JavaScript
54 lines
1.9 KiB
JavaScript
"use strict";
|
|
const common_vendor = require("../../vendor.js");
|
|
const common_store_useWeAppAuthStore = require("../../store/useWeAppAuthStore.js");
|
|
require("../../../gen/Apis.js");
|
|
require("../../libraries/request.js");
|
|
require("../../libraries/apiLoading.js");
|
|
if (!Array) {
|
|
const _easycom_up_button2 = common_vendor.resolveComponent("up-button");
|
|
_easycom_up_button2();
|
|
}
|
|
const _easycom_up_button = () => "../../../node-modules/uview-plus/components/u-button/u-button.js";
|
|
if (!Math) {
|
|
_easycom_up_button();
|
|
}
|
|
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
|
|
__name: "NetworkError",
|
|
setup(__props) {
|
|
common_store_useWeAppAuthStore.useWeAppAuthStore();
|
|
const query = common_vendor.ref();
|
|
common_vendor.onLoad((options) => {
|
|
query.value = options;
|
|
});
|
|
function refreshPage() {
|
|
const pages = getCurrentPages();
|
|
const currentPage = pages[pages.length - 1];
|
|
console.log("currentPage", currentPage);
|
|
const path = currentPage.$page.fullPath;
|
|
if (currentPage.$page.options) {
|
|
const options = currentPage.$page.options;
|
|
const fullPath = `${path}?${Object.keys(options).map((key) => `${key}=${encodeURIComponent(options[key])}`).join("&")}`;
|
|
common_vendor.index.reLaunch({
|
|
url: fullPath
|
|
});
|
|
console.log(fullPath);
|
|
} else {
|
|
common_vendor.index.reLaunch({
|
|
url: path
|
|
});
|
|
}
|
|
}
|
|
return (_ctx, _cache) => {
|
|
return {
|
|
a: common_vendor.o(refreshPage),
|
|
b: common_vendor.p({
|
|
type: "warning",
|
|
text: "点击重试"
|
|
})
|
|
};
|
|
};
|
|
}
|
|
});
|
|
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-c150de06"], ["__file", "/Users/zsq/Sources/github/2025property-pay/pay-employee/src/common/components/cc-root-view/NetworkError.vue"]]);
|
|
wx.createComponent(Component);
|