From 56c0d6e2f83d72f622744fea76fdc64b09e30f1d Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期三, 01 四月 2020 18:54:07 +0800
Subject: [PATCH] 2020-04-01

---
 src/api/index.js |   34 ++++++++++------------------------
 1 files changed, 10 insertions(+), 24 deletions(-)

diff --git a/src/api/index.js b/src/api/index.js
index 55c446a..956b4f9 100644
--- a/src/api/index.js
+++ b/src/api/index.js
@@ -61,33 +61,17 @@
       // axios.defaults.baseURL = 'http://127.0.0.1:8888'
     }
   }
-
-  /**
-   * @description 绯荤粺鎺堟潈
-   */
-  systemauth (appId, timestamp) {
-    return axios({
-      url: '/webapi/dostar',
-      data: {
-        rduri: 'http://minkesoft.com/mksepc/webapi/dostar',
-        func: 'sEmpowerCloud_Get_LinkUrl',
-        userid: '',
-        AppID: appId,
-        TimeStamp: timestamp
-      }
-    })
-  }
   
   /**
-   * @description 鐧诲綍绯荤粺
+   * @description 浣跨敤dostar鎺ュ彛锛岃烦杩囬獙璇�
+   * @param {Object} param 鏌ヨ鍙婃彁浜ゅ弬鏁�
    */
-  loginsystem (username, password) {
+  dostarInterface (param) {
+    param.userid = ''
+
     return axios({
-      url: '/zh-CN/Home/LoginAndRedirect',
-      data: {
-        Username: username,
-        Password: password
-      }
+      url: '/webapi/dostar',
+      data: param
     })
   }
 
@@ -99,14 +83,16 @@
       // func: 'webapi_login',
       UserName: username,
       Password: password,
+      systemType: options.systemType,
       Type: 'X'
     }
+
     param.Password = Utils.formatOptions(param.Password)
     param.appkey = window.GLOB.appkey || ''
 
     if (isCloud && options.cloudLoginApi) {
       param.rduri = options.cloudLoginApi
-    } else if (window.GLOB.mainSystemApi) {
+    } else if (!isCloud && window.GLOB.mainSystemApi) {
       param.rduri = window.GLOB.mainSystemApi.replace(/\/webapi(.*)/, '/webapi/dologon')
     }
 

--
Gitblit v1.8.0