fix 插入图片
This commit is contained in:
+2
-2
@@ -13,14 +13,14 @@
|
||||
<% if (process.env.NODE_ENV === 'development' ) { %>
|
||||
<script>
|
||||
window._CONFIG = {
|
||||
'interfaceUrl': 'http://10.10.10.46:4202',
|
||||
'interfaceUrl': 'http://139.9.235.66:8184',
|
||||
};
|
||||
</script>
|
||||
<% } %>
|
||||
<% if (process.env.NODE_ENV === 'production' ) { %>
|
||||
<script>
|
||||
window._CONFIG = {
|
||||
'interfaceUrl': 'https://srms.foton.com.cn',
|
||||
'interfaceUrl': 'http://laws-sinotruk-server-kmc2c.yf-grp:8080',
|
||||
};
|
||||
</script>
|
||||
<% } %>
|
||||
|
||||
+3
-3
@@ -3,12 +3,12 @@
|
||||
* @author: chenxiaoxi
|
||||
* @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 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' //线上
|
||||
module.exports = {
|
||||
interfaceUrl,
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -8,7 +8,7 @@ import axios from 'axios'
|
||||
|
||||
const config = {
|
||||
// baseURL: '/'
|
||||
baseURL: window._CONFIG.interfaceUrl,//本地
|
||||
baseURL: window._CONFIG.interfaceUrl//本地
|
||||
// baseURL: 'https://srms.foton.com.cn',//线上
|
||||
// timeout: 60 * 1000, // Timeout
|
||||
// withCredentials: true, // Check cross-site Access-Control
|
||||
@@ -23,7 +23,6 @@ _axios.interceptors.request.use(
|
||||
(error) =>
|
||||
// Do something with request error
|
||||
Promise.reject(error)
|
||||
|
||||
)
|
||||
|
||||
// Add a response interceptor
|
||||
@@ -34,7 +33,6 @@ _axios.interceptors.response.use(
|
||||
(error) =>
|
||||
// Do something with response error
|
||||
Promise.reject(error)
|
||||
|
||||
)
|
||||
|
||||
export default _axios
|
||||
|
||||
+7
-14
@@ -7,8 +7,9 @@ const pageMethod = require('./utils/getPages.js')
|
||||
|
||||
const pages = pageMethod.pages()
|
||||
const configs = pageMethod.configs()
|
||||
|
||||
// const { interfaceUrl } = require('./src/config')
|
||||
function resolve(dir) {
|
||||
function resolve (dir) {
|
||||
return path.join(__dirname, dir)
|
||||
}
|
||||
|
||||
@@ -40,22 +41,14 @@ module.exports = {
|
||||
port: 8081,
|
||||
headers: { 'Access-Control-Allow-Origin': '*' },
|
||||
proxy: {
|
||||
'/api': {
|
||||
target: 'localhost:8080/',
|
||||
'/laws-sinotruk': {
|
||||
target: 'http://139.9.235.66:8184',
|
||||
ws: false,
|
||||
changeOrigin: true,
|
||||
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