【fix ESLint】src/cas
This commit is contained in:
@@ -1,11 +1,12 @@
|
|||||||
import Vue from 'vue'
|
import Vue from 'vue'
|
||||||
import { ACCESS_TOKEN } from '@/store/mutation-types'
|
import { ACCESS_TOKEN } from '@/store/mutation-types'
|
||||||
import store from '@/store'
|
import store from '@/store'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 单点登录
|
* 单点登录
|
||||||
*/
|
*/
|
||||||
const init = (callback) => {
|
const init = (callback) => {
|
||||||
if (process.env.VUE_APP_SSO == 'true') {
|
if (process.env.VUE_APP_SSO === 'true') {
|
||||||
console.log('-------单点登录开始-------')
|
console.log('-------单点登录开始-------')
|
||||||
const token = Vue.ls.get(ACCESS_TOKEN)
|
const token = Vue.ls.get(ACCESS_TOKEN)
|
||||||
const st = getUrlParam('ticket')
|
const st = getUrlParam('ticket')
|
||||||
@@ -32,15 +33,12 @@ const SSO = {
|
|||||||
function getUrlParam (paraName) {
|
function getUrlParam (paraName) {
|
||||||
const url = document.location.toString()
|
const url = document.location.toString()
|
||||||
const arrObj = url.split('?')
|
const arrObj = url.split('?')
|
||||||
|
|
||||||
if (arrObj.length > 1) {
|
if (arrObj.length > 1) {
|
||||||
const arrPara = arrObj[1].split('&')
|
const arrPara = arrObj[1].split('&')
|
||||||
let arr
|
let arr
|
||||||
|
|
||||||
for (let i = 0; i < arrPara.length; i++) {
|
for (let i = 0; i < arrPara.length; i++) {
|
||||||
arr = arrPara[i].split('=')
|
arr = arrPara[i].split('=')
|
||||||
|
if (arr != null && arr[0] === paraName) {
|
||||||
if (arr != null && arr[0] == paraName) {
|
|
||||||
return arr[1]
|
return arr[1]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user