Skip to content

Commit f30232d

Browse files
committed
提交修改
1 parent b828121 commit f30232d

File tree

5 files changed

+24
-2
lines changed

5 files changed

+24
-2
lines changed

.babelrc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
{
2-
"presets": ["es2015", "react"],
2+
"presets": ["es2015", "react", "stage-0"],
33
"plugins": [
4-
["import", { "libraryName": "antd", "style": "css" }]
4+
["import", { "libraryName": "antd", "style": "css" }],
5+
"transform-class-properties",
6+
"transform-es2015-template-literals"
57
]
68
}

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,11 @@
1717
"babel-core": "^6.25.0",
1818
"babel-loader": "^7.1.0",
1919
"babel-plugin-import": "^1.2.1",
20+
"babel-plugin-transform-class-properties": "^6.24.1",
21+
"babel-plugin-transform-es2015-template-literals": "^6.22.0",
2022
"babel-preset-es2015": "^6.24.1",
2123
"babel-preset-react": "^6.24.1",
24+
"babel-preset-stage-0": "^6.24.1",
2225
"css-loader": "^0.28.4",
2326
"eslint": "^3.19.0",
2427
"eslint-config-airbnb": "^15.0.1",

src/config/api.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import host from './host';
2+
3+
function getApi (api) {
4+
return host + api
5+
}
6+
7+
export default {
8+
login: getApi('/login'),
9+
logout: getApi('/logout')
10+
}

src/config/constant.js

Whitespace-only changes.

src/config/host.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
if (process.env.NODE_ENV === 'development') {
2+
module.exports = 'http://192.168.1.101:8001'
3+
} else if (process.env.NODE_ENV === 'test') {
4+
module.exports = 'http://192.168.1.102:8001'
5+
} else {
6+
module.exports = 'https://192.168.1.103:8001'
7+
}

0 commit comments

Comments
 (0)