提交 161fb348 authored 作者: 王鹏飞's avatar 王鹏飞

bug fixes

上级 da2a2cf9
<template> <template>
<div id="app" style="height: 100%; width: 100%"> <div id="app" style="height: 100%; width: 100%">
<router-view></router-view> <router-view v-if="examInfo.exam_id"></router-view>
</div> </div>
</template> </template>
......
...@@ -59,6 +59,10 @@ export default { ...@@ -59,6 +59,10 @@ export default {
} }
.question-list-list { .question-list-list {
display: flex; display: flex;
column-gap: 20px;
img {
max-width: 100% !important;
}
} }
.question-list-list-left { .question-list-list-left {
flex: 1; flex: 1;
...@@ -66,6 +70,7 @@ export default { ...@@ -66,6 +70,7 @@ export default {
font-weight: bold; font-weight: bold;
color: #222; color: #222;
line-height: 28px; line-height: 28px;
overflow: hidden;
} }
.question-list-list-right { .question-list-list-right {
flex: 1; flex: 1;
......
...@@ -99,7 +99,7 @@ export default { ...@@ -99,7 +99,7 @@ export default {
font-weight: bold; font-weight: bold;
line-height: 24px; line-height: 24px;
img { img {
width: 100% !important; max-width: 100% !important;
} }
} }
} }
......
...@@ -7,7 +7,7 @@ let studentInfo = {} ...@@ -7,7 +7,7 @@ let studentInfo = {}
let examInfo = {} let examInfo = {}
try { try {
studentInfo = JSON.parse(window.localStorage.getItem('studentInfo')) || {} studentInfo = JSON.parse(window.localStorage.getItem('studentInfo')) || {}
examInfo = JSON.parse(window.localStorage.getItem('examInfo')) || {} // examInfo = JSON.parse(window.localStorage.getItem('examInfo')) || {}
} catch (error) { } catch (error) {
console.log(error) console.log(error)
} }
......
import axios from 'axios' import axios from 'axios'
import { Message } from 'element-ui' import { Message } from 'element-ui'
import router from '@/router'
const httpRequest = axios.create({ const httpRequest = axios.create({
timeout: 60000, timeout: 60000,
...@@ -44,13 +43,8 @@ httpRequest.interceptors.response.use( ...@@ -44,13 +43,8 @@ httpRequest.interceptors.response.use(
function (error) { function (error) {
if (error.response) { if (error.response) {
const { status, message } = error.response.data const { status, message } = error.response.data
// 未登录 Message.error(message || error.message)
if (status === 403) { console.error(`${status}: ${message}`)
router.push('/login')
} else {
Message.error(message || error.message)
console.error(`${status}: ${message}`)
}
} else { } else {
console.log(error) console.log(error)
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论