260517
This commit is contained in:
@@ -4,16 +4,12 @@
|
||||
import store from '@/store'
|
||||
import request from './request'
|
||||
|
||||
// 后端api地址
|
||||
// const apiUrl = 'http://' + store.getters.apiUrl
|
||||
const apiUrl = 'http://ectms.dev.opmonitor.com'
|
||||
|
||||
// 可以new多个request来支持多个域名请求
|
||||
const $http = new request({
|
||||
// 接口请求地址
|
||||
baseUrl: apiUrl,
|
||||
// 服务器本地上传文件地址
|
||||
fileUrl: apiUrl,
|
||||
// 接口请求地址(初始值,实际使用时会从 store 动态读取)
|
||||
baseUrl: '',
|
||||
// 服务器本地上传文件地址(初始值,实际使用时会从 store 动态读取)
|
||||
fileUrl: '',
|
||||
// 服务器上传图片默认url
|
||||
defaultUploadUrl: 'upload/image',
|
||||
// 设置请求头(如果使用报错跨域问题,可能是content-type请求类型和后台那边设置的不一致)
|
||||
@@ -27,7 +23,7 @@ const $http = new request({
|
||||
// 是否自动提示错误
|
||||
isPrompt: true,
|
||||
// 是否显示加载动画
|
||||
load: true,
|
||||
load: false,
|
||||
// 是否使用数据工厂
|
||||
isFactory: true
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user