mirror of
http://112.124.100.131/happyinsurance_eco/ebiz-sunful-eco-web.git
synced 2025-12-06 09:26:50 +08:00
refactor(request): 移除请求拦截器中的 loading 处理- 删除了请求拦截器中关于 loading 的处理逻辑- 移除了响应拦截器中结束 loading 的操作- 在 main.js 中添加了 Element-UI 的样式引用- 更新了 .env.dev 文件中的 VUE_APP_ADMIN 环境变量值
This commit is contained in:
3
.env.dev
3
.env.dev
@@ -3,4 +3,5 @@ NODE_ENV = 'dev' // 如果是生产环境,请记得切换为production
|
||||
|
||||
# flag
|
||||
VUE_APP_FLAG='dev'
|
||||
VUE_APP_ADMIN='http://192.168.1.42:7100'
|
||||
|
||||
VUE_APP_ADMIN='https://ecotest.happyinsurance.com.cn:1443/backmanage/'
|
||||
|
||||
@@ -23,19 +23,6 @@ function endLoading() {
|
||||
// request interceptor
|
||||
service.interceptors.request.use(
|
||||
config => {
|
||||
// if (store.getters.token) {
|
||||
// // config.headers['sid'] = getToken()
|
||||
// config.headers['sysType'] = '3'
|
||||
// config.headers['auth'] = getToken()
|
||||
// }
|
||||
if (loading) {
|
||||
endLoading()
|
||||
}
|
||||
//linkage 接口
|
||||
// config.type 可以从api的接口地址定义 可以不触发loading
|
||||
if (config.type != false) {
|
||||
startLoading()
|
||||
}
|
||||
return config
|
||||
},
|
||||
error => {
|
||||
@@ -46,7 +33,6 @@ service.interceptors.request.use(
|
||||
service.interceptors.response.use(
|
||||
response => {
|
||||
const res = response.data
|
||||
endLoading()
|
||||
if (response.request.responseType == 'blob' || response.request.responseType == 'Blob') {
|
||||
return response.data
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ import Vue from 'vue'
|
||||
import 'normalize.css/normalize.css' // A modern alternative to CSS
|
||||
import App from './App'
|
||||
import router from './router'
|
||||
import 'element-ui/lib/theme-chalk/index.css'
|
||||
// import Filters from './filters'
|
||||
import generatedComponents from './generatedComponents'
|
||||
// 注册过滤器
|
||||
|
||||
Reference in New Issue
Block a user