From abc79e407ab14fa663908e214e7982d6a38ddfcf Mon Sep 17 00:00:00 2001 From: JiXinHui <985276981@qq.com> Date: Mon, 30 Jun 2025 16:09:43 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=BB=BA=E9=A1=B9=E7=9B=AE=E9=A6=96?= =?UTF-8?q?=E9=A1=B5=20tabbar=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/custom-tab-bar/custom-tab-bar.vue | 168 +++++++++++++++++++ main.js | 4 +- pages.json | 92 ++-------- pages/home/home.vue | 165 ------------------ pages/home/index/index.vue | 128 ++++++++++++++ pages/message/msgList/msgList.vue | 72 ++++---- store/index.js | 40 ++--- 7 files changed, 366 insertions(+), 303 deletions(-) create mode 100644 components/custom-tab-bar/custom-tab-bar.vue delete mode 100644 pages/home/home.vue create mode 100644 pages/home/index/index.vue diff --git a/components/custom-tab-bar/custom-tab-bar.vue b/components/custom-tab-bar/custom-tab-bar.vue new file mode 100644 index 0000000..324cab0 --- /dev/null +++ b/components/custom-tab-bar/custom-tab-bar.vue @@ -0,0 +1,168 @@ + + + + + \ No newline at end of file diff --git a/main.js b/main.js index 441c69a..33b03ad 100644 --- a/main.js +++ b/main.js @@ -8,7 +8,9 @@ import { LogLevel, } from "./uni_modules/Lyuan-SignalR/js_sdk/signalr"; - +// 导入自定义TabBar组件 +import CustomTabBar from '@/components/custom-tab-bar/custom-tab-bar.vue'; +Vue.component('custom-tab-bar', CustomTabBar); Vue.config.productionTip = false; diff --git a/pages.json b/pages.json index 6649a8d..e1b804c 100644 --- a/pages.json +++ b/pages.json @@ -3,21 +3,23 @@ "^u-(.*)": "@/uview-ui/components/u-$1/u-$1.vue" }, "condition": { - //模式配置,仅开发期间生效 "current": 0, - //当前激活的模式(list 的索引项) "list": [ { "name": "test", - //模式名称 "path": "pages/login/login/login" - //启动页面,必选 - // "query": "uuid=c4bba940-f69e-11ea-a419-6bafda9d095e&__id__=1" //启动参数,在页面的onLoad函数里面得到 } ] }, "pages": [ - // 登录 + { + "path": "pages/home/index/index", + "style": { + "navigationBarTitleText": "首页", + "enablePullDownRefresh": false, + "navigationStyle": "custom" + } + }, { "path": "pages/login/login/login", "style": { @@ -26,115 +28,84 @@ "navigationStyle": "custom" } }, - // 注册, { "path": "pages/login/register/register", "style": { "navigationBarTitleText": "注册", "enablePullDownRefresh": false, "navigationStyle": "custom" - // 隐藏系统导航栏 } }, - //实名验证 - // 完善信息 { "path": "pages/login/perfect/perfect", "style": { "navigationBarTitleText": "", "enablePullDownRefresh": false, "navigationStyle": "custom" - // 隐藏系统导航栏 } }, - // 毕业生认证 { "path": "pages/login/graduateCertification/graduateCertification", "style": { "navigationBarTitleText": "", "enablePullDownRefresh": false, "navigationStyle": "custom" - // 隐藏系统导航栏 } }, - // 消息列表, { "path": "pages/message/msgList/msgList", "style": { "navigationBarTitleText": "", "enablePullDownRefresh": false, "navigationStyle": "custom" - // 隐藏系统导航栏 } }, - // 对话框, { "path": "pages/message/dialogBox/dialogBox", "style": { "navigationBarTitleText": "", "enablePullDownRefresh": false, "navigationStyle": "custom" - // 隐藏系统导航栏 } }, - // 互动消息, { "path": "pages/message/interactionList/interactionList", "style": { "navigationBarTitleText": "互动消息", "enablePullDownRefresh": false, "navigationStyle": "custom" - // 隐藏系统导航栏 } }, - // 管理列表, - { - "path": "pages/message/adminList/adminList", - "style": { - "navigationBarTitleText": "管理列表", - "enablePullDownRefresh": false, - "navigationStyle": "custom" - // 隐藏系统导航栏 - } - }, - // 系统消息, { "path": "pages/message/sysList/sysList", "style": { "navigationBarTitleText": "系统消息", "enablePullDownRefresh": false, "navigationStyle": "custom" - // 隐藏系统导航栏 } }, - // 新增关注, { "path": "pages/message/attentionList/attentionList", "style": { "navigationBarTitleText": "新增关注", "enablePullDownRefresh": false, "navigationStyle": "custom" - // 隐藏系统导航栏 } }, - // 头像裁剪 { - "path": "uview-ui/components/u-avatar-cropper/u-avatar-cropper", + "path": "pages/message/adminList/adminList", "style": { - "navigationBarTitleText": "头像裁剪", - "navigationBarBackgroundColor": "#000000", + "navigationBarTitleText": "管理列表", + "enablePullDownRefresh": false, "navigationStyle": "custom" - // 隐藏系统导航栏 } }, - // 忘记密码, { "path": "pages/login/ForgetPassword/ForgetPassword", "style": { "navigationBarTitleText": "", "enablePullDownRefresh": false, "navigationStyle": "custom" - // 隐藏系统导航栏 } }, { @@ -143,7 +114,6 @@ "navigationBarTitleText": "确认密码", "enablePullDownRefresh": false, "navigationStyle": "custom" - // 隐藏系统导航栏 } }, { @@ -152,7 +122,6 @@ "navigationBarTitleText": "角色选择", "enablePullDownRefresh": false, "navigationStyle": "custom" - // 隐藏系统导航栏 } }, { @@ -163,22 +132,12 @@ "navigationStyle": "custom" } }, - { - "path": "pages/webview/index", - "style": { - "navigationBarTitleText": "网页链接", - "enablePullDownRefresh": false, - "navigationStyle": "custom" - // 隐藏系统导航栏 - } - }, { "path": "pages/login/recognitionResult/recognitionResult", "style": { "navigationBarTitleText": "提示", "enablePullDownRefresh": false, "navigationStyle": "custom" - // 隐藏系统导航栏 } }, { @@ -187,41 +146,14 @@ "navigationBarTitleText": "认证失败", "enablePullDownRefresh": false, "navigationStyle": "custom" - // 隐藏系统导航栏 } } ], "subPackages": [], - // "preloadRule": { - // "pages/example/components": { - // "network": "all", - // "packages": ["pages/componentsA", "pages/componentsB", "pages/componentsC"] - // } - // }, "globalStyle": { "navigationBarTextStyle": "black", - "navigationBarTitleText": "uView", + "navigationBarTitleText": "应行AI", "navigationBarBackgroundColor": "#FFFFFF", "backgroundColor": "#FFFFFF" - }, - "tabBar": { - "color": "#909399", - "selectedColor": "#303133", - "backgroundColor": "#FFFFFF", - "borderStyle": "black", - "list": [ - { - "pagePath": "pages/home/home", - "iconPath": "/static/common/tabbar/index.png", - "selectedIconPath": "/static/common/tabbar/selectindex.png", - "text": "首页" - }, - { - "pagePath": "pages/message/msgList/msgList", - "iconPath": "static/common/tabbar/message.png", - "selectedIconPath": "static/common/tabbar/selectmessage.png", - "text": "消息" - } - ] } } diff --git a/pages/home/home.vue b/pages/home/home.vue deleted file mode 100644 index f1580fe..0000000 --- a/pages/home/home.vue +++ /dev/null @@ -1,165 +0,0 @@ - - - - - \ No newline at end of file diff --git a/pages/home/index/index.vue b/pages/home/index/index.vue new file mode 100644 index 0000000..6112032 --- /dev/null +++ b/pages/home/index/index.vue @@ -0,0 +1,128 @@ + + + + + \ No newline at end of file diff --git a/pages/message/msgList/msgList.vue b/pages/message/msgList/msgList.vue index f7689f9..89747c2 100644 --- a/pages/message/msgList/msgList.vue +++ b/pages/message/msgList/msgList.vue @@ -15,7 +15,7 @@ style="height: calc(100vh - 2.1rem); width: 100%"> --> - @@ -56,38 +56,36 @@ 暂无消息 --> - + @@ -96,21 +94,21 @@ - + + +