Skip to content

Commit 8e89c5e

Browse files
committed
config undefind
1 parent eff195c commit 8e89c5e

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/api/server.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import axios from 'axios';
2-
import config from '@/config/config';
2+
import envconfig from '@/envconfig/envconfig';
33
/**
44
* 主要params参数
55
* @params method {string} 方法名
@@ -23,7 +23,7 @@ export default class Server {
2323
_option = {
2424
method,
2525
url,
26-
baseURL: config.baseURL,
26+
baseURL: envconfig.baseURL,
2727
timeout: 30000,
2828
params: null,
2929
data: null,
File renamed without changes.

src/pages/home/home.jsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { connect } from 'react-redux';
44
import { is, fromJS } from 'immutable';
55
import PropTypes from 'prop-types';
66
import API from '@/api/api';
7-
import config from '@/config/config';
7+
import envconfig from '@/envconfig/envconfig';
88
import { saveFormData, saveImg, clearData } from '@/store/home/action';
99
import { clearSelected } from '@/store/production/action';
1010
import PublicHeader from '@/components/header/header';
@@ -62,7 +62,7 @@ class Home extends Component {
6262
let formdata = new FormData();
6363
formdata.append('file', event.target.files[0]);
6464
let result = await API.uploadImg({data: formdata});
65-
this.props.saveImg(config.imgUrl + result.image_path);
65+
this.props.saveImg(envconfig.imgUrl + result.image_path);
6666
console.log(result);
6767
}catch(err){
6868
console.error(err);

0 commit comments

Comments
 (0)