From c7414c3cc93649479119d51b230c4b8e36884ca7 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期五, 23 七月 2021 18:18:55 +0800
Subject: [PATCH] 2021-07-23

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

diff --git a/src/views/interface/history/index.jsx b/src/views/interface/history/index.jsx
index 15700b5..9b0952c 100644
--- a/src/views/interface/history/index.jsx
+++ b/src/views/interface/history/index.jsx
@@ -1,6 +1,6 @@
 import React, {Component} from 'react'
 import { fromJS } from 'immutable'
-import { Input, Modal, Empty, Icon } from 'antd'
+import { Input, Modal, Icon } from 'antd'
 import moment from 'moment'
 
 import Api from '@/views/interface/api'
@@ -193,6 +193,36 @@
     MKEmitter.emit('useInterface', fromJS(m).toJS())
   }
 
+  uselogon = () => {
+    let m = {
+      active: 'raw',
+      createDate: '',
+      formData: [],
+      headers: [],
+      interface: 'dologon / 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}",
+      uuid: 'dologon'
+    }
+    MKEmitter.emit('useInterface', m)
+  }
+
+  usedostars = () => {
+    let m = {
+      active: 'raw',
+      createDate: '',
+      formData: [],
+      headers: [],
+      interface: 'dostars',
+      method: 'POST',
+      params: [],
+      raw: "{\n \"LoginUID\":\"******\",\n \"UserID\":\"******\",\n \"func\":\"******\"\n}",
+      uuid: 'dologon'
+    }
+    MKEmitter.emit('useInterface', m)
+  }
+
   changeSearch = (value) => {
     const { list } = this.state
 
@@ -219,24 +249,38 @@
           <span onClick={this.clear}>Clear all</span>
         </div>
         <div className="list-view">
-          {historys.length === 0 ?
-            <Empty /> :
-            historys.map((item, index) => (
-              <div className="list-line" key={index}>
-                <div className="line-title">{item.date}</div>
-                {item.sublist.map(m => (
-                  <div className="line-item" key={m.uuid}>
-                    <div className="method">POST</div>
-                    <div className="inter">{m.interface}</div>
-                    <div className="action">
-                      <Icon type="delete" onClick={() => this.delete(m)} />
-                      <Icon type="right" onClick={() => this.use(m)} />
-                    </div>
+          {historys.map((item, index) => (
+            <div className="list-line" key={index}>
+              <div className="line-title">{item.date}</div>
+              {item.sublist.map(m => (
+                <div className="line-item" key={m.uuid}>
+                  <div className="method">POST</div>
+                  <div className="inter">{m.interface}</div>
+                  <div className="action">
+                    <Icon type="delete" onClick={() => this.delete(m)} />
+                    <Icon type="right" onClick={() => this.use(m)} />
                   </div>
-                ))}
+                </div>
+              ))}
+            </div>
+          ))}
+          <div className="list-line" key="example">
+            <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="action" style={{paddingLeft: '40px'}}>
+                  <Icon type="right" onClick={this.uselogon} />
+                </div>
               </div>
-            ))
-          }
+              <div className="line-item" key="dostars">
+                <div className="method">POST</div>
+                <div className="inter" style={{lineHeight: '40px'}}>dostars</div>
+                <div className="action" style={{paddingLeft: '40px'}}>
+                  <Icon type="right" onClick={this.usedostars} />
+                </div>
+              </div>
+          </div>
         </div>
       </aside>
     )

--
Gitblit v1.8.0