修改请求地址
This commit is contained in:
@@ -9,14 +9,14 @@ export const entryName = '短剧13.2系统';
|
||||
|
||||
|
||||
const baseUrl = config.baseUrl
|
||||
// const baseUrl = "http://192.168.1.15:8100/sqx_fast/"
|
||||
// const baseUrl = "https://video.hnsiyao.cn/sqx_fast/"
|
||||
// const baseUrl = "https://dj-api.hnsiyao.cn/sqx_fast/"
|
||||
// const baseUrl = "http://192.168.1.15:8100/czg/"
|
||||
// const baseUrl = "https://video.hnsiyao.cn/czg/"
|
||||
// const baseUrl = "https://dj-api.hnsiyao.cn/czg/"
|
||||
|
||||
// const $urlMap={
|
||||
// local:'http://192.168.1.15:8100/sqx_fast/',
|
||||
// product:'https://dj-api.hnsiyao.cn/sqx_fast/',
|
||||
// test:'https://dj-api.hnsiyao.cn/sqx_fast/',
|
||||
// local:'http://192.168.1.15:8100/czg/',
|
||||
// product:'https://dj-api.hnsiyao.cn/czg/',
|
||||
// test:'https://dj-api.hnsiyao.cn/czg/',
|
||||
// }
|
||||
// const $env='product'
|
||||
const http = axios.create({
|
||||
@@ -33,9 +33,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/')
|
||||
const arr = config.url.split('czg/')
|
||||
config.url = baseUrl + (arr.length >= 2 ? arr[1] : arr[0])
|
||||
// config.url = "https://dj-api.hnsiyao.cn/sqx_fast/"
|
||||
// config.url = "https://dj-api.hnsiyao.cn/czg/"
|
||||
return config
|
||||
}, error => {
|
||||
return Promise.reject(error)
|
||||
@@ -61,8 +61,8 @@ http.interceptors.response.use(response => {
|
||||
http.adornUrl = (actionName) => {
|
||||
// 非生产环境 && 开启代理, 接口前缀统一使用[/proxyApi/]前缀做代理拦截!
|
||||
// return (process.env.NODE_ENV !== 'production' && process.env.OPEN_PROXY ? '/proxyApi/' : window.SITE_CONFIG.baseUrl) + actionName
|
||||
// return 'http://192.168.0.132:8100/sqx_fast/' + actionName
|
||||
// return 'https://duanjuadmin.xianmxkj.com/sqx_fast/' + actionName
|
||||
// return 'http://192.168.0.132:8100/czg/' + actionName
|
||||
// return 'https://duanjuadmin.xianmxkj.com/czg/' + actionName
|
||||
actionName = actionName.replace(/^\//, "");
|
||||
return baseUrl + actionName
|
||||
|
||||
@@ -70,8 +70,8 @@ http.adornUrl = (actionName) => {
|
||||
http.adornUrlUp = (actionName) => {
|
||||
// 非生产环境 && 开启代理, 接口前缀统一使用[/proxyApi/]前缀做代理拦截!
|
||||
// return (process.env.NODE_ENV !== 'production' && process.env.OPEN_PROXY ? '/proxyApi/' : window.SITE_CONFIG.baseUrl) + actionName
|
||||
// return 'http://192.168.0.132:8183/sqx_fast/' + actionName
|
||||
// return 'https://duanjuadmin.xianmxkj.com/sqx_fast/' + actionName
|
||||
// return 'http://192.168.0.132:8183/czg/' + actionName
|
||||
// return 'https://duanjuadmin.xianmxkj.com/czg/' + actionName
|
||||
actionName = actionName.replace(/^\//, "");
|
||||
return baseUrl + actionName
|
||||
|
||||
@@ -82,7 +82,7 @@ http.adornUrlWX = (actionName) => {
|
||||
actionName = actionName.replace(/^\//, "");
|
||||
return '/weixin/' + actionName
|
||||
// return 'https://api.weixin.qq.com/' + actionName
|
||||
// return 'https://dj-api.hnsiyao.cn/sqx_fast/' + actionName
|
||||
// return 'https://dj-api.hnsiyao.cn/czg/' + actionName
|
||||
|
||||
}
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user