hookehuyr

refactor(profile): 修正菜单项变量名并重构为响应式引用

feat(nav): 将底部导航"空间"改为"活动"并更新跳转链接
1 <!-- 1 <!--
2 * @Date: 2025-03-20 20:36:36 2 * @Date: 2025-03-20 20:36:36
3 * @LastEditors: hookehuyr hookehuyr@gmail.com 3 * @LastEditors: hookehuyr hookehuyr@gmail.com
4 - * @LastEditTime: 2025-06-10 15:27:23 4 + * @LastEditTime: 2025-06-13 14:53:20
5 * @FilePath: /mlaj/src/components/layout/BottomNav.vue 5 * @FilePath: /mlaj/src/components/layout/BottomNav.vue
6 * @Description: 文件描述 6 * @Description: 文件描述
7 --> 7 -->
...@@ -58,9 +58,10 @@ const navItems = [ ...@@ -58,9 +58,10 @@ const navItems = [
58 icon: '<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 6.253v13m0-13C10.832 5.477 9.246 5 7.5 5S4.168 5.477 3 6.253v13C4.168 18.477 5.754 18 7.5 18s3.332.477 4.5 1.253m0-13C13.168 5.477 14.754 5 16.5 5c1.747 0 3.332.477 4.5 1.253v13C19.832 18.477 18.247 18 16.5 18c-1.746 0-3.332.477-4.5 1.253" />' 58 icon: '<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 6.253v13m0-13C10.832 5.477 9.246 5 7.5 5S4.168 5.477 3 6.253v13C4.168 18.477 5.754 18 7.5 18s3.332.477 4.5 1.253m0-13C13.168 5.477 14.754 5 16.5 5c1.747 0 3.332.477 4.5 1.253v13C19.832 18.477 18.247 18 16.5 18c-1.746 0-3.332.477-4.5 1.253" />'
59 }, 59 },
60 { 60 {
61 - name: '空间', 61 + name: '活动',
62 - path: '/community', 62 + path: '/activity',
63 - icon: '<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 12h.01M12 12h.01M16 12h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z" />' 63 + // icon: '<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 12h.01M12 12h.01M16 12h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z" />'
64 + icon: '<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 10h18M7 15h1m4 0h1m-7 4h12a3 3 0 003-3V8a3 3 0 00-3-3H6a3 3 0 00-3 3v8a3 3 0 003 3z" />'
64 }, 65 },
65 { 66 {
66 name: '我的', 67 name: '我的',
...@@ -74,9 +75,9 @@ const isActive = (path) => { ...@@ -74,9 +75,9 @@ const isActive = (path) => {
74 } 75 }
75 76
76 const handleNavClick = (item) => { 77 const handleNavClick = (item) => {
77 - if (item.path === '/community') { 78 + if (item.path === '/activity') {
78 - showToast('功能暂未开放') 79 + // showToast('功能暂未开放')
79 - // window.open('https://community.mlaj.com', '_blank') 80 + window.open('https://wxm.behalo.cc/pages/activity/activity', '_blank')
80 return 81 return
81 } 82 }
82 if (item.path === '/profile' && !currentUser.value) { 83 if (item.path === '/profile' && !currentUser.value) {
......
...@@ -144,7 +144,7 @@ onMounted(async () => { ...@@ -144,7 +144,7 @@ onMounted(async () => {
144 profile.value = data.user; 144 profile.value = data.user;
145 checkIns.value = data.checkin; 145 checkIns.value = data.checkin;
146 // 处理消息中心的未读消息数量 146 // 处理消息中心的未读消息数量
147 - menuItems3.value.forEach(item => { 147 + menuItems2.value.forEach(item => {
148 if (item.path === '/profile/messages') { 148 if (item.path === '/profile/messages') {
149 item.badge = +data.unread_msg_count || 0; 149 item.badge = +data.unread_msg_count || 0;
150 } 150 }
...@@ -258,7 +258,7 @@ const menuItems1 = [ ...@@ -258,7 +258,7 @@ const menuItems1 = [
258 }, 258 },
259 ]; 259 ];
260 260
261 -const menuItems2 = [ 261 +const menuItems2 = ref([
262 // { 262 // {
263 // icon: "wallet", 263 // icon: "wallet",
264 // title: "我的钱包", 264 // title: "我的钱包",
...@@ -280,7 +280,7 @@ const menuItems2 = [ ...@@ -280,7 +280,7 @@ const menuItems2 = [
280 path: "/profile/messages", 280 path: "/profile/messages",
281 badge: "", 281 badge: "",
282 }, 282 },
283 -]; 283 +]);
284 284
285 const menuItems3 = ref([ 285 const menuItems3 = ref([
286 { 286 {
......