From 7ccb1c978897bd38c5304e00dbb12c2b6de9284a Mon Sep 17 00:00:00 2001 From: zhaoxiao Date: Fri, 3 Mar 2023 09:40:41 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90fix=20ESLint=E3=80=91src/cas?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jero-web/src/cas/sso.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/jero-web/src/cas/sso.js b/jero-web/src/cas/sso.js index cf22f680..33dfa4c3 100644 --- a/jero-web/src/cas/sso.js +++ b/jero-web/src/cas/sso.js @@ -1,11 +1,12 @@ import Vue from 'vue' import { ACCESS_TOKEN } from '@/store/mutation-types' import store from '@/store' + /** * 单点登录 */ const init = (callback) => { - if (process.env.VUE_APP_SSO == 'true') { + if (process.env.VUE_APP_SSO === 'true') { console.log('-------单点登录开始-------') const token = Vue.ls.get(ACCESS_TOKEN) const st = getUrlParam('ticket') @@ -32,15 +33,12 @@ const SSO = { function getUrlParam (paraName) { const url = document.location.toString() const arrObj = url.split('?') - if (arrObj.length > 1) { const arrPara = arrObj[1].split('&') let arr - for (let i = 0; i < arrPara.length; i++) { arr = arrPara[i].split('=') - - if (arr != null && arr[0] == paraName) { + if (arr != null && arr[0] === paraName) { return arr[1] } }