From c0a6629310e9d4836bcc31e6c58e3de557ebf991 Mon Sep 17 00:00:00 2001
From: "34701892@qq.com" <34701892@qq.com>
Date: Thu, 6 Nov 2025 19:15:30 +0800
Subject: [PATCH] =?UTF-8?q?feat:=20=E6=9B=B4=E6=96=B0=E7=BC=96=E8=BE=91?=
=?UTF-8?q?=E7=B2=BE=E9=80=89=E5=8A=9F=E8=83=BD=E5=B9=B6=E4=BC=98=E5=8C=96?=
=?UTF-8?q?=E8=B5=84=E8=AE=AF=E5=B1=95=E7=A4=BA?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
- 修改编辑精选接口路径
- 启用编辑精选菜单项
- 优化资讯列表和详情页的标签展示逻辑
- 添加关键词高亮功能
- 更新开发环境API地址
---
.env.development | 4 +--
src/api/index.ts | 3 +-
.../realtimeInfo/pc/components/PageTop.vue | 4 +--
src/pages/realtimeInfo/pc/indexPC.vue | 28 +++++++++----------
src/pages/realtimeInfo/pc/rank.vue | 24 ++++++++++++----
5 files changed, 37 insertions(+), 26 deletions(-)
diff --git a/.env.development b/.env.development
index e860144..c881666 100644
--- a/.env.development
+++ b/.env.development
@@ -3,9 +3,9 @@ ENV = development
# 本地环境接口地址
# VITE_API_URL = http://123.60.153.169:8040/apih5
-# VITE_API_URL = https://4155gf93ll13.vicp.fun/apih5
+VITE_API_URL = http://4155gf93ll13.vicp.fun/apih5
# VITE_API_URL = http://123.60.79.143:8041/apih5
# VITE_API_URL =http://localhost:8040/apih5
-VITE_API_URL = https://cankao.cs.com.cn/apih5
+# VITE_API_URL = https://cankao.cs.com.cn/apih5
VITE_API_DATAV_URL = https://cankao.cs.com.cn/zzck_datav
\ No newline at end of file
diff --git a/src/api/index.ts b/src/api/index.ts
index 5db54d9..3df669f 100644
--- a/src/api/index.ts
+++ b/src/api/index.ts
@@ -57,7 +57,6 @@ export const getUnlockList = (data: any) => {
// 全文搜索
-//
export const searchNews = (data: any) => {
return Request.post("/news/search", data);
};
@@ -70,5 +69,5 @@ export const getReleaseList = (data: any) => {
// 编辑精选接口
export const editTopNews = (data: any) => {
- return Request.post("/news/top_news_release_h5_d", data);
+ return Request.post("/news/list/published", data);
};
diff --git a/src/pages/realtimeInfo/pc/components/PageTop.vue b/src/pages/realtimeInfo/pc/components/PageTop.vue
index 0e15dbc..4c51b4d 100644
--- a/src/pages/realtimeInfo/pc/components/PageTop.vue
+++ b/src/pages/realtimeInfo/pc/components/PageTop.vue
@@ -17,10 +17,10 @@
-
+
diff --git a/src/pages/realtimeInfo/pc/indexPC.vue b/src/pages/realtimeInfo/pc/indexPC.vue
index f8ccca2..5e791f1 100644
--- a/src/pages/realtimeInfo/pc/indexPC.vue
+++ b/src/pages/realtimeInfo/pc/indexPC.vue
@@ -19,27 +19,29 @@
{{ infoData?.publishTime }}
-
+
{{ infoData?.summary }}
-
+
行业分类:
- {{
- item
- }}
+ {{
+ item
+ }}
-
+
概念标签:
- {{
- item
- }}
+ {{
+ item
+ }}
@@ -51,12 +53,8 @@
-->
-
+
diff --git a/src/pages/realtimeInfo/pc/rank.vue b/src/pages/realtimeInfo/pc/rank.vue
index 6746fc9..6215ecc 100644
--- a/src/pages/realtimeInfo/pc/rank.vue
+++ b/src/pages/realtimeInfo/pc/rank.vue
@@ -7,7 +7,7 @@
资讯头条榜
编辑精选
-
@@ -30,12 +30,17 @@
{{ item.title }}
- {{ item.summary }}
+ {{ item.summary }}
+
{{ item.source }}
- {{ dayjs(item.publish_time).format("YYYY-MM-DD HH:MM:ss")
+ {{
+ dayjs(item.publish_time).format("YYYY-MM-DD HH:MM:ss")
+ }}
+ {{
+ item.time
}}
@@ -70,7 +75,7 @@ import { useRoute, useRouter } from "vue-router";
const pageSizes = ref([10, 20, 30, 40]);
const form = reactive({
- keyWord: "",
+ keyword: "",
page: 1,
size: 10,
total: 10
@@ -94,6 +99,9 @@ async function getNewsList() {
if (code == 200) {
newsList.value = data.list;
form.total = data.total;
+ data.list.forEach((item) => {
+ item.summary = item.summary.replace(form.keyword, "" + form.keyword + '');
+ });
}
} else {
// 概念标签贴标
@@ -102,8 +110,14 @@ async function getNewsList() {
}
function goDetail(item) {
+ let id = null
+ if (pageType.value != 4) {
+ id = item.news_id
+ } else {
+ id = item.id
+ }
uni.navigateTo({
- url: "/pages/realtimeInfo/pc/indexPC?id=" + item.news_id + "&type=1",
+ url: "/pages/realtimeInfo/pc/indexPC?id=" + id + "&type=" + pageType.value,
});
}