From 3282e95db0207ee133d1e98d9771dec9d83b0fc4 Mon Sep 17 00:00:00 2001
From: riku <risaku@163.com>
Date: 星期四, 02 四月 2026 16:24:38 +0800
Subject: [PATCH] 2026.4.2 新增专题管理功能
---
custom-tab-bar/index.js | 27 ++++++++++++++++++++++-----
1 files changed, 22 insertions(+), 5 deletions(-)
diff --git a/custom-tab-bar/index.js b/custom-tab-bar/index.js
index 9991a7a..5933a2c 100644
--- a/custom-tab-bar/index.js
+++ b/custom-tab-bar/index.js
@@ -1,17 +1,34 @@
import TabMenu from './data';
+// import { getMenu } from './data';
+
const app = getApp();
Component({
data: {
active: 0,
list: TabMenu,
+ // list: getMenu(app.globalData.userInfo.usertypeid),
},
attached() {
- const menu = TabMenu.map(v => {
- v.visible = app.globalData.userInfo.usertypeid <= v.level;
- return v;
- });
- this.setData({ list: menu });
+ // const menu = [];
+ // TabMenu.forEach(v => {
+ // if (app.globalData.userInfo.usertypeid <= v.level) {
+ // menu.push(v);
+ // }
+ // });
+ // this.setData({ list: menu });
+ // const index = [];
+ // TabMenu.forEach((v, i) => {
+ // if (app.globalData.userInfo.usertypeid > v.level) {
+ // index.push(i);
+ // }
+ // });
+ // let offset = 0;
+ // index.forEach(e => {
+ // TabMenu.splice(e + offset, 1);
+ // offset--;
+ // });
+ // this.setData({ list: TabMenu });
},
methods: {
onChange(event) {
--
Gitblit v1.9.3