From edd35a251b58b1fad17015deda92324f74458434 Mon Sep 17 00:00:00 2001
From: unknown <unknown@example.com>
Date: 星期三, 17 八月 2022 00:05:30 +0800
Subject: [PATCH] 台账模块、智能咨询模块

---
 service/baserequest.js |   25 +++++++++++++++----------
 1 files changed, 15 insertions(+), 10 deletions(-)

diff --git a/service/baserequest.js b/service/baserequest.js
index 073c4f9..c5b0c65 100644
--- a/service/baserequest.js
+++ b/service/baserequest.js
@@ -11,13 +11,14 @@
 
 const originProperties = ['url', 'data', 'header', 'method', 'success', 'fail', 'complete'];
 // const baseUrl = "http://127.0.0.1:8080"
-const baseUrl = "http://192.168.0.106:8080"
-// const baseUrl = "https://fyami.com.cn:447"
+// const baseUrl = "http://192.168.0.117:8080"
+const baseUrl = "https://fyami.com.cn:447"
 // const basePicUrl = baseUrl + "/images/"
 const basePicUrl = "https://fyami.com.cn:447/images/"
+const baseIconUrl = "https://fyami.com.cn:447/images/weixin/eplaw/"
 const baseFileUrl = baseUrl + "/meeting/file/"
 
-function request(fun) { 
+function request(fun) {
   if (fun.params != undefined) {
     var param = ""
     Object.keys(fun.params).forEach(key => {
@@ -29,8 +30,8 @@
       }
     });
     var url = fun.url
-    fun.url = baseUrl + url + "?" + param 
-  }else{
+    fun.url = baseUrl + url + "?" + param
+  } else {
     var url = fun.url
     fun.url = baseUrl + url
   }
@@ -38,7 +39,10 @@
   fun1.success = function (res) {
     console.log("--------------璇锋眰缁撴灉----------------" + fun.url);
     console.log(res);
-    
+
+    if (fun.onHead) {
+      fun.onHead(res.header)
+    }
     fun.success(res.data)
     // if(res.data.success) {
     //   var head = res.data['head']
@@ -58,7 +62,7 @@
       icon: 'none'
     })
     if (fun.fail) {
-      fun.fail(error)      
+      fun.fail(error)
     }
   }
   fun1.complete = fun.complete
@@ -74,7 +78,8 @@
     fun['method'] = 'POST'
     request(fun)
   },
-  basePicUrl:basePicUrl,
-  baseUrl:baseUrl,
-  baseFileUrl:baseFileUrl
+  basePicUrl: basePicUrl,
+  baseUrl: baseUrl,
+  baseFileUrl: baseFileUrl,
+  baseIconUrl: baseIconUrl
 }
\ No newline at end of file

--
Gitblit v1.9.3