From 3c738f4fe2762bba8087e5a22fc0dc06560eab0e Mon Sep 17 00:00:00 2001
From: linwe <872216996@qq.com>
Date: Thu, 08 Aug 2024 10:01:17 +0800
Subject: [PATCH] 三色任务与自查任务

---
 common/common.js |  150 ++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 150 insertions(+), 0 deletions(-)

diff --git a/common/common.js b/common/common.js
index c0447f7..1a57fd7 100644
--- a/common/common.js
+++ b/common/common.js
@@ -93,4 +93,154 @@
 			return obj[i]
 		}
 	}
+}
+
+
+export const getTabbarList = (roleType = 1) => {
+	if (roleType == 1) { //居民
+		return [{
+				name: '首页',
+				iconPathSelected: '/static/img/tabbar-01-selected.png',
+				iconPath: '/static/img/tabbar-01.png',
+				url: '/pages/home/index'
+			},
+			{
+				name: '周边',
+				iconPathSelected: '/static/img/tabbar-09-selected.png',
+				iconPath: '/static/img/tabbar-09.png',
+				url: '/pages/myMap/myMap'
+			},
+			{
+				name: '邻里圈',
+				iconPathSelected: '/static/img/tabbar-02-selected.png',
+				iconPath: '/static/img/tabbar-02.png',
+				url: '/pages/circle/index'
+			},
+			{
+				name: '我的',
+				iconPathSelected: '/static/img/tabbar-03-selected.png',
+				iconPath: '/static/img/tabbar-03.png',
+				url: '/pages/user/center'
+			}
+		]
+	} else if (roleType == 2) { //民警 
+		return [{
+				name: '首页',
+				iconPathSelected: '/static/img/tabbar-04-selected.png',
+				iconPath: '/static/img/tabbar-04.png',
+				url: '/pages/home/index'
+			},
+			{
+				name: '周边',
+				iconPathSelected: '/static/img/tabbar-09-selected.png',
+				iconPath: '/static/img/tabbar-09.png',
+				url: '/pages/myMap/myMap'
+			},
+			{
+				name: '协同圈',
+				iconPathSelected: '/static/img/tabbar-08-selected.png',
+				iconPath: '/static/img/tabbar-08.png',
+				url: '/pages/circle/index'
+			},
+			{
+				name: '驾驶舱',
+				iconPathSelected: '/static/img/tabbar-05-selected.png',
+				iconPath: '/static/img/tabbar-05.png',
+				url: '/pages/statistics/index'
+			},
+
+
+			{
+				name: '我的',
+				iconPathSelected: '/static/img/tabbar-06-selected.png',
+				iconPath: '/static/img/tabbar-06.png',
+				url: '/pages/user/center'
+			}
+		]
+	} else if (roleType == 3) { // 网格员
+		return [{
+				name: '首页',
+				iconPathSelected: '/static/img/tabbar-01-selected.png',
+				iconPath: '/static/img/tabbar-01.png',
+				url: '/pages/home/index'
+			},
+			{
+				name: '周边',
+				iconPathSelected: '/static/img/tabbar-09-selected.png',
+				iconPath: '/static/img/tabbar-09.png',
+				url: '/pages/myMap/myMap'
+			},
+			{
+				name: '协同圈',
+				iconPathSelected: '/static/img/tabbar-02-selected.png',
+				iconPath: '/static/img/tabbar-02.png',
+				url: '/pages/circle/index'
+			},
+			{
+				name: '驾驶舱',
+				iconPathSelected: '/static/img/tabbar-07-selected.png',
+				iconPath: '/static/img/tabbar-07.png',
+				url: '/pages/statistics/index'
+			},
+
+			{
+				name: '我的',
+				iconPathSelected: '/static/img/tabbar-03-selected.png',
+				iconPath: '/static/img/tabbar-03.png',
+				url: '/pages/user/center'
+			}
+		]
+	} else if (roleType == 4) { //系统管理员
+		return [{
+				name: '首页',
+				iconPathSelected: '/static/img/tabbar-01-selected.png',
+				iconPath: '/static/img/tabbar-01.png',
+				url: '/pages/home/index'
+			},
+			{
+				name: '周边',
+				iconPathSelected: '/static/img/tabbar-09-selected.png',
+				iconPath: '/static/img/tabbar-09.png',
+				url: '/pages/myMap/myMap'
+			},
+			{
+				name: '圈子',
+				iconPathSelected: '/static/img/tabbar-02-selected.png',
+				iconPath: '/static/img/tabbar-02.png',
+				url: '/pages/circle/index'
+			},
+			{
+				name: '驾驶舱',
+				iconPathSelected: '/static/img/tabbar-07-selected.png',
+				iconPath: '/static/img/tabbar-07.png',
+				url: '/pages/statistics/index'
+			},
+			{
+				name: '我的',
+				iconPathSelected: '/static/img/tabbar-03-selected.png',
+				iconPath: '/static/img/tabbar-03.png',
+				url: '/pages/user/center'
+			}
+		]
+	} else if (roleType == 5) { //校园主体和通用
+		return [{
+				name: '首页',
+				iconPathSelected: '/static/img/tabbar-01-selected.png',
+				iconPath: '/static/img/tabbar-01.png',
+				url: '/pages/home/index'
+			},
+			{
+				name: '周边',
+				iconPathSelected: '/static/img/tabbar-09-selected.png',
+				iconPath: '/static/img/tabbar-09.png',
+				url: '/pages/myMap/myMap'
+			},
+			{
+				name: '我的',
+				iconPathSelected: '/static/img/tabbar-03-selected.png',
+				iconPath: '/static/img/tabbar-03.png',
+				url: '/pages/user/center'
+			}
+		]
+	}
 }
\ No newline at end of file

--
Gitblit v1.9.3