From aada0e1c2c2a49f82e264cf1cf30fb16225e2d9e Mon Sep 17 00:00:00 2001
From: zzp <34701892@qq.com>
Date: Wed, 27 Aug 2025 17:30:50 +0800
Subject: [PATCH] =?UTF-8?q?feat(rankDetail):=20=E9=87=8D=E6=9E=84=E6=8E=92?=
=?UTF-8?q?=E8=A1=8C=E8=AF=A6=E6=83=85=E9=A1=B5=E5=B9=B6=E6=B7=BB=E5=8A=A0?=
=?UTF-8?q?=E6=90=9C=E7=B4=A2=E5=8A=9F=E8=83=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
- 重构排行详情页UI,添加顶部背景图和搜索框
- 实现搜索功能并添加搜索确认事件
- 添加下拉刷新功能
- 优化标题显示逻辑,修复切片显示问题
- 调整列表项样式,添加阅读数等统计信息
- 添加登录状态检查跳转逻辑
---
src/components/RankListMini.vue | 4 +-
src/components/articleList/index.vue | 2 +-
src/config/index.ts | 4 +-
src/pages.json | 4 +-
src/pages/minihome/index.vue | 12 +-
src/pages/realtimeInfo/rankDetail.vue | 252 +++++++++++++++++++++-----
src/pages/sreachReq/index.vue | 4 +-
7 files changed, 230 insertions(+), 52 deletions(-)
diff --git a/src/components/RankListMini.vue b/src/components/RankListMini.vue
index fea3b18..36cad52 100644
--- a/src/components/RankListMini.vue
+++ b/src/components/RankListMini.vue
@@ -38,7 +38,7 @@
{{ item.title.slice(0, 3) }}
{{
- item.title.slice(3, item.title.length - 1)
+ item.title.slice(3, item.title.length)
}}
{{
@@ -340,7 +340,7 @@ const handlePopupErrorCallback = () => {
justify-content: space-between;
font-size: 12px;
color: #999;
- margin-top: 10rpx;
+ margin-top: 30rpx;
}
.source,
diff --git a/src/components/articleList/index.vue b/src/components/articleList/index.vue
index aaa54cc..3f6a821 100644
--- a/src/components/articleList/index.vue
+++ b/src/components/articleList/index.vue
@@ -27,7 +27,7 @@
{{ item.title.slice(0, 3) }}
- {{ item.title.slice(3, item.title.length - 1) }}
+ {{ item.title.slice(3, item.title.length) }}
diff --git a/src/config/index.ts b/src/config/index.ts
index 7277d70..754b29d 100644
--- a/src/config/index.ts
+++ b/src/config/index.ts
@@ -1,7 +1,7 @@
-// const baseURL = "http://192.168.31.25:8060/api";
+// const baseUrl = "http://192.168.31.25:8060/api";
+// export const baseUrl = "http://127.0.0.1:8040/apih5";
// export const baseUrl = "http://192.168.3.38:8040/apih5";
export const baseUrl = "https://cankao.cs.com.cn/mini";
-// export const baseUrl = "https://cankao.cs.com.cn/apih5";
export const baseUrlDataV = "https://cankao.cs.com.cn/zzck_datav";
// export const baseUrlDataV = "http://123.60.153.169:9995/zzck_datav";
diff --git a/src/pages.json b/src/pages.json
index e92d312..702c6c0 100644
--- a/src/pages.json
+++ b/src/pages.json
@@ -26,7 +26,9 @@
"path": "pages/login/indexMini"
},
{
- "path": "pages/realtimeInfo/rankDetail"
+ "path": "pages/realtimeInfo/rankDetail",
+ "navigationStyle": "custom",
+ "enablePullDownRefresh": true
},
{
"path": "pages/home/index",
diff --git a/src/pages/minihome/index.vue b/src/pages/minihome/index.vue
index 116a0ae..f80c655 100644
--- a/src/pages/minihome/index.vue
+++ b/src/pages/minihome/index.vue
@@ -121,9 +121,15 @@ function tabChange(index) {
}
function goSreach() {
- uni.navigateTo({
- url: "/pages/sreachReq/index",
- });
+ if (uni.getStorageSync("token")) {
+ uni.navigateTo({
+ url: "/pages/sreachReq/index",
+ });
+ } else {
+ uni.navigateTo({
+ url: "/pages/login/indexMini",
+ });
+ }
}
const isScroll = ref(false);
diff --git a/src/pages/realtimeInfo/rankDetail.vue b/src/pages/realtimeInfo/rankDetail.vue
index 16a9054..0f52de4 100644
--- a/src/pages/realtimeInfo/rankDetail.vue
+++ b/src/pages/realtimeInfo/rankDetail.vue
@@ -1,58 +1,132 @@
-
+
-
+ > -->
-
-
-
-
- {{ item.content }}
-
-
-
-
+
-
-
+
-
-
- {{ item.title.slice(0, 3) }}
- {{
- item.title.slice(3, item.title.length - 1)
- }}
-
+ :style="{
+ height: getNavHeight() + 'px',
+ backgroundColor: isScroll ? '#fff' : 'transparent',
+ position: 'sticky',
+ top: 0,
+ zIndex: '999999',
+ }"
+ >
-
-
- {{
- item.summary
- }}
-
- {{ item.tag }}
- {{ item.time }}
+
+
+
+
+
+
+
+
+
+
+
+ 搜索资讯
+
+
+
+
+
+
+ {{ item.content }}
+
+
+
+
+
+
+
+
+
+
+ {{ item.title.slice(0, 3) }}
+ {{
+ item.title.slice(3, item.title.length)
+ }}
+
+
+
+
+ {{
+ item.summary
+ }}
+
+
+ {{ item.tag }}
+ {{ item.time }}
+
+
+
+
+ {{ item.readNums }}
+
+
+ {{ item.likeNums }}
+
+
+ {{ item.shareNums }}
+
+
+
+
+
+
-
@@ -169,8 +243,19 @@ function goDetail(item) {
}
}
-const tagClickedClass = ref("");
+function goSreach() {
+ if (uni.getStorageSync("token")) {
+ uni.navigateTo({
+ url: "/pages/sreachReq/index",
+ });
+ } else {
+ uni.navigateTo({
+ url: "/pages/login/indexMini",
+ });
+ }
+}
+const tagClickedClass = ref("");
const props = reactive({});
onLoad(async (e) => {
@@ -202,6 +287,9 @@ onMounted(async () => {});
diff --git a/src/pages/sreachReq/index.vue b/src/pages/sreachReq/index.vue
index 39d0e9e..9e6c5d3 100644
--- a/src/pages/sreachReq/index.vue
+++ b/src/pages/sreachReq/index.vue
@@ -43,9 +43,11 @@