闫增涛
2024-03-28 0b523220931d70aa752c3beaca5ed32ca85511c5
assets/js/middleGround/api/ugc.js
@@ -1,13 +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) {
    return request({
      url: localStorage.getItem(tokenKey)
        ? "/ugc/api/ApiAppUserGetProductLikesTopic"
        : "/ugc/api/ApiGetProductLikesTopic",
      url: token ?
        "/ugc/api/ApiAppUserGetProductLikesTopic" : "/ugc/api/ApiGetProductLikesTopic",
      method: "post",
      data,
    });
@@ -16,9 +18,8 @@
  // 获取商品评论Topic
  getProductCommentTopic(data) {
    return request({
      url: localStorage.getItem(tokenKey)
        ? "/ugc/api/ApiAppUserGetProductCommentTopic"
        : "/ugc/api/ApiGetProductCommentTopic",
      url: token ?
        "/ugc/api/ApiAppUserGetProductCommentTopic" : "/ugc/api/ApiGetProductCommentTopic",
      method: "post",
      data,
    });
@@ -27,9 +28,8 @@
  // 获取MessageList
  getTopicMessageList(data) {
    return request({
      url: localStorage.getItem(tokenKey)
        ? "/ugc/api/ApiAppUserGetTopicMessageList"
        : "/ugc/api/ApiGetTopicMessageList",
      url: token ?
        "/ugc/api/ApiAppUserGetTopicMessageList" : "/ugc/api/ApiGetTopicMessageList",
      method: "post",
      data,
    });
@@ -63,8 +63,8 @@
  // 更新message
  updateTopicMessage(data) {
    return request({
      url:'/ugc/api/ApiUpdateTopicMessage',
      method:'post',
      url: '/ugc/api/ApiUpdateTopicMessage',
      method: 'post',
      data
    })
  },
@@ -95,4 +95,4 @@
  // },
};
export default ugcApi;
export default ugcApi;