增加阿里云oss上传
This commit is contained in:
@@ -5,6 +5,12 @@ import qs from 'qs'
|
||||
import merge from 'lodash/merge'
|
||||
import { clearLoginInfo } from '@/utils'
|
||||
export const entryName = '短剧13.2系统';
|
||||
const $urlMap={
|
||||
local:'http://192.168.1.15:8100/sqx_fast/',
|
||||
product:'https://video.hnsiyao.cn/sqx_fast/',
|
||||
test:'https://video.hnsiyao.cn/sqx_fast/',
|
||||
}
|
||||
const $env='local'
|
||||
const http = axios.create({
|
||||
timeout: 1000 * 300,
|
||||
// withCredentials: true,
|
||||
@@ -18,6 +24,9 @@ const http = axios.create({
|
||||
*/
|
||||
http.interceptors.request.use(config => {
|
||||
config.headers['token'] = Vue.cookie.get('token') // 请求头带上token
|
||||
config.baseURL = $urlMap[$env]
|
||||
const arr=config.url.split('sqx_fast/')
|
||||
config.url= $urlMap[$env]+(arr.length>=2?arr[1]:arr[0])
|
||||
return config
|
||||
}, error => {
|
||||
return Promise.reject(error)
|
||||
|
||||
Reference in New Issue
Block a user