From d34c7c19ab062b8e99b7af7e1d44e009c1b9b739 Mon Sep 17 00:00:00 2001
From: Lou <luzhiping@qqyjz.com>
Date: Tue, 19 Mar 2024 12:02:49 +0800
Subject: [PATCH] Merge branch 'master' of http://s16s652780.51mypc.cn:49896/r/jczz_app

---
 common/common.js |   73 ++++++++++++++++++++++++++++++++++--
 1 files changed, 69 insertions(+), 4 deletions(-)

diff --git a/common/common.js b/common/common.js
index a3b6d85..c166237 100644
--- a/common/common.js
+++ b/common/common.js
@@ -29,6 +29,15 @@
 	}
 }
 
+/**
+ * 
+ *  显示完整路径
+ */
+export const setFullUrl = (str) => {
+	return `${minioBaseUrl}${str}`
+}
+
+
 
 export const showTips = (text, icon) => {
 	uni.showToast({
@@ -60,11 +69,16 @@
 
 // 文件路径转字符串
 export const formattingUrls = (urls) => {
-	let arr = [];
-	for (let i of urls) {
-		arr.push(i.name);
+	if (!urls.length) {
+		return ""
+	} else {
+		let arr = [];
+		for (let i of urls) {
+			arr.push(i.name);
+		}
+		return arr.join(",")
 	}
-	return arr.join(",")
+
 }
 
 //转换标签颜色
@@ -79,4 +93,55 @@
 			return obj[i]
 		}
 	}
+}
+
+
+export const getTabbarList = (roleType) => {
+	if (roleType == 2) {
+		return [{
+				name: '首页',
+				iconPathSelected: '/static/img/tabbar-01-selected.png',
+				iconPath: '/static/img/tabbar-01.png',
+				url: '/pages/home/index'
+			},
+
+			{
+				name: '驾驶舱',
+				iconPathSelected: '/static/img/tabbar-02-selected.png',
+				iconPath: '/static/img/tabbar-02.png',
+
+				url: '/pages/statistics/index'
+			},
+
+
+			{
+				name: '个人中心',
+				iconPathSelected: '/static/img/tabbar-03-selected.png',
+				iconPath: '/static/img/tabbar-03.png',
+
+				url: '/pages/user/center'
+			}
+		]
+	} else {
+		return [{
+				name: '首页',
+				iconPathSelected: '/static/img/tabbar-01-selected.png',
+				iconPath: '/static/img/tabbar-01.png',
+				url: '/pages/home/index'
+			},
+
+			{
+				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'
+			}
+		]
+	}
 }
\ No newline at end of file

--
Gitblit v1.9.3