| | |
| | | import request from '@/plugin/axios/index.ts' |
| | | import { tokenKey } from '@/assets/js/config.js' |
| | | import toolClass from '@/assets/js/toolClass.js' |
| | | import request from "@/plugin/axios/index.ts"; |
| | | import { tokenKey } from "@/assets/js/config.js"; |
| | | import toolClass from "@/assets/js/toolClass.js"; |
| | | const ugcApi = { |
| | | // 获取商品点赞Topic |
| | | getProductLikesTopic(data) { |
| | | return request({ |
| | | url: localStorage.getItem(tokenKey) |
| | | ? '/ugc/api/ApiAppUserGetProductLikesTopic' |
| | | : '/ugc/api/ApiGetProductLikesTopic', |
| | | method: 'post', |
| | | data |
| | | }) |
| | | ? "/ugc/api/ApiAppUserGetProductLikesTopic" |
| | | : "/ugc/api/ApiGetProductLikesTopic", |
| | | method: "post", |
| | | data, |
| | | }); |
| | | }, |
| | | |
| | | // 获取商品评论Topic |
| | | getProductCommentTopic(data) { |
| | | return request({ |
| | | url: localStorage.getItem(tokenKey) |
| | | ? '/ugc/api/ApiAppUserGetProductCommentTopic' |
| | | : '/ugc/api/ApiGetProductCommentTopic', |
| | | method: 'post', |
| | | data |
| | | }) |
| | | ? "/ugc/api/ApiAppUserGetProductCommentTopic" |
| | | : "/ugc/api/ApiGetProductCommentTopic", |
| | | method: "post", |
| | | data, |
| | | }); |
| | | }, |
| | | |
| | | // 获取MessageList |
| | | getTopicMessageList(data) { |
| | | return request({ |
| | | url: localStorage.getItem(tokenKey) |
| | | ? '/ugc/api/ApiAppUserGetTopicMessageList' |
| | | : '/ugc/api/ApiGetTopicMessageList', |
| | | method: 'post', |
| | | data |
| | | }) |
| | | }, |
| | | |
| | | // 获取子MessageList |
| | | getTopicMessageSubList(data) { |
| | | return request({ |
| | | url:'/ugc/api/ApiAppUserGetSubMessageList', |
| | | method: 'post', |
| | | data |
| | | }) |
| | | }, |
| | | |
| | | |
| | | // 获取MessageList子message |
| | | getChildTopicMessageList(data) { |
| | | return request({ |
| | | url: '/ugc/api/ApiAppUserGetSubMessageList', |
| | | method: 'post', |
| | | data |
| | | }) |
| | | ? "/ugc/api/ApiAppUserGetTopicMessageList" |
| | | : "/ugc/api/ApiGetTopicMessageList", |
| | | method: "post", |
| | | data, |
| | | }); |
| | | }, |
| | | // 用户根据消息类型获取列表 |
| | | getMessageList(data) { |
| | | return request({ |
| | | url: '/ugc/api/ApiGetMessageList', |
| | | method: 'post', |
| | | data |
| | | }) |
| | | url: "/ugc/api/ApiGetMessageList", |
| | | method: "post", |
| | | data, |
| | | }); |
| | | }, |
| | | |
| | | // 新建Message |
| | | newTopicMessage(data) { |
| | | return request({ |
| | | url: '/ugc/api/ApiNewTopicMessage', |
| | | method: 'post', |
| | | data |
| | | }) |
| | | url: "/ugc/api/ApiNewTopicMessage", |
| | | method: "post", |
| | | data, |
| | | }); |
| | | }, |
| | | |
| | | // 删除Message |
| | | delTopicMessage(data) { |
| | | return request({ |
| | | url: '/ugc/api/ApiDelTopicMessage', |
| | | method: 'post', |
| | | data |
| | | }) |
| | | url: "/ugc/api/ApiDelTopicMessage", |
| | | method: "post", |
| | | data, |
| | | }); |
| | | }, |
| | | // 更新message |
| | | updateTopicMessage(data) { |
| | | return request({ |
| | | url: '/ugc/api/ApiUpdateTopicMessage', |
| | | method: 'post', |
| | | url:'/ugc/api/ApiUpdateTopicMessage', |
| | | method:'post', |
| | | data |
| | | }) |
| | | }, |
| | | // 获取cms评论 |
| | | getCmsItemCommentTopic(data) { |
| | | return request({ |
| | | url: '/ugc/api/ApiGetCmsItemCommentTopic', |
| | | method: 'post', |
| | | data |
| | | }) |
| | | url: "/ugc/api/ApiGetCmsItemCommentTopic", |
| | | method: "post", |
| | | data, |
| | | }); |
| | | }, |
| | | // 获取用户提交的教学资源 |
| | | getProductUserSubmitTopic(data) { |
| | | return request({ |
| | | url: '/ugc/api/ApiGetProductUserSubmitTopic', |
| | | method: 'post', |
| | | data |
| | | }) |
| | | } |
| | | url: "/ugc/api/ApiGetProductUserSubmitTopic", |
| | | method: "post", |
| | | data, |
| | | }); |
| | | }, |
| | | |
| | | //更新TOPICMESSAGE |
| | | // updateTopicMessage(data) { |
| | |
| | | // data, |
| | | // }); |
| | | // }, |
| | | } |
| | | }; |
| | | |
| | | export default ugcApi |
| | | export default ugcApi; |