闫增涛
2024-04-30 dc934dfd63fecff84d0bf996418e041b9bd4ea59
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) : ''
const ugcApi = {
  // 获取商品点赞Topic
  getProductLikesTopic(data) {
    let token = wx.getStorageSync(tokenKey) ? wx.getStorageSync(tokenKey) : '';
    return request({
      url: token
        ? "/ugc/api/ApiAppUserGetProductLikesTopic"
        : "/ugc/api/ApiGetProductLikesTopic",
      url: token ?
        "/ugc/api/ApiAppUserGetProductLikesTopic" : "/ugc/api/ApiGetProductLikesTopic",
      method: "post",
      data,
    });
@@ -16,10 +17,10 @@
  // 获取商品评论Topic
  getProductCommentTopic(data) {
    let token = wx.getStorageSync(tokenKey) ? wx.getStorageSync(tokenKey) : '';
    return request({
      url: token
        ? "/ugc/api/ApiAppUserGetProductCommentTopic"
        : "/ugc/api/ApiGetProductCommentTopic",
      url: token ?
        "/ugc/api/ApiAppUserGetProductCommentTopic" : "/ugc/api/ApiGetProductCommentTopic",
      method: "post",
      data,
    });
@@ -27,10 +28,10 @@
  // 获取MessageList
  getTopicMessageList(data) {
    let token = wx.getStorageSync(tokenKey) ? wx.getStorageSync(tokenKey) : '';
    return request({
      url: token
        ? "/ugc/api/ApiAppUserGetTopicMessageList"
        : "/ugc/api/ApiGetTopicMessageList",
      url: token ?
        "/ugc/api/ApiAppUserGetTopicMessageList" : "/ugc/api/ApiGetTopicMessageList",
      method: "post",
      data,
    });
@@ -96,4 +97,4 @@
  // },
};
export default ugcApi;
export default ugcApi;