From 650d5aefcc64817ad258064622c4fc8f112009a0 Mon Sep 17 00:00:00 2001 From: "34701892@qq.com" <34701892@qq.com> Date: Mon, 18 Aug 2025 13:05:24 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E5=BE=AE=E4=BF=A1?= =?UTF-8?q?=E5=88=86=E4=BA=AB=E5=8A=9F=E8=83=BD=E5=B9=B6=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E6=90=9C=E7=B4=A2=E9=A1=B5=E9=9D=A2=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 新增微信分享API接口和分享功能实现 - 修改请求头中phone字段为userPhone - 优化搜索页面UI和交互逻辑 - 调整文章列表样式和分享按钮功能 - 添加搜索页面导航栏和返回功能 --- src/api/index.ts | 5 + src/components/articleList/index.vue | 77 +++++++++++--- src/components/comment/indexMini.vue | 9 +- src/pages/detail/indexNewsInfo.vue | 20 +++- src/pages/minihome/index.vue | 10 +- src/pages/sreachReq/index.vue | 145 +++++++++++++++++++-------- src/utils/index.ts | 2 +- 7 files changed, 205 insertions(+), 63 deletions(-) diff --git a/src/api/index.ts b/src/api/index.ts index ccf3ca3..0068af6 100644 --- a/src/api/index.ts +++ b/src/api/index.ts @@ -67,3 +67,8 @@ export const doWxAuth = (data: any) => { return Request.post("/common/auth", data); }; +// 微信分享 +export const doShare = (data: any) => { + return Request.post("/user/share", data); +}; + diff --git a/src/components/articleList/index.vue b/src/components/articleList/index.vue index 7746966..e13a1d7 100644 --- a/src/components/articleList/index.vue +++ b/src/components/articleList/index.vue @@ -10,13 +10,10 @@ }} - - {{ item.title }} - - - + + {{ item.summary }} @@ -24,20 +21,33 @@ - - {{ item.tag }} - + - {{ item.time }} - - {{ item.readNums || 0 }}阅读 - {{ item.likeNums || 0 }}点赞 - + + {{ item.tag }} + {{ item.time }} + + + + + {{ item.readNums }} + + + {{ item.likeNums }} + + + {{ item.shareNums }} + - + @@ -139,7 +149,13 @@ const handleClick = (item: any) => { white-space: normal; // font-weight: bold; word-break: break-all; - font-family: "SourceHanSansCN-Medium"; + font-family: PingFangSC, PingFang SC; + font-weight: bold; + font-size: 32rpx; + color: #192236; + line-height: 45rpx; + text-align: left; + font-style: normal; // text-align: left; &.noAbstract { @@ -190,6 +206,14 @@ const handleClick = (item: any) => { overflow: hidden; text-overflow: ellipsis; white-space: normal; + + font-family: PingFangSC, PingFang SC; + font-weight: 400; + font-size: 24rpx; + color: #2D3849; + line-height: 33rpx; + text-align: left; + font-style: normal; } } } @@ -247,4 +271,27 @@ const handleClick = (item: any) => { .listItemTitleContentText { font-family: "SourceHanSansCN-Medium"; } + + +.r_option { + display: flex; + align-items: center; + justify-content: center; + gap: 10rpx; + + .option_icon { + width: 24rpx; + height: 24rpx; + } + + .option_text { + font-family: PingFangSC, PingFang SC; + font-weight: 400; + font-size: 24rpx; + color: #192236; + line-height: 33rpx; + text-align: justify; + font-style: normal; + } +} diff --git a/src/components/comment/indexMini.vue b/src/components/comment/indexMini.vue index 1b6d619..6111a27 100644 --- a/src/components/comment/indexMini.vue +++ b/src/components/comment/indexMini.vue @@ -16,11 +16,11 @@ 收藏 - + @@ -123,4 +123,9 @@ const handleSubmit = () => { } } } + + +button::after { + border: 0; +} diff --git a/src/pages/detail/indexNewsInfo.vue b/src/pages/detail/indexNewsInfo.vue index 0dc9d7a..9e14e6b 100644 --- a/src/pages/detail/indexNewsInfo.vue +++ b/src/pages/detail/indexNewsInfo.vue @@ -49,14 +49,14 @@ diff --git a/src/utils/index.ts b/src/utils/index.ts index 81cfa0d..916a78a 100644 --- a/src/utils/index.ts +++ b/src/utils/index.ts @@ -51,7 +51,7 @@ Request.setConfig((config: any) => { if (uni.getStorageSync("token")) { // config.header["Authorization"] = "Bearer " + uni.getStorageSync("token"); config.header!["auth-token"] = uni.getStorageSync("token"); - config.header!["phone"] = uni.getStorageSync("phone"); + config.header!["phone"] = uni.getStorageSync("userPhone"); } return config;