diff --git a/pages.config.ts b/pages.config.ts
index 37cba06..7207a60 100644
--- a/pages.config.ts
+++ b/pages.config.ts
@@ -26,14 +26,14 @@ export default defineUniPages({
spacing: '3px',
list: [
{
- iconPath: '/static/tabBar/news.png',
- selectedIconPath: '/static/tabBar/news-active.png',
+ iconPath: '/static/tabBar/home.png',
+ selectedIconPath: '/static/tabBar/home-active.png',
pagePath: 'pages/evaluation/index/index',
- text: '测评',
+ text: '首页',
},
{
- iconPath: '/static/tabBar/center.png',
- selectedIconPath: '/static/tabBar/center-active.png',
+ iconPath: '/static/tabBar/user.png',
+ selectedIconPath: '/static/tabBar/user-active.png',
pagePath: 'pages/ucenter/index/index',
text: '我的',
},
diff --git a/src/components/userInfo/evaluateList.vue b/src/components/userInfo/evaluateList.vue
new file mode 100644
index 0000000..65ad047
--- /dev/null
+++ b/src/components/userInfo/evaluateList.vue
@@ -0,0 +1,95 @@
+
+
+
+
+ 我的测评报告
+
+
+
+
+
+
+ {{ item.title }}
+
+
+ {{ useFormatTime(item.createTime, 'YYYY.MM.DD hh:mm') || '时间消失了' }}
+
+
+
+
+
+ 去完成首次测评,生成你的专属报告
+
+ 前往测评
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/pages-sub/ucenter/evaluate/useRouterDetail.ts b/src/components/userInfo/useRouterDetail.ts
similarity index 100%
rename from src/pages-sub/ucenter/evaluate/useRouterDetail.ts
rename to src/components/userInfo/useRouterDetail.ts
diff --git a/src/components/userInfo/useTime.ts b/src/components/userInfo/useTime.ts
new file mode 100644
index 0000000..36e70bc
--- /dev/null
+++ b/src/components/userInfo/useTime.ts
@@ -0,0 +1,23 @@
+export default function formatDate(date: Date | string, format: string): string {
+ // 将输入转换为 Date 对象
+ const parsedDate = new Date(date)
+
+ // 检查是否是有效的日期
+ if (isNaN(parsedDate.getTime())) {
+ throw new Error('Invalid date')
+ }
+
+ const map: { [key: string]: string | number } = {
+ YYYY: parsedDate.getFullYear(), // 四位年份
+ MM: parsedDate.getMonth() + 1, // 月份,1-12
+ DD: parsedDate.getDate(), // 日期,1-31
+ hh: parsedDate.getHours(), // 小时,0-23
+ mm: parsedDate.getMinutes(), // 分钟,0-59
+ ss: parsedDate.getSeconds(), // 秒,0-59
+ }
+
+ return format.replace(/YYYY|MM|DD|hh|mm|ss/g, (match) => {
+ const value = map[match as keyof typeof map]
+ return Number(value) < 10 ? `0${value}` : value.toString() // 小于10的前面补零
+ })
+}
diff --git a/src/hooks/useTabbarList.ts b/src/hooks/useTabbarList.ts
index a65a2a9..287980d 100644
--- a/src/hooks/useTabbarList.ts
+++ b/src/hooks/useTabbarList.ts
@@ -4,16 +4,16 @@ const tabbarList = ref([
{
id: 3,
path: '/pages/evaluation/index/index',
- icon: '/static/tabBar/news.png',
- selectIcon: '/static/tabBar/news-active.png',
- text: '测评',
+ icon: '/static/tabBar/home.png',
+ selectIcon: '/static/tabBar/home-active.png',
+ text: '首页',
centerItem: false,
},
{
id: 4,
path: '/pages/ucenter/index/index',
- icon: '/static/tabBar/center.png',
- selectIcon: '/static/tabBar/center-active.png',
+ icon: '/static/tabBar/user.png',
+ selectIcon: '/static/tabBar/user-active.png',
text: '我的',
centerItem: false,
},
diff --git a/src/pages-evaluation-sub/evaluate/components/AiFooter.vue b/src/pages-evaluation-sub/evaluate/components/AiFooter.vue
index d040d04..26fd49e 100644
--- a/src/pages-evaluation-sub/evaluate/components/AiFooter.vue
+++ b/src/pages-evaluation-sub/evaluate/components/AiFooter.vue
@@ -5,21 +5,22 @@
@click="toAiAssistant"
v-if="aiShow"
>
-
- 智能AI顾问
-
+ 报告分享
+
diff --git a/src/pages-sub/ucenter/evaluate/evaluateList.vue b/src/pages-sub/ucenter/evaluate/evaluateList.vue
deleted file mode 100644
index ef4dc9c..0000000
--- a/src/pages-sub/ucenter/evaluate/evaluateList.vue
+++ /dev/null
@@ -1,60 +0,0 @@
-
-{
- style: {
- navigationBarTitleText: '测评结果',
- },
-}
-
-
-
-
-
-
-
-
- {{ item.title }}
-
- {{ item.createTime || '时间消失了' }}
-
-
-
-
- 暂无数据
-
-
-
-
-
-
-
-
diff --git a/src/pages.json b/src/pages.json
index 91ddad4..ca1bab5 100644
--- a/src/pages.json
+++ b/src/pages.json
@@ -23,14 +23,14 @@
"spacing": "3px",
"list": [
{
- "iconPath": "/static/tabBar/news.png",
- "selectedIconPath": "/static/tabBar/news-active.png",
+ "iconPath": "/static/tabBar/home.png",
+ "selectedIconPath": "/static/tabBar/home-active.png",
"pagePath": "pages/evaluation/index/index",
- "text": "测评"
+ "text": "首页"
},
{
- "iconPath": "/static/tabBar/center.png",
- "selectedIconPath": "/static/tabBar/center-active.png",
+ "iconPath": "/static/tabBar/user.png",
+ "selectedIconPath": "/static/tabBar/user-active.png",
"pagePath": "pages/ucenter/index/index",
"text": "我的"
}
@@ -46,15 +46,6 @@
"enableShareTimeline": true
}
},
- {
- "path": "pages/home/index/index",
- "type": "page",
- "style": {
- "navigationStyle": "custom",
- "enableShareAppMessage": true,
- "enableShareTimeline": true
- }
- },
{
"path": "pages/ucenter/index/index",
"type": "page",
@@ -99,13 +90,6 @@
"navigationStyle": "custom"
}
},
- {
- "path": "ucenter/evaluate/evaluateList",
- "type": "page",
- "style": {
- "navigationBarTitleText": "测评结果"
- }
- },
{
"path": "ucenter/setting/about",
"type": "page"
diff --git a/src/pages/home/index/index.vue b/src/pages/home/index/index.vue
deleted file mode 100644
index 0d1e68d..0000000
--- a/src/pages/home/index/index.vue
+++ /dev/null
@@ -1,180 +0,0 @@
-
-{
- style: {
- navigationStyle: 'custom',
- enableShareAppMessage: true,
- enableShareTimeline: true,
- },
-}
-
-
-
-
-
-
-
-
-
-
- {{ userStore.userInfo.city.provincename ?? '城市' }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/pages/ucenter/index/index.vue b/src/pages/ucenter/index/index.vue
index 104151e..67648fb 100644
--- a/src/pages/ucenter/index/index.vue
+++ b/src/pages/ucenter/index/index.vue
@@ -6,47 +6,41 @@
}
-
+
-
-
-
-
- {{ userStore.userInfo.nickname || '未登录' }}
-
+
+
+
+
+
+ {{ userStore.userInfo.nickname || '未登录' }}
+
+ 已完成 {{ evaluateTotal }} 项测评报告
+
+
+
+
+
+
+ 设置
-
-
-
-
- 测评结果
-
-
-
- 设置
-
-
-
+
+
@@ -55,12 +49,15 @@