From 53295275d955fa4a2f91199f8c03ede835fa3d64 Mon Sep 17 00:00:00 2001
From: lzx_win <2602107437@qq.com>
Date: Thu, 9 Oct 2025 16:50:05 +0800
Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E6=B5=8F=E8=A7=88?=
=?UTF-8?q?=E8=AE=B0=E5=BD=95=E5=8A=9F=E8=83=BD=E5=B9=B6=E9=87=8D=E6=9E=84?=
=?UTF-8?q?=E7=B2=89=E4=B8=9D=E5=88=97=E8=A1=A8=E7=BB=84=E4=BB=B6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
- 将环境配置从 local 改为 prod
- 新增 browseRecord 模型及相关 API 接口
- 提取粉丝列表为独立组件 FansList 并在多处复用
- 在群组详情页二维码图片添加长按菜单功能
- 重构帖子详情页的浏览/点赞/分享列表展示逻辑
---
api/api.js | 2 +-
api/model/browseRecord.js | 19 ++++++++
components/list/fansList.vue | 87 ++++++++++++++++++++++++++++++++++
config.js | 2 +-
pages_order/group/groupDetail.vue | 5 +-
pages_order/mine/fans.vue | 65 +++----------------------
pages_order/post/postDetail.vue | 99 +++++++--------------------------------
7 files changed, 134 insertions(+), 145 deletions(-)
create mode 100644 api/model/browseRecord.js
create mode 100644 components/list/fansList.vue
diff --git a/api/api.js b/api/api.js
index 59f5acd..d05691f 100644
--- a/api/api.js
+++ b/api/api.js
@@ -435,7 +435,7 @@ const config = {
},
}
-const models = ['order', 'group', 'article']
+const models = ['order', 'group', 'article', 'browseRecord']
models.forEach(key => {
addApiModel(require(`./model/${key}.js`).default, key)
diff --git a/api/model/browseRecord.js b/api/model/browseRecord.js
new file mode 100644
index 0000000..e9f1c60
--- /dev/null
+++ b/api/model/browseRecord.js
@@ -0,0 +1,19 @@
+// 评论相关接口
+
+const api = {
+ //发布评论
+ addBrowseRecord: {
+ url: '/city/browseRecord/addBrowseRecord',
+ method: 'POST',
+ limit : 1000,
+ auth : true,
+ showLoading : true,
+ },
+ //获取评论列表type-0帖子-1租房-2工作-3景点-4美食-5活动-6人找车-7车找人-8文章
+ getBrowseRecordPage: {
+ url: '/city/browseRecord/getBrowseRecordPage',
+ method: 'GET',
+ },
+}
+
+export default api
\ No newline at end of file
diff --git a/components/list/fansList.vue b/components/list/fansList.vue
new file mode 100644
index 0000000..9d84486
--- /dev/null
+++ b/components/list/fansList.vue
@@ -0,0 +1,87 @@
+
+
+
+
+
+
+
+
+ {{ getItem(item).nickName }}
+
+
+ {{ getItem(item).createTime }}
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/config.js b/config.js
index 752d6ee..7017a57 100644
--- a/config.js
+++ b/config.js
@@ -7,7 +7,7 @@ import uvUI from '@/uni_modules/uv-ui-tools'
Vue.use(uvUI);
// 当前环境
-const type = 'local'
+const type = 'prod'
// 环境配置
diff --git a/pages_order/group/groupDetail.vue b/pages_order/group/groupDetail.vue
index 205e820..5de8ee3 100644
--- a/pages_order/group/groupDetail.vue
+++ b/pages_order/group/groupDetail.vue
@@ -18,7 +18,10 @@
扫码加入群聊
-
+
长按保存二维码,微信扫码加入
diff --git a/pages_order/mine/fans.vue b/pages_order/mine/fans.vue
index c3ec7b4..f8b5db4 100644
--- a/pages_order/mine/fans.vue
+++ b/pages_order/mine/fans.vue
@@ -7,32 +7,18 @@
placeholder="请输入搜索关键字..." v-model="queryParams.title">
-
-
-
-
-
-
-
- {{ item.nickName }}
-
-
-
- {{ item.createTime }}
-
-
-
-
-
-
-
+
+
+
\ No newline at end of file
diff --git a/pages_order/post/postDetail.vue b/pages_order/post/postDetail.vue
index d3c9159..683af1d 100644
--- a/pages_order/post/postDetail.vue
+++ b/pages_order/post/postDetail.vue
@@ -27,18 +27,8 @@
@click="tabsClick">
-
-
-
+
+
@@ -61,7 +51,7 @@
import daynamicInfo from '@/components/list/dynamic/daynamicInfo.vue'
import statisticalDataInfo from '@/components/list/statisticalDataInfo.vue'
import dynamicToShop from '@/components/list/dynamic/dynamicToShop.vue'
- import avatarStack from '@/components/list/avatarStack.vue'
+ import FansList from '@/components/list/fansList.vue'
export default {
mixins: [mixinsSex, mixinsList],
components: {
@@ -70,51 +60,13 @@
daynamicInfo,
statisticalDataInfo,
dynamicToShop,
- avatarStack,
+ FansList,
},
data() {
return {
detail: {
},
- // 测试数据 - 查看过帖子的用户头像
- viewedUsers: [
- {
- id: '1',
- userHead: '/static/image/logo.jpg',
- name: '用户A'
- },
- {
- id: '2',
- userHead: 'https://image.hhlm1688.com/2025-06-08/67fbe844-da4a-4272-8d51-364453d0f3aa.jpeg',
- name: '用户B'
- },
- {
- id: '3',
- userHead: '/static/image/logo.jpg',
- name: '用户C'
- },
- {
- id: '4',
- userHead: 'https://image.hhlm1688.com/2025-06-08/67fbe844-da4a-4272-8d51-364453d0f3aa.jpeg',
- name: '用户D'
- },
- {
- id: '5',
- userHead: '/static/image/logo.jpg',
- name: '用户E'
- },
- {
- id: '6',
- userHead: 'https://image.hhlm1688.com/2025-06-08/67fbe844-da4a-4272-8d51-364453d0f3aa.jpeg',
- name: '用户F'
- },
- {
- id: '7',
- userHead: '/static/image/logo.jpg',
- name: '用户G'
- }
- ],
mixinsListApi : 'getCommentPage',
params : {
type : '0',
@@ -123,16 +75,20 @@
},
tags : [
{
- name : '评论'
+ name : '评论',
+ api : 'getCommentPage',
},
{
- name : '浏览'
+ name : '浏览',
+ api : 'getBrowseRecordPage',
},
{
- name : '点赞'
+ name : '点赞',
+ api : 'getBrowseRecordPage',
},
{
- name : '分享'
+ name : '分享',
+ api : 'getBrowseRecordPage',
},
],
tagIndex : 0,
@@ -146,6 +102,7 @@
this.id = options.id
this.queryParams.type = this.params.type
this.queryParams.orderId = options.id
+ this.queryParams.formId = options.id
this.params.orderId = options.id
},
@@ -171,6 +128,9 @@
methods: {
tabsClick({index}){
this.tagIndex = index
+ this.mixinsListApi = this.tags[index].api
+ this.queryParams.category = index - 1
+ this.getData()
},
getDetail() {
this.$api('getPostDetail', {
@@ -185,30 +145,6 @@
}
})
},
-
- // 处理头像点击事件
- handleAvatarClick(avatar, index) {
- console.log('点击头像:', avatar, index);
- // 可以跳转到用户详情页面
- this.$u.route({
- url: '/pages_order/user/userDetail',
- params: {
- userId: avatar.id
- }
- });
- },
-
- // 处理查看更多用户事件
- handleMoreViewers() {
- console.log('查看更多查看者');
- // 可以跳转到查看者列表页面
- this.$u.route({
- url: '/pages_order/post/viewersList',
- params: {
- postId: this.detail.id
- }
- });
- },
}
}
@@ -251,9 +187,6 @@
}
}
.avatarStack {
- display: flex;
- justify-content: flex-end;
- margin: 20rpx;
}
}
\ No newline at end of file