适配微信小程序

This commit is contained in:
zhonghua.li
2026-04-17 09:41:37 +08:00
parent 18455a311d
commit 36b8784bc1
59 changed files with 650 additions and 586 deletions

View File

@@ -477,8 +477,8 @@ import ServiceListFurniture from "./serviceListFurniture.vue";
*/
refreshPageData() {
this.$nextTick(() => {
const list = this.$refs.serviceListRef;
if (this.activeTab === 'status') {
const list = this.$refs.serviceListRef;
if (list && typeof list.onServiceStatusRefresh === 'function') {
list.onServiceStatusRefresh();
}
@@ -489,7 +489,9 @@ import ServiceListFurniture from "./serviceListFurniture.vue";
},
applyIncomingTab(tab) {
const allowed = ['status', 'reception', 'tag'];
if (!allowed.includes(tab)) return;
if (!allowed.includes(tab)) {
return;
}
// 切tab并执行必要初始化开始接待需要重置表单
if (this.activeTab !== tab) {
@@ -500,6 +502,11 @@ import ServiceListFurniture from "./serviceListFurniture.vue";
} else if (tab === 'tag') {
this.tagViewMode = 'list';
this.fetchTagList({ force: true });
} else if (tab === 'status') {
// 从工作台进入「服务中」时补拉列表mounted 可能早于布局或与 refresh 竞态)
this.$nextTick(() => {
this.refreshPageData();
});
}
},
// 计算并更新导航栏和内容区域的位置
@@ -568,11 +575,11 @@ import ServiceListFurniture from "./serviceListFurniture.vue";
// 检查页面栈,如果当前是第一个页面,则不能返回
const pages = getCurrentPages();
if (pages.length <= 1) {
// 作为 tabBar 页从其他入口跳转进来时,兜底切回 AI 分析页
// 作为 tabBar 页从其他入口跳转进来时,兜底切回工作台
uni.switchTab({
url: '/pages/ai_analysis/ai_analysis',
url: '/pages/workbench/workbench',
fail: (err) => {
console.error('[FurnitureReception][goBack] 切回AI分析页失败:', err);
console.error('[FurnitureReception][goBack] 切回工作台失败:', err);
}
});
return;
@@ -1247,6 +1254,12 @@ import ServiceListFurniture from "./serviceListFurniture.vue";
/* top值通过内联样式动态设置 */
left: 0;
right: 0;
/* #ifdef MP-WEIXIN */
/* 子组件内 scroll-view 需明确高度链flex 可避免 MP 下 height:100% 失效导致空白 */
display: flex;
flex-direction: column;
min-height: 0;
/* #endif */
/* #ifndef MP-WEIXIN */
bottom: 96rpx; /* H5环境底部导航栏高度 */
/* #endif */