From 3af1a4c3f1712445a17376205b9ee3c4d7768da6 Mon Sep 17 00:00:00 2001
From: litian <C21AF165>
Date: 星期二, 24 九月 2024 19:29:33 +0800
Subject: [PATCH] zs

---
 assets/js/middleGround/api/ugc.js |   33 +++++++++++++++++++++------------
 1 files changed, 21 insertions(+), 12 deletions(-)

diff --git a/assets/js/middleGround/api/ugc.js b/assets/js/middleGround/api/ugc.js
index 3ccce0d..76b166f 100644
--- a/assets/js/middleGround/api/ugc.js
+++ b/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,
     });
@@ -69,6 +70,14 @@
       data
     })
   },
+  // 鑾峰彇MessageList瀛恗essage
+  getChildTopicMessageList(data) {
+    return request({
+      url: '/ugc/api/ApiAppUserGetSubMessageList',
+      method: 'post',
+      data
+    })
+  },
   // 鑾峰彇cms璇勮
   getCmsItemCommentTopic(data) {
     return request({
@@ -96,4 +105,4 @@
   // },
 };
 
-export default ugcApi;
+export default ugcApi;
\ No newline at end of file

--
Gitblit v1.9.1