chore(master): 重构师傅端 tabbar 为独立页面路由模式

- 新增 tabbar 配置,改为独立页面路由
- 替换所有 reLaunch 为 switchTab 跳转 tab 页面
- 新增未读消息角标同步逻辑
- 移除旧的多 tab 组件化实现
- 新增 tabbar 图标资源文件
这个提交包含在:
2026-11-28 09:24:48 +08:00
父节点 4e69f326e5
当前提交 cb32db0984
共有 28 个文件被更改,包括 125 次插入 和 117 次删除

查看文件

@@ -66,10 +66,10 @@
type: Number,
default: 0
},
// false:单母页组件切换模式,0ms 极速秒切不销毁组件
// true:独立页面路由切换模式
standalone: {
type: Boolean,
default: false
default: true
}
});
@@ -104,9 +104,9 @@
const TAB_ROUTES = [
'/pages/master/hall',
'/pages/master/hall?tab=1',
'/pages/master/hall?tab=2',
'/pages/master/hall?tab=3'
'/pages/master/orders',
'/pages/message/message',
'/pages/master/workbench'
];
function switchTab(index) {
@@ -123,7 +123,7 @@
const targetUrl = TAB_ROUTES[index];
if (targetUrl) {
uni.reLaunch({ url: targetUrl });
uni.switchTab({ url: targetUrl });
}
}
</script>

查看文件

@@ -195,18 +195,18 @@
if (pages.length > 1) {
uni.navigateBack({
fail: () => {
uni.reLaunch({ url: '/pages/master/hall' });
uni.switchTab({ url: '/pages/master/hall' });
}
});
} else {
// 单层页面栈(如分享页、直接跳转页),智能兜底返回接单大厅
uni.reLaunch({ url: '/pages/master/hall' });
uni.switchTab({ url: '/pages/master/hall' });
}
}
function handleHome() {
emit('home');
uni.reLaunch({ url: '/pages/master/hall' });
uni.switchTab({ url: '/pages/master/hall' });
}
</script>

查看文件

@@ -922,8 +922,7 @@
@import '@/uni.scss';
.hall-view {
height: calc(100vh - 112rpx - constant(safe-area-inset-bottom));
height: calc(100vh - 112rpx - env(safe-area-inset-bottom));
height: 100vh;
display: flex;
flex-direction: column;
overflow: hidden;

查看文件

@@ -81,7 +81,7 @@
];
function goMasterLogin() {
toLogin('/pages/master/hall?tab=2');
toLogin('/pages/message/message');
}
async function load() {
@@ -158,8 +158,7 @@
<style lang="scss" scoped>
.message-view {
height: calc(100vh - 112rpx - constant(safe-area-inset-bottom));
height: calc(100vh - 112rpx - env(safe-area-inset-bottom));
height: 100vh;
display: flex;
flex-direction: column;
overflow: hidden;

查看文件

@@ -216,7 +216,7 @@
}
function goMasterLogin() {
toLogin('/pages/master/hall?tab=1');
toLogin('/pages/master/orders');
}
async function load() {
@@ -333,7 +333,7 @@
emit('switch-tab', 0);
return;
}
uni.reLaunch({ url: '/pages/master/hall' });
uni.switchTab({ url: '/pages/master/hall' });
}
onMounted(() => {
@@ -444,7 +444,7 @@
/* 列表卡片 */
.list {
padding: 24rpx 24rpx calc(140rpx + env(safe-area-inset-bottom));
padding: 24rpx 24rpx 48rpx;
display: flex;
flex-direction: column;
gap: 20rpx;

查看文件

@@ -429,7 +429,7 @@
}
function goMasterLogin() {
toLogin('/pages/master/hall?tab=3');
toLogin('/pages/master/workbench');
}
function go(url) {
@@ -449,7 +449,7 @@
emit('switch-tab', 1);
return;
}
uni.reLaunch({ url: '/pages/master/hall?tab=1' });
uni.switchTab({ url: '/pages/master/orders' });
}
function goSkills() {
@@ -634,8 +634,7 @@
<style lang="scss" scoped>
.workbench-view {
height: calc(100vh - 112rpx - constant(safe-area-inset-bottom));
height: calc(100vh - 112rpx - env(safe-area-inset-bottom));
height: 100vh;
display: flex;
flex-direction: column;
overflow: hidden;