调整微信小程序的报错。
This commit is contained in:
117
unpackage/dist/dev/mp-weixin/pages-subpackage/workspace/scene-detail.js
vendored
Normal file
117
unpackage/dist/dev/mp-weixin/pages-subpackage/workspace/scene-detail.js
vendored
Normal file
@@ -0,0 +1,117 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../common/vendor.js");
|
||||
const _sfc_main = {
|
||||
data() {
|
||||
return {
|
||||
sceneInfo: {
|
||||
title: "",
|
||||
navItems: []
|
||||
}
|
||||
};
|
||||
},
|
||||
onLoad(options) {
|
||||
if (options.scene) {
|
||||
try {
|
||||
this.sceneInfo = JSON.parse(decodeURIComponent(options.scene));
|
||||
} catch (e) {
|
||||
common_vendor.index.__f__("error", "at pages-subpackage/workspace/scene-detail.vue:65", "解析场景信息失败:", e);
|
||||
common_vendor.index.showToast({
|
||||
title: "参数错误",
|
||||
icon: "none"
|
||||
});
|
||||
setTimeout(() => {
|
||||
common_vendor.index.navigateBack();
|
||||
}, 1500);
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
goBack() {
|
||||
common_vendor.index.navigateBack();
|
||||
},
|
||||
navigateToPage(item) {
|
||||
if (item.path) {
|
||||
const tabBarPages = [
|
||||
"/pages/furniture_reception/furniture_reception",
|
||||
"/pages/furniture_customer/furniture_customer",
|
||||
"/pages/furniture_top_sales/furniture_top_sales",
|
||||
"/pages/ucenter/ucenter"
|
||||
];
|
||||
if (tabBarPages.includes(item.path)) {
|
||||
common_vendor.index.switchTab({
|
||||
url: item.path,
|
||||
fail: (err) => {
|
||||
common_vendor.index.__f__("error", "at pages-subpackage/workspace/scene-detail.vue:95", "跳转失败:", err);
|
||||
common_vendor.index.showToast({
|
||||
title: "页面不存在",
|
||||
icon: "none"
|
||||
});
|
||||
}
|
||||
});
|
||||
} else {
|
||||
common_vendor.index.navigateTo({
|
||||
url: item.path,
|
||||
fail: (err) => {
|
||||
common_vendor.index.__f__("error", "at pages-subpackage/workspace/scene-detail.vue:106", "跳转失败:", err);
|
||||
common_vendor.index.showToast({
|
||||
title: "页面不存在",
|
||||
icon: "none"
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
} else {
|
||||
common_vendor.index.showToast({
|
||||
title: "页面路径未配置",
|
||||
icon: "none"
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
if (!Array) {
|
||||
const _easycom_uni_nav_bar2 = common_vendor.resolveComponent("uni-nav-bar");
|
||||
const _easycom_uni_icons2 = common_vendor.resolveComponent("uni-icons");
|
||||
(_easycom_uni_nav_bar2 + _easycom_uni_icons2)();
|
||||
}
|
||||
const _easycom_uni_nav_bar = () => "../../uni_modules/uni-nav-bar/components/uni-nav-bar/uni-nav-bar.js";
|
||||
const _easycom_uni_icons = () => "../../uni_modules/uni-icons/components/uni-icons/uni-icons.js";
|
||||
if (!Math) {
|
||||
(_easycom_uni_nav_bar + _easycom_uni_icons)();
|
||||
}
|
||||
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
return {
|
||||
a: common_vendor.o($options.goBack),
|
||||
b: common_vendor.p({
|
||||
fixed: true,
|
||||
statusBar: true,
|
||||
border: false,
|
||||
title: $data.sceneInfo.title,
|
||||
leftIcon: "left",
|
||||
color: "#333",
|
||||
backgroundColor: "#FFFFFF"
|
||||
}),
|
||||
c: common_vendor.f($data.sceneInfo.navItems, (item, index, i0) => {
|
||||
return {
|
||||
a: "e60a7064-1-" + i0,
|
||||
b: common_vendor.t(item.title),
|
||||
c: "e60a7064-2-" + i0,
|
||||
d: index,
|
||||
e: common_vendor.o(($event) => $options.navigateToPage(item), index)
|
||||
};
|
||||
}),
|
||||
d: common_vendor.p({
|
||||
type: "right",
|
||||
size: "20",
|
||||
color: "#CCCCCC"
|
||||
}),
|
||||
e: common_vendor.p({
|
||||
type: "right",
|
||||
size: "16",
|
||||
color: "#CCCCCC"
|
||||
})
|
||||
};
|
||||
}
|
||||
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-e60a7064"]]);
|
||||
wx.createPage(MiniProgramPage);
|
||||
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages-subpackage/workspace/scene-detail.js.map
|
||||
Reference in New Issue
Block a user