Kaynağa Gözat

取消 跳转到登录界面

test
chenJinxu 10 ay önce
ebeveyn
işleme
a01dd34928
3 değiştirilmiş dosya ile 9 ekleme ve 9 silme
  1. +2
    -2
      src/config/request.js
  2. +2
    -2
      src/config/request_java.js
  3. +5
    -5
      src/views/myself/news/news.vue

+ 2
- 2
src/config/request.js Dosyayı Görüntüle

@@ -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的参数跟区分新旧接口


+ 2
- 2
src/config/request_java.js Dosyayı Görüntüle

@@ -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的参数跟区分新旧接口


+ 5
- 5
src/views/myself/news/news.vue Dosyayı Görüntüle

@@ -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);
}
};


Yükleniyor…
İptal
Kaydet