fix 插入图片
This commit is contained in:
+2
-2
@@ -13,14 +13,14 @@
|
|||||||
<% if (process.env.NODE_ENV === 'development' ) { %>
|
<% if (process.env.NODE_ENV === 'development' ) { %>
|
||||||
<script>
|
<script>
|
||||||
window._CONFIG = {
|
window._CONFIG = {
|
||||||
'interfaceUrl': 'http://10.10.10.46:4202',
|
'interfaceUrl': 'http://139.9.235.66:8184',
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<% } %>
|
<% } %>
|
||||||
<% if (process.env.NODE_ENV === 'production' ) { %>
|
<% if (process.env.NODE_ENV === 'production' ) { %>
|
||||||
<script>
|
<script>
|
||||||
window._CONFIG = {
|
window._CONFIG = {
|
||||||
'interfaceUrl': 'https://srms.foton.com.cn',
|
'interfaceUrl': 'http://laws-sinotruk-server-kmc2c.yf-grp:8080',
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<% } %>
|
<% } %>
|
||||||
|
|||||||
+3
-3
@@ -3,12 +3,12 @@
|
|||||||
* @author: chenxiaoxi
|
* @author: chenxiaoxi
|
||||||
* @date: 2021-08-18 17:47:46
|
* @date: 2021-08-18 17:47:46
|
||||||
*/
|
*/
|
||||||
const interfaceUrl = window._CONFIG.interfaceUrl + '/api/' //本地
|
const interfaceUrl = window._CONFIG.interfaceUrl + '/laws-sinotruk/' //本地
|
||||||
// const interfaceUrl = 'https://srms.foton.com.cn/api/' //线上
|
// const interfaceUrl = 'https://srms.foton.com.cn/api/' //线上
|
||||||
|
|
||||||
const uploadFilePath = 'api/att/attFile/uploadNew'
|
const uploadFilePath = '/laws-sinotruk/onlyoffice/upload'
|
||||||
|
|
||||||
const staticFilePath = window._CONFIG.interfaceUrl + '/api/att/attFile/downloadFileForSarNew' //本地
|
const staticFilePath = window._CONFIG.interfaceUrl + '/laws-sinotruk/onlyoffice/downLoadFile' //本地
|
||||||
// const staticFilePath = 'https://srms.foton.com.cn/api/att/attFile/downloadFile' //线上
|
// const staticFilePath = 'https://srms.foton.com.cn/api/att/attFile/downloadFile' //线上
|
||||||
module.exports = {
|
module.exports = {
|
||||||
interfaceUrl,
|
interfaceUrl,
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -8,7 +8,7 @@ import axios from 'axios'
|
|||||||
|
|
||||||
const config = {
|
const config = {
|
||||||
// baseURL: '/'
|
// baseURL: '/'
|
||||||
baseURL: window._CONFIG.interfaceUrl,//本地
|
baseURL: window._CONFIG.interfaceUrl//本地
|
||||||
// baseURL: 'https://srms.foton.com.cn',//线上
|
// baseURL: 'https://srms.foton.com.cn',//线上
|
||||||
// timeout: 60 * 1000, // Timeout
|
// timeout: 60 * 1000, // Timeout
|
||||||
// withCredentials: true, // Check cross-site Access-Control
|
// withCredentials: true, // Check cross-site Access-Control
|
||||||
@@ -23,7 +23,6 @@ _axios.interceptors.request.use(
|
|||||||
(error) =>
|
(error) =>
|
||||||
// Do something with request error
|
// Do something with request error
|
||||||
Promise.reject(error)
|
Promise.reject(error)
|
||||||
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// Add a response interceptor
|
// Add a response interceptor
|
||||||
@@ -34,7 +33,6 @@ _axios.interceptors.response.use(
|
|||||||
(error) =>
|
(error) =>
|
||||||
// Do something with response error
|
// Do something with response error
|
||||||
Promise.reject(error)
|
Promise.reject(error)
|
||||||
|
|
||||||
)
|
)
|
||||||
|
|
||||||
export default _axios
|
export default _axios
|
||||||
|
|||||||
+7
-14
@@ -7,8 +7,9 @@ const pageMethod = require('./utils/getPages.js')
|
|||||||
|
|
||||||
const pages = pageMethod.pages()
|
const pages = pageMethod.pages()
|
||||||
const configs = pageMethod.configs()
|
const configs = pageMethod.configs()
|
||||||
|
|
||||||
// const { interfaceUrl } = require('./src/config')
|
// const { interfaceUrl } = require('./src/config')
|
||||||
function resolve(dir) {
|
function resolve (dir) {
|
||||||
return path.join(__dirname, dir)
|
return path.join(__dirname, dir)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -40,22 +41,14 @@ module.exports = {
|
|||||||
port: 8081,
|
port: 8081,
|
||||||
headers: { 'Access-Control-Allow-Origin': '*' },
|
headers: { 'Access-Control-Allow-Origin': '*' },
|
||||||
proxy: {
|
proxy: {
|
||||||
'/api': {
|
'/laws-sinotruk': {
|
||||||
target: 'localhost:8080/',
|
target: 'http://139.9.235.66:8184',
|
||||||
|
ws: false,
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
pathRewrite: {
|
pathRewrite: {
|
||||||
'^/api': ''
|
// '/laws-sinotruk': '' // 默认所有请求都加了jero-boot前缀,需要去掉
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
// '/api': {
|
|
||||||
// // target: 'https://qcwss.cloud.tencent.com/domain/ajax',
|
|
||||||
// target: interfaceUrl,
|
|
||||||
// ws: true,
|
|
||||||
// changeOrigin: true,
|
|
||||||
// pathRewrite: {
|
|
||||||
// '^/api': '', // rewrite path
|
|
||||||
// },
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user