mirror of
https://gitee.com/js-yhsec/energy_storage.git
synced 2026-05-27 18:59:26 +08:00
feat(web): 新增 syslog 日志功能
- 在 EditCom 组件中添加 syslog 相关配置和逻辑 - 在 log.vue 中使用 EditCom 组件实现 syslog 日志的编辑功能 - 优化 monitor.vue 中的场站切换功能,调整选择框宽度 - 修复 request/index.js 中的错误处理逻辑
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import axios from 'axios'
|
||||
import openNotification from '../utils/notification'
|
||||
// import { message } from 'ant-design-vue'
|
||||
import { message } from 'ant-design-vue'
|
||||
import router from 'vue-router'
|
||||
const service = axios.create({
|
||||
baseURL: '/api',
|
||||
@@ -17,8 +17,7 @@ service.interceptors.response.use(
|
||||
const res = response.data
|
||||
|
||||
if (res.errCode !== 0) {
|
||||
console.log(res, 'res')
|
||||
if ((res.ERR_TOKEN = 2 || res.errmsg == '校验token过期')) {
|
||||
if (res.ERR_TOKEN == 2 || res.errmsg == '校验token过期') {
|
||||
setTimeout(() => {
|
||||
// router.push({ path: '/login' })
|
||||
}, 1000)
|
||||
@@ -31,8 +30,6 @@ service.interceptors.response.use(
|
||||
// })
|
||||
}
|
||||
} else {
|
||||
console.log(res.errmsg, 'res.errmsg')
|
||||
|
||||
message.error(res.errmsg)
|
||||
}
|
||||
return res
|
||||
|
||||
Reference in New Issue
Block a user