修正跳转逻辑
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
<text class="category-title">接待</text>
|
||||
</view>
|
||||
<view class="function-grid">
|
||||
<view class="function-item" @click="openReceptionTab('reception')">
|
||||
<view class="function-item" @click="goReceptionInProgressPage('跳转开始接待失败', 'reception')">
|
||||
<view class="function-icon">🛎️</view>
|
||||
<text class="function-name">开始接待</text>
|
||||
<text class="function-desc"></text>
|
||||
@@ -17,7 +17,7 @@
|
||||
<text class="function-name">服务中</text>
|
||||
<text class="function-desc"></text>
|
||||
</view>
|
||||
<view class="function-item" @click="openReceptionTab('tag')">
|
||||
<view class="function-item" @click="goReceptionInProgressPage('跳转标签管理失败', 'tag')">
|
||||
<view class="function-icon">🗂️</view>
|
||||
<text class="function-name">标签管理</text>
|
||||
<text class="function-desc"></text>
|
||||
@@ -61,24 +61,14 @@ export default {
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
/** 与「服务记录」一致:直跳分包页 + query,避免主包宿主页在微信上的 ref/占位问题 */
|
||||
openReceptionTab(tab) {
|
||||
const allowed = ['status', 'reception', 'tag'];
|
||||
if (!allowed.includes(tab)) {
|
||||
return;
|
||||
/** 独立「接待中 / 服务中」页:`/pages-subpackage/furniture_reception/reception_in_progress`;可选 tab=reception|status|tag */
|
||||
goReceptionInProgressPage(failTitle, tab) {
|
||||
let url = '/pages-subpackage/furniture_reception/reception_in_progress';
|
||||
if (tab === 'reception' || tab === 'status' || tab === 'tag') {
|
||||
url += `?tab=${encodeURIComponent(tab)}`;
|
||||
}
|
||||
const url = `/pages-subpackage/furniture_reception/furniture_reception_entry?tab=${encodeURIComponent(tab)}`;
|
||||
uni.navigateTo({
|
||||
url,
|
||||
fail: () => {
|
||||
uni.showToast({ title: '跳转接待页失败', icon: 'none' });
|
||||
},
|
||||
});
|
||||
},
|
||||
/** 独立「接待中 / 服务中」列表页:`/pages-subpackage/furniture_reception/reception_in_progress` */
|
||||
goReceptionInProgressPage(failTitle) {
|
||||
uni.navigateTo({
|
||||
url: '/pages-subpackage/furniture_reception/reception_in_progress',
|
||||
fail: () => {
|
||||
uni.showToast({ title: failTitle || '页面打开失败', icon: 'none' });
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user