litian
2024-03-28 7eab4acb4bb2060970f81840e5d2b72f259b07cb
assets/js/middleGround/api/ugc.js
@@ -1,14 +1,15 @@
import request from "../../../request/index";
import { tokenKey } from "../../config";
import {
  tokenKey
} from "../../config";
import toolClass from "../../toolClass";
let token = wx.getStorageSync(tokenKey) ? wx.getStorageSync(tokenKey) : ''
let token = wx.getStorageSync(tokenKey) ? wx.getStorageSync(tokenKey) : '';
const ugcApi = {
  // 获取商品点赞Topic
  getProductLikesTopic(data) {
    return request({
      url: token
        ? "/ugc/api/ApiAppUserGetProductLikesTopic"
        : "/ugc/api/ApiGetProductLikesTopic",
      url: token ?
        "/ugc/api/ApiAppUserGetProductLikesTopic" : "/ugc/api/ApiGetProductLikesTopic",
      method: "post",
      data,
    });
@@ -17,9 +18,8 @@
  // 获取商品评论Topic
  getProductCommentTopic(data) {
    return request({
      url: token
        ? "/ugc/api/ApiAppUserGetProductCommentTopic"
        : "/ugc/api/ApiGetProductCommentTopic",
      url: token ?
        "/ugc/api/ApiAppUserGetProductCommentTopic" : "/ugc/api/ApiGetProductCommentTopic",
      method: "post",
      data,
    });
@@ -28,9 +28,8 @@
  // 获取MessageList
  getTopicMessageList(data) {
    return request({
      url: token
        ? "/ugc/api/ApiAppUserGetTopicMessageList"
        : "/ugc/api/ApiGetTopicMessageList",
      url: token ?
        "/ugc/api/ApiAppUserGetTopicMessageList" : "/ugc/api/ApiGetTopicMessageList",
      method: "post",
      data,
    });
@@ -96,4 +95,4 @@
  // },
};
export default ugcApi;
export default ugcApi;