"use strict"; var __async = (__this, __arguments, generator) => { return new Promise((resolve, reject) => { var fulfilled = (value) => { try { step(generator.next(value)); } catch (e) { reject(e); } }; var rejected = (value) => { try { step(generator.throw(value)); } catch (e) { reject(e); } }; var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected); step((generator = generator.apply(__this, __arguments)).next()); }); }; const common_vendor = require("../../../common/vendor.js"); const sheep_index = require("../../../sheep/index.js"); if (!Array) { const _easycom_s_empty2 = common_vendor.resolveComponent("s-empty"); const _component_layout_default_uni = common_vendor.resolveComponent("layout-default-uni"); (_easycom_s_empty2 + _component_layout_default_uni)(); } const _easycom_s_empty = () => "../../../sheep/components/s-empty/s-empty.js"; if (!Math) { _easycom_s_empty(); } const _sfc_main = { __name: "error", setup(__props) { const errCode = common_vendor.ref(""); const errMsg = common_vendor.ref(""); common_vendor.onLoad((options) => { errCode.value = options.errCode; errMsg.value = options.errMsg; }); function onReconnect() { return __async(this, null, function* () { common_vendor.index.reLaunch({ url: "/modules/mall/index/index" }); yield sheep_index.ShoproInit(); }); } return (_ctx, _cache) => { return common_vendor.e({ a: errCode.value === "NetworkError" }, errCode.value === "NetworkError" ? { b: common_vendor.o(onReconnect), c: common_vendor.p({ icon: "/static/internet-empty.png", text: "网络连接失败", showAction: true, actionText: "重新连接", buttonColor: "#ff3000" }) } : errCode.value === "TemplateError" ? { e: common_vendor.o(onReconnect), f: common_vendor.p({ icon: "/static/internet-empty.png", text: "未找到模板", showAction: true, actionText: "重新加载", buttonColor: "#ff3000" }) } : errCode.value !== "" ? { h: common_vendor.o(onReconnect), i: common_vendor.p({ icon: "/static/internet-empty.png", text: errMsg.value, showAction: true, actionText: "重新加载", buttonColor: "#ff3000" }) } : {}, { d: errCode.value === "TemplateError", g: errCode.value !== "" }); }; } }; const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-47284e17"]]); wx.createPage(MiniProgramPage); //# sourceMappingURL=error.js.map