From 1e3e316b0d64a04fade0a006bec78475dddc06bd Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期二, 26 七月 2022 00:27:08 +0800
Subject: [PATCH] 2022-07-26

---
 src/views/interface/history/index.jsx |   22 +++++++++++++++++-----
 1 files changed, 17 insertions(+), 5 deletions(-)

diff --git a/src/views/interface/history/index.jsx b/src/views/interface/history/index.jsx
index 42fea84..a8d4321 100644
--- a/src/views/interface/history/index.jsx
+++ b/src/views/interface/history/index.jsx
@@ -195,30 +195,42 @@
   }
 
   uselogon = () => {
+    let baseurl = ''
+    if (process.env.NODE_ENV === 'production') {
+      baseurl = document.location.origin + '/' + window.GLOB.service
+    } else {
+      baseurl = window.GLOB.location + '/' + window.GLOB.service
+    }
     let m = {
       active: 'raw',
       createDate: '',
       formData: [],
       headers: [],
-      interface: 'dologon / logon',
+      interface: baseurl + 'webapi/logon',
       method: 'POST',
       params: [],
-      raw: "{\n \"UserName\":\"******\",\n \"Password\":\"******\",\n \"systemType\":\"local\",\n \"Type\":\"鍏挜\",\n \"privatekey\":\"绉侀挜\",\n \"timestamp\":\"YYYY-MM-DD HH:mm:ss\",\n \"appkey\":\"******\"\n}",
+      raw: "{\n \"UserName\":\"******\",\n \"Password\":\"******\",\n \"systemType\":\"local\",\n \"Type\":\"鍏挜\",\n \"privatekey\":\"绉侀挜\",\n \"timestamp\":\"" + moment().format('YYYY-MM-DD HH:mm:ss') + "\",\n \"appkey\":\"" + window.GLOB.appkey + "\"\n}",
       uuid: 'dologon'
     }
     MKEmitter.emit('useInterface', m)
   }
 
   usedostars = () => {
+    let baseurl = ''
+    if (process.env.NODE_ENV === 'production') {
+      baseurl = document.location.origin + '/' + window.GLOB.service
+    } else {
+      baseurl = window.GLOB.location + '/' + window.GLOB.service
+    }
     let m = {
       active: 'raw',
       createDate: '',
       formData: [],
       headers: [],
-      interface: 'dostars',
+      interface: baseurl + 'webapi/dostars',
       method: 'POST',
       params: [],
-      raw: "{\n \"LoginUID\":\"******\",\n \"UserID\":\"******\",\n \"func\":\"******\"\n}",
+      raw: "{\n \"func\":\"******\",\n \"LoginUID\":\"******\",\n \"UserID\":\"******\",\n \"nonc\":\"" + Utils.getguid() + "\",\n \"t\":" + parseInt(new Date().getTime() / 1000) + "\n}",
       uuid: 'dologon'
     }
     MKEmitter.emit('useInterface', m)
@@ -269,7 +281,7 @@
             <div className="line-title">绀轰緥</div>
               <div className="line-item" key="dologon">
                 <div className="method">POST</div>
-                <div className="inter" style={{lineHeight: '40px'}}>dologon / logon</div>
+                <div className="inter" style={{lineHeight: '40px'}}>logon</div>
                 <div className="action" style={{paddingLeft: '40px'}}>
                   <RightOutlined onClick={this.uselogon} />
                 </div>

--
Gitblit v1.8.0