调整 发布

This commit is contained in:
浅念
2026-03-12 16:47:27 +08:00
parent 12bc0f8ba9
commit f892dbcb32
13 changed files with 536 additions and 111 deletions
+31 -2
View File
@@ -7,7 +7,8 @@
<text class="status-text">{{ getStatusText(item.status) }}</text>
</view>
</view>
<view v-if="ismy">
<!-- <view v-if="ismy"> -->
<view v-if="item.status==0 ||item.status==2">
<u-icon @click="editfn(item)" name="edit-pen-fill" size="25" />
</view>
</view>
@@ -88,7 +89,11 @@
const statusMap = {
0: '待审核',
1: '审核通过',
2: '审核拒绝'
2: '审核拒绝',
3: '推送中',
4: '推送成功',
5: '推送失败'
}
return statusMap[status] || '未知'
}
@@ -349,6 +354,30 @@
background: #FFF2F0;
border: 1px solid #FFCCC7;
.status-text {
color: #F5222D;
}
}
&.status-3 {
background: #FFF7E6;
border: 1px solid #FFD591;
.status-text {
color: #FA8C16;
}
}
&.status-4 {
background: #F6FFED;
border: 1px solid #B7EB8F;
.status-text {
color: #52C41A;
}
}
&.status-5 {
background: #FFF2F0;
border: 1px solid #FFCCC7;
.status-text {
color: #F5222D;
}
+16 -4
View File
@@ -18,7 +18,7 @@
</template>
<script>
import { getVisibleTabBar, getCurrentTabIndex, getUserRole } from '@/common/tabbar.js'
import { getVisibleTabBar, getCurrentTabIndex } from '@/common/tabbar.js'
export default {
name: 'CustomTabBar',
@@ -27,19 +27,27 @@
current: 0,
safeAreaInsets: {
bottom: 0
}
},
forceUpdate: 0
}
},
computed: {
tabList() {
// 根据权限获取可见的 tabbar 列表
const userRole = getUserRole()
return getVisibleTabBar(userRole)
// 添加 forceUpdate 依赖,确保角色变化时重新计算
void this.forceUpdate
return getVisibleTabBar()
}
},
onLoad() {
this.updateCurrent()
this.initSafeArea()
// 监听角色变化事件
uni.$on('userRoleChanged', this.onRoleChanged)
},
onUnload() {
// 移除监听
uni.$off('userRoleChanged', this.onRoleChanged)
},
onShow() {
// 页面显示时更新当前 tab 索引
@@ -55,6 +63,10 @@
}
},
methods: {
// 角色变化时触发更新
onRoleChanged() {
this.forceUpdate++
},
initSafeArea() {
// 获取安全区域信息(适配 iPhone X 等)
// #ifdef APP-PLUS || H5