@@ -7,7 +7,7 @@ | |||
* @FilePath: \ParentWeb\src\config\request.js | |||
*/ | |||
import axios from 'axios'; | |||
import router from '@/router'; | |||
/* import router from '@/router'; */ | |||
import store from '@/store'; | |||
import { baseApi } from '@/config'; | |||
import prefix from '@/store/prefix'; | |||
@@ -77,7 +77,7 @@ service.interceptors.request.use(request => { | |||
window.location.href.indexOf('verificationLogin') < 0 && | |||
window.location.href.indexOf('changePassword') < 0 | |||
) { | |||
router.push({ name: 'login' }); | |||
/* router.push({ name: 'login' }); */ | |||
return request; | |||
} | |||
// 全局请求统一增加一个 sourcetype: 1的参数跟区分新旧接口 | |||
@@ -7,7 +7,7 @@ | |||
* @FilePath: \ParentWeb\src\config\request.js | |||
*/ | |||
import axios from 'axios'; | |||
import router from '@/router'; | |||
/* import router from '@/router'; */ | |||
import { javaAPI } from '@/config'; | |||
import prefix from '@/store/prefix'; | |||
const httpProxyPrefix = javaAPI; | |||
@@ -76,7 +76,7 @@ service.interceptors.request.use(request => { | |||
window.location.href.indexOf('verificationLogin') < 0 && | |||
window.location.href.indexOf('changePassword') < 0 | |||
) { | |||
router.push({ name: 'login' }); | |||
/* router.push({ name: 'login' }); */ | |||
return request; | |||
} | |||
// 全局请求统一增加一个 sourcetype: 1的参数跟区分新旧接口 | |||
@@ -31,7 +31,7 @@ | |||
</template> | |||
<script> | |||
import DialogService from '@/services/dialog-service'; | |||
/* import DialogService from '@/services/dialog-service'; */ | |||
import ToastService from '@/services/toast-service'; | |||
import APIUser from '@/api/user'; | |||
import NavBar from '@/components/NavBar'; | |||
@@ -178,13 +178,13 @@ export default { | |||
}, | |||
mounted() { | |||
this.getData(this.begNumber, this.pageNumber, true); | |||
let url = window.location.search; | |||
let id = url.split('user_id=')[1]; | |||
/* let url = window.location.search; | |||
let id = url.split('user_id=')[1]; */ | |||
let alarmUrl = window.location.href.split('msgId=')[1]; | |||
if (alarmUrl) { | |||
this.$router.push({ name: 'alarmDetails', query: { msgId: alarmUrl } }); | |||
} | |||
if (id) { | |||
/* if (id) { | |||
if (id != this.$store.getters.userId) { | |||
DialogService.confirm({ | |||
title: '登录失效,请重新登录~' | |||
@@ -192,7 +192,7 @@ export default { | |||
this.$router.push({ name: 'login' }); | |||
}); | |||
} | |||
} | |||
} */ | |||
console.log(this.$store.getters.userId); | |||
} | |||
}; | |||