Kaynağa Gözat

/sso/dy/tzlogin去掉参数

yuhan 2 ay önce
ebeveyn
işleme
2994cf6bb1
3 değiştirilmiş dosya ile 10 ekleme ve 8 silme
  1. 2 2
      src/api/login.js
  2. 6 4
      src/permission.js
  3. 2 2
      src/store/modules/user.js

+ 2 - 2
src/api/login.js

@@ -81,14 +81,14 @@ export function thirdLogin(token,thirdType) {
  * @param username
  * @returns {*}
  */
-export function iotSsoLogin(parameter) {
+export function iotSsoLogin() {
   return axios({
     url: `/sso/dy/tzlogin`,
     method: 'post',
     // headers: {
     //   'Content-Type': 'application/json;charset=UTF-8'
     // },
-    data: parameter,
+    // data: parameter,
   })
 }
 

+ 6 - 4
src/permission.js

@@ -25,12 +25,14 @@ router.beforeEach((to, from, next) => {
     to.matched.splice(2, to.matched.length - 3)
   }
 
-  let param = {}
-  param.eiToken = ''
-  param.username = 'iotedge@iotedge.sense'
+  // console.log(to)
+
+  // let param = {}
+  // param.eiToken = ''
+  // param.username = 'iotedge@iotedge.sense'
   // param.token = cookie.get('EIToken')
   // param.username = cookie.get('WISEUser')
-  store.dispatch('IotSsoLogin', param).then(response => {
+  store.dispatch('IotSsoLogin').then(response => {
     // 有EIToken
     // console.log('pppppppppresult', response)
     if (to.path === '/user/login' || to.path === OAUTH2_LOGIN_PAGE_PATH) {

+ 2 - 2
src/store/modules/user.js

@@ -226,9 +226,9 @@ const user = {
     },
     // IoT Edge相关 修改框架
     // iot EIToken登录
-    IotSsoLogin({ commit }, param) {
+    IotSsoLogin({ commit }) {
       return new Promise((resolve, reject) => {
-        iotSsoLogin(param).then(response => {
+        iotSsoLogin().then(response => {
           // console.log('IotSsoLogin', response)
           if(response.result.code =='200'){
             if(response.update){