杨磊
1 天以前 231de87426edb19d38e62a669034108e3a74069d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
import request from "@/plugin/axios";
import { tokenKey } from "@/assets/js/config";
import toolClass from "@/assets/js/toolClass";
// let token = toolClass.getCookie(tokenKey);
const ugcApi = {
  // 获取商品点赞Topic
  getProductLikesTopic(data) {
    return request({
      url: toolClass.getCookie(tokenKey)
        ? "/ugc/api/ApiAppUserGetProductLikesTopic"
        : "/ugc/api/ApiGetProductLikesTopic",
      method: "post",
      data,
    });
  },
 
  // 获取商品评论Topic
  getProductCommentTopic(data) {
    return request({
      url: toolClass.getCookie(tokenKey)
        ? "/ugc/api/ApiAppUserGetProductCommentTopic"
        : "/ugc/api/ApiGetProductCommentTopic",
      method: "post",
      data,
    });
  },
 
  // 获取MessageList
  getTopicMessageList(data) {
    return request({
      url: toolClass.getCookie(tokenKey)
        ? "/ugc/api/ApiAppUserGetTopicMessageList"
        : "/ugc/api/ApiGetTopicMessageList",
      method: "post",
      data,
    });
  },
 
  // 新建Message
  newTopicMessage(data) {
    return request({
      url: "/ugc/api/ApiNewTopicMessage",
      method: "post",
      data,
    });
  },
 
  // 删除Message
  delTopicMessage(data) {
    return request({
      url: "/ugc/api/ApiDelTopicMessage",
      method: "post",
      data,
    });
  },
 
  // 获取cms评论
  getCmsItemCommentTopic(data) {
    return request({
      url: "/ugc/api/ApiGetCmsItemCommentTopic",
      method: "post",
      data,
    });
  },
 
  // 获取用户提交的教学资源
  getProductUserSubmitTopic(data) {
    return request({
      url: "/ugc/api/ApiGetProductUserSubmitTopic",
      method: "post",
      data,
    });
  },
 
  //更新TOPICMESSAGE
  updateTopicMessage(data) {
    return request({
      url: "/ugc/api/ApiUpdateTopicMessage",
      method: "post",
      data,
    });
  },
};
 
export default ugcApi;