From 9465dc404f7e7cd56100e4859ee0946a3fef7b09 Mon Sep 17 00:00:00 2001
From: riku <risaku@163.com>
Date: 星期四, 05 三月 2026 11:14:40 +0800
Subject: [PATCH] 去除视频界面,以通过审核

---
 service/baserequest.js |  107 +++++++++++++++++++++++++++++++----------------------
 1 files changed, 62 insertions(+), 45 deletions(-)

diff --git a/service/baserequest.js b/service/baserequest.js
index 35bca96..13a4581 100644
--- a/service/baserequest.js
+++ b/service/baserequest.js
@@ -5,91 +5,108 @@
  * success: function(data),
  * page: function(page, totalPage)
  * fail: function(error)
- * } 
+ * }
  */
-const { duration } = require("../utils/moment.min.js");
-const util = require("../utils/util.js")
+const util = require('../utils/util.js');
 
-const originProperties = ['url', 'data', 'header', 'method', 'success', 'fail', 'complete'];
-// const baseUrl = "http://192.168.1.12:8080"
-// const baseUrl = "https://fyami.com.cn:447"
-const baseUrl = "https://fyami.com.cn"
+// 灏忕▼搴忓悗鍙�
+// const baseUrl = "http://192.168.1.9:8082"
+const baseUrl = 'https://fyami.com.cn';
+const bu = 'https://fyami.com.cn';
+const basePicUrl = `${bu}/images/`;
+const baseIconUrl = `${bu}/images/weixin/eplaw/`;
+const baseFileUrl = `${bu}/meeting/file/`;
 
-const bu = "https://fyami.com.cn"
-// const bu = "https://fyami.com.cn:447"
-const basePicUrl = `${bu}/images/`
-const baseIconUrl = `${bu}/images/weixin/eplaw/`
-const baseFileUrl = `${bu}/meeting/file/`
+// 椋炵窘鐩戠绯荤粺鍚庡彴
+const spUrl = "https://fyami.com.cn:447"
+const spBu = "https://fyami.com.cn:447"
+const spPicUrl = `${spBu}/images/`;
+
+// const mode = 'debug';
+const mode = 'prod';
 
 function request(fun, hostUrl) {
-  const bUrl = hostUrl ? hostUrl : baseUrl
+  const bUrl = hostUrl ? hostUrl : baseUrl;
   if (fun.params != undefined) {
-    var param = ""
+    var param = '';
     Object.keys(fun.params).forEach(key => {
-      var value = fun.params[key]
-      if (param == "") {
-        param += key + "=" + value
+      var value = fun.params[key];
+      if (param == '') {
+        param += key + '=' + value;
       } else {
-        param += "&" + key + "=" + value
+        param += '&' + key + '=' + value;
       }
     });
-    var url = fun.url
-    fun.url = bUrl + url + "?" + param
+    var url = fun.url;
+    fun.url = bUrl + url + '?' + param;
   } else {
-    var url = fun.url
-    fun.url = bUrl + url
+    var url = fun.url;
+    fun.url = bUrl + url;
   }
-  var fun1 = util.deepCopy(fun)
+  var fun1 = util.deepCopy(fun);
   fun1.success = function (res) {
-    console.log("|------------------------------------------------------------------------------------------------------------");
-    console.log("|--璁块棶: ", fun.url);
-    console.log("|--缁撴灉: ", res);
+    if (mode == 'debug') {
+      console.log(
+        '|------------------------------------------------------------------------------------------------------------',
+      );
+      console.log('|--璁块棶: ', fun.url);
+      console.log('|--鍙傛暟: ', fun.data);
+      console.log('|--缁撴灉: ', res);
+    }
 
     if (res.statusCode == 200) {
       if (fun.onHead) {
-        fun.onHead(res.header)
+        fun.onHead(res.header);
       }
-      fun.success(res.data) 
+      fun.success(res.data);
     } else {
-      fun.fail(res.statusCode)
+      fun.fail(res.statusCode);
     }
     // if(res.data.success) {
     //   var head = res.data['head']
     //   if (head != undefined && fun.page != undefined) {
     //     fun.page(head.page, head.totalPage)
     //   }
-    //   fun.success(res.data.data)                                                                                                                           
+    //   fun.success(res.data.data)
     // } else {
     //   fun.fail(res.data)
     // }
-  }
+  };
   fun1.fail = function (error) {
-    console.log("--------------璇锋眰閿欒----------------" + fun.url);
-    console.log(error);
+    if (mode == 'debug') {
+      console.log(
+        '|------------------------------------------------------------------------------------------------------------',
+      );
+      console.log('|--璁块棶: ', fun.url);
+      console.log('|--鍙傛暟: ', fun.data);
+      console.log('|--閿欒: ', error);
+    }
     wx.showToast({
       title: '璇锋眰澶辫触',
       icon: 'none',
-      duration: 2000
-    })
+      duration: 2000,
+    });
     if (fun.fail) {
-      fun.fail(error)
+      fun.fail(error);
     }
-  }
-  fun1.complete = fun.complete
-  wx.request(fun1)
+  };
+  fun1.complete = fun.complete;
+  wx.request(fun1);
 }
 
 module.exports = {
   get: function (fun, hostUrl) {
-    fun['method'] = 'GET'
-    request(fun, hostUrl)
+    fun['method'] = 'GET';
+    request(fun, hostUrl);
   },
   post: function (fun, hostUrl) {
-    fun['method'] = 'POST'
-    request(fun, hostUrl)
+    fun['method'] = 'POST';
+    request(fun, hostUrl);
   },
   basePicUrl: basePicUrl,
   baseUrl: baseUrl,
   baseFileUrl: baseFileUrl,
-  baseIconUrl: baseIconUrl
-}
\ No newline at end of file
+  baseIconUrl: baseIconUrl,
+  spUrl: spUrl,
+  spPicUrl: spPicUrl,
+};

--
Gitblit v1.9.3