diff --git a/api/my-index.js b/api/my-index.js index ad2eb85..bcf8916 100644 --- a/api/my-index.js +++ b/api/my-index.js @@ -197,3 +197,46 @@ export const getUserTradeRecordList = data => { data }) } + +/** 发布朋友圈 */ +export const addUserMoments = data => { + return http({ + url: '/api/service/userMoments', + method: 'post', + data + }) +} + +/** 获取朋友圈列表 */ +export const getUserMomentsList = data => { + return http({ + url: '/api/service/userMoments/list', + method: 'get', + data + }) +} + +/** 点赞 */ +export const likeUserMoments = id => { + return http({ + url: `/api/service/userMoments/like/${id}`, + method: 'put' + }) +} + +/** 发布评论 */ +export const addUserMomentsComment = data => { + return http({ + url: '/api/service/userMoments/comment', + method: 'post', + data + }) +} + +/** 删除 */ +export const deleteUserMoments = id => { + return http({ + url: `/api/service/userMoments/${id}`, + method: 'delete' + }) +} \ No newline at end of file diff --git a/pages/discover/dynamic/dynamic.vue b/pages/discover/dynamic/dynamic.vue index a956841..f33b665 100644 --- a/pages/discover/dynamic/dynamic.vue +++ b/pages/discover/dynamic/dynamic.vue @@ -1,72 +1,171 @@