调整微信小程序的报错。
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
|
||||
7
unpackage/dist/dev/mp-weixin/pages-subpackage/workspace/scene-detail.json
vendored
Normal file
7
unpackage/dist/dev/mp-weixin/pages-subpackage/workspace/scene-detail.json
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"navigationStyle": "custom",
|
||||
"usingComponents": {
|
||||
"uni-nav-bar": "../../uni_modules/uni-nav-bar/components/uni-nav-bar/uni-nav-bar",
|
||||
"uni-icons": "../../uni_modules/uni-icons/components/uni-icons/uni-icons"
|
||||
}
|
||||
}
|
||||
1
unpackage/dist/dev/mp-weixin/pages-subpackage/workspace/scene-detail.wxml
vendored
Normal file
1
unpackage/dist/dev/mp-weixin/pages-subpackage/workspace/scene-detail.wxml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<view class="page data-v-e60a7064"><uni-nav-bar wx:if="{{b}}" class="data-v-e60a7064" bindclickLeft="{{a}}" u-i="e60a7064-0" bind:__l="__l" u-p="{{b}}"></uni-nav-bar><view class="content data-v-e60a7064"><view class="nav-list data-v-e60a7064"><view wx:for="{{c}}" wx:for-item="item" wx:key="d" class="nav-item data-v-e60a7064" bindtap="{{item.e}}"><view class="nav-item-content data-v-e60a7064"><view class="nav-item-icon data-v-e60a7064"><uni-icons wx:if="{{d}}" class="data-v-e60a7064" u-i="{{item.a}}" bind:__l="__l" u-p="{{d}}"></uni-icons></view><text class="nav-item-title data-v-e60a7064">{{item.b}}</text><view class="nav-item-arrow data-v-e60a7064"><uni-icons wx:if="{{e}}" class="data-v-e60a7064" u-i="{{item.c}}" bind:__l="__l" u-p="{{e}}"></uni-icons></view></view></view></view></view></view>
|
||||
48
unpackage/dist/dev/mp-weixin/pages-subpackage/workspace/scene-detail.wxss
vendored
Normal file
48
unpackage/dist/dev/mp-weixin/pages-subpackage/workspace/scene-detail.wxss
vendored
Normal file
@@ -0,0 +1,48 @@
|
||||
|
||||
.page.data-v-e60a7064 {
|
||||
min-height: 100vh;
|
||||
background-color: #F5F5F5;
|
||||
}
|
||||
.content.data-v-e60a7064 {
|
||||
padding-top: 44px;
|
||||
padding: 44px 16px 20px;
|
||||
}
|
||||
.nav-list.data-v-e60a7064 {
|
||||
background: #FFFFFF;
|
||||
border-radius: 12px;
|
||||
overflow: hidden;
|
||||
}
|
||||
.nav-item.data-v-e60a7064 {
|
||||
border-bottom: 1px solid #F0F0F0;
|
||||
}
|
||||
.nav-item.data-v-e60a7064:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
.nav-item-content.data-v-e60a7064 {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 20px 16px;
|
||||
transition: background-color 0.2s;
|
||||
}
|
||||
.nav-item:active .nav-item-content.data-v-e60a7064 {
|
||||
background-color: #F5F5F5;
|
||||
}
|
||||
.nav-item-icon.data-v-e60a7064 {
|
||||
margin-right: 12px;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background: #F5F5F5;
|
||||
border-radius: 8px;
|
||||
}
|
||||
.nav-item-title.data-v-e60a7064 {
|
||||
flex: 1;
|
||||
font-size: 16px;
|
||||
color: #333333;
|
||||
font-weight: 500;
|
||||
}
|
||||
.nav-item-arrow.data-v-e60a7064 {
|
||||
margin-left: 12px;
|
||||
}
|
||||
104
unpackage/dist/dev/mp-weixin/pages-subpackage/workspace/workspace.js
vendored
Normal file
104
unpackage/dist/dev/mp-weixin/pages-subpackage/workspace/workspace.js
vendored
Normal file
@@ -0,0 +1,104 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../common/vendor.js");
|
||||
const _sfc_main = {
|
||||
data() {
|
||||
return {
|
||||
scenes: [
|
||||
{
|
||||
id: "meeting",
|
||||
title: "会议场景",
|
||||
desc: "会议总结",
|
||||
icon: "calendar",
|
||||
color: "#2A68FF",
|
||||
navItems: [
|
||||
{ title: "总结", path: "/pages/meeting_summary/meeting_summary" }
|
||||
]
|
||||
},
|
||||
{
|
||||
id: "general_sales",
|
||||
title: "通用销售场景",
|
||||
desc: "通用销售场景功能",
|
||||
icon: "grid",
|
||||
color: "#4ECDC4",
|
||||
navItems: [
|
||||
{ title: "销售准备", path: "/pages/general_sales/prepare/prepare" },
|
||||
{ title: "销售过程", path: "/pages/general_sales/process/process" },
|
||||
{ title: "销售总结", path: "/pages/general_sales/summary/summary" }
|
||||
]
|
||||
},
|
||||
{
|
||||
id: "furniture_sales",
|
||||
title: "家具销售场景",
|
||||
desc: "家具销售场景功能",
|
||||
icon: "list",
|
||||
color: "#FFA07A",
|
||||
navItems: [
|
||||
{ title: "销售准备", path: "/pages/furniture_sales/prepare/prepare" },
|
||||
{ title: "销售过程", path: "/pages/furniture_sales/process/process" },
|
||||
{ title: "销售总结", path: "/pages/furniture_sales/summary/summary" }
|
||||
]
|
||||
},
|
||||
{
|
||||
id: "car_sales",
|
||||
title: "汽车销售场景",
|
||||
desc: "汽车销售场景功能",
|
||||
icon: "settings",
|
||||
color: "#95E1D3",
|
||||
navItems: [
|
||||
{ title: "销售准备", path: "/pages/car_sales/prepare/prepare" },
|
||||
{ title: "销售过程", path: "/pages/car_sales/process/process" },
|
||||
{ title: "销售总结", path: "/pages/car_sales/summary/summary" }
|
||||
]
|
||||
}
|
||||
]
|
||||
};
|
||||
},
|
||||
onLoad() {
|
||||
},
|
||||
methods: {
|
||||
navigateToScene(scene) {
|
||||
common_vendor.index.navigateTo({
|
||||
url: `/pages-subpackage/workspace/scene-detail?scene=${encodeURIComponent(JSON.stringify(scene))}`
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
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.p({
|
||||
fixed: true,
|
||||
statusBar: true,
|
||||
border: false,
|
||||
title: "工作台",
|
||||
color: "#333",
|
||||
backgroundColor: "#FFFFFF"
|
||||
}),
|
||||
b: common_vendor.f($data.scenes, (scene, k0, i0) => {
|
||||
return {
|
||||
a: "9fd0b295-1-" + i0,
|
||||
b: common_vendor.p({
|
||||
type: scene.icon,
|
||||
size: "40",
|
||||
color: scene.color
|
||||
}),
|
||||
c: common_vendor.t(scene.title),
|
||||
d: common_vendor.t(scene.desc),
|
||||
e: scene.id,
|
||||
f: common_vendor.o(($event) => $options.navigateToScene(scene), scene.id)
|
||||
};
|
||||
})
|
||||
};
|
||||
}
|
||||
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-9fd0b295"]]);
|
||||
wx.createPage(MiniProgramPage);
|
||||
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages-subpackage/workspace/workspace.js.map
|
||||
7
unpackage/dist/dev/mp-weixin/pages-subpackage/workspace/workspace.json
vendored
Normal file
7
unpackage/dist/dev/mp-weixin/pages-subpackage/workspace/workspace.json
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"navigationStyle": "custom",
|
||||
"usingComponents": {
|
||||
"uni-nav-bar": "../../uni_modules/uni-nav-bar/components/uni-nav-bar/uni-nav-bar",
|
||||
"uni-icons": "../../uni_modules/uni-icons/components/uni-icons/uni-icons"
|
||||
}
|
||||
}
|
||||
1
unpackage/dist/dev/mp-weixin/pages-subpackage/workspace/workspace.wxml
vendored
Normal file
1
unpackage/dist/dev/mp-weixin/pages-subpackage/workspace/workspace.wxml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<view class="page data-v-9fd0b295"><uni-nav-bar wx:if="{{a}}" class="data-v-9fd0b295" u-i="9fd0b295-0" bind:__l="__l" u-p="{{a}}"></uni-nav-bar><view class="content data-v-9fd0b295"><view class="scene-grid data-v-9fd0b295"><view wx:for="{{b}}" wx:for-item="scene" wx:key="e" class="scene-card data-v-9fd0b295" bindtap="{{scene.f}}"><view class="scene-icon data-v-9fd0b295"><uni-icons wx:if="{{scene.b}}" class="data-v-9fd0b295" u-i="{{scene.a}}" bind:__l="__l" u-p="{{scene.b}}"></uni-icons></view><text class="scene-title data-v-9fd0b295">{{scene.c}}</text><text class="scene-desc data-v-9fd0b295">{{scene.d}}</text></view></view></view></view>
|
||||
51
unpackage/dist/dev/mp-weixin/pages-subpackage/workspace/workspace.wxss
vendored
Normal file
51
unpackage/dist/dev/mp-weixin/pages-subpackage/workspace/workspace.wxss
vendored
Normal file
@@ -0,0 +1,51 @@
|
||||
|
||||
.page.data-v-9fd0b295 {
|
||||
min-height: 100vh;
|
||||
background-color: #F5F5F5;
|
||||
}
|
||||
.content.data-v-9fd0b295 {
|
||||
padding-top: 44px;
|
||||
padding: 44px 16px 20px;
|
||||
}
|
||||
.scene-grid.data-v-9fd0b295 {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
gap: 16px;
|
||||
}
|
||||
.scene-card.data-v-9fd0b295 {
|
||||
background: #FFFFFF;
|
||||
border-radius: 12px;
|
||||
padding: 24px 16px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
|
||||
transition: all 0.3s;
|
||||
}
|
||||
.scene-card.data-v-9fd0b295:active {
|
||||
transform: scale(0.98);
|
||||
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
|
||||
}
|
||||
.scene-icon.data-v-9fd0b295 {
|
||||
margin-bottom: 12px;
|
||||
width: 64px;
|
||||
height: 64px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background: linear-gradient(135deg, rgba(42, 104, 255, 0.1) 0%, rgba(42, 104, 255, 0.05) 100%);
|
||||
border-radius: 16px;
|
||||
}
|
||||
.scene-title.data-v-9fd0b295 {
|
||||
font-size: 16px;
|
||||
font-weight: 600;
|
||||
color: #333333;
|
||||
margin-bottom: 8px;
|
||||
text-align: center;
|
||||
}
|
||||
.scene-desc.data-v-9fd0b295 {
|
||||
font-size: 12px;
|
||||
color: #999999;
|
||||
text-align: center;
|
||||
line-height: 1.4;
|
||||
}
|
||||
Reference in New Issue
Block a user