diff --git a/.trae/rules/project_rules.md b/.trae/rules/project_rules.md index f273bfb..d4acf4f 100644 --- a/.trae/rules/project_rules.md +++ b/.trae/rules/project_rules.md @@ -1,6 +1 @@ - - - -功能模块 -同城群:显示各个地区同城群聊的基本信息,不需要实时聊天、不需要加入群聊、点击进行播放广告看完广告显示群聊二维码 - +项目中有关颜色的都使用uni.scss的$uni-color变量 \ No newline at end of file diff --git a/api/api.js b/api/api.js index 4460596..59f5acd 100644 --- a/api/api.js +++ b/api/api.js @@ -1,5 +1,6 @@ import http from './http.js' import utils from '../utils/utils.js' +import commentApi from './model/comment.js' let limit = {} @@ -158,11 +159,6 @@ const config = { url: '/city/getScenicDetail', method: 'GET', }, - //获取评论列表type-0帖子-1租房-2工作-3景点-4美食-5活动-6人找车-7车找人 - getCommentPage: { - url: '/city/getCommentPage', - method: 'GET', - }, //获取江华人信息接口 getJiangHuInfo: { url: '/city/getJiangHuInfo', @@ -212,14 +208,6 @@ const config = { auth : true, showLoading : true, }, - //发布评论 - addComment: { - url: '/token/addComment', - method: 'POST', - limit : 1000, - auth : true, - showLoading : true, - }, //发布租房信息 publishRent: { url: '/token/publishRent', @@ -445,86 +433,6 @@ const config = { auth : true, showLoading : true, }, - - // 获取群组列表 - getGroupList : { - url: '/group/getGroupList', - method: 'GET', - auth : false, - limit : 1000, - }, - - // 获取群组详情 - getGroupDetail : { - url: '/group/getGroupDetail', - method: 'GET', - auth : true, - limit : 1000, - }, - - // 加入群组 - joinGroup : { - url: '/group/joinGroup', - method: 'POST', - auth : true, - showLoading : true, - }, - - // 退出群组 - quitGroup : { - url: '/group/quitGroup', - method: 'POST', - auth : true, - showLoading : true, - }, - - // 创建群组 - createGroup : { - url: '/group/createGroup', - method: 'POST', - auth : true, - showLoading : true, - }, - - // 发送群组消息 - sendGroupMessage : { - url: '/group/sendMessage', - method: 'POST', - auth : true, - showLoading : false, - }, - - // 获取群组消息列表 - getGroupMessages : { - url: '/group/getMessages', - method: 'GET', - auth : true, - limit : 1000, - }, - - // 更新群组公告 - updateGroupAnnouncement : { - url: '/group/updateAnnouncement', - method: 'POST', - auth : true, - showLoading : true, - }, - - // 解散群组 - dissolveGroup : { - url: '/group/dissolveGroup', - method: 'POST', - auth : true, - showLoading : true, - }, - - // 转让群主 - transferGroup : { - url: '/group/transferGroup', - method: 'POST', - auth : true, - showLoading : true, - }, } const models = ['order', 'group', 'article'] @@ -610,6 +518,9 @@ function addApiModel(model, key){ } } +// 添加评论模块API +addApiModel(commentApi, 'comment') + export default api \ No newline at end of file diff --git a/api/model/comment.js b/api/model/comment.js new file mode 100644 index 0000000..12e68a7 --- /dev/null +++ b/api/model/comment.js @@ -0,0 +1,25 @@ +// 评论相关接口 + +const api = { + // 获取评论详情 + getCommentDetail: { + url: '/token/commentDetail', + method: 'GET', + auth: true, + }, + //发布评论 + addComment: { + url: '/token/addComment', + method: 'POST', + limit : 1000, + auth : true, + showLoading : true, + }, + //获取评论列表type-0帖子-1租房-2工作-3景点-4美食-5活动-6人找车-7车找人-8文章 + getCommentPage: { + url: '/city/getCommentPage', + method: 'GET', + }, +} + +export default api \ No newline at end of file diff --git a/components/base/navbar.vue b/components/base/navbar.vue index 4948bfb..eea9b4a 100644 --- a/components/base/navbar.vue +++ b/components/base/navbar.vue @@ -2,7 +2,7 @@ + :style="{background : bgColor, color, width: '100vw'}"> + + + + + + + 加载中... + + + + + 加载失败,请重试 + + + + + + + + + + + {{mainComment.userValue}} + + + + + + + + + {{totalReplies}}条回复 + + + 回复 + + + + + + + + + + + + + + 回复 + @{{item.replyToUserName}} + + + {{item.userValue}} + + + + + + + + + + + {{item.replyNum}}条回复 > + + + + + 回复 + + + + + + + + 加载更多 + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/pages_order/components/list/comment/commentItem.vue b/pages_order/components/list/comment/commentItem.vue index 751b77c..377cf96 100644 --- a/pages_order/components/list/comment/commentItem.vue +++ b/pages_order/components/list/comment/commentItem.vue @@ -1,5 +1,5 @@