This commit is contained in:
zuiidea
2017-04-01 15:25:45 +08:00
parent d25b1cb5dc
commit c2c0ce0267
7 changed files with 13 additions and 42 deletions
+9 -1
View File
@@ -6,8 +6,16 @@ const svgSpriteDirs = [
export default {
entry: 'src/index.js',
publicPath: "http://47.92.30.98:8000",
svgSpriteLoaderDirs: svgSpriteDirs,
"theme": "src/theme.js",
// "proxy": {
// "/api": {
// "target": "http://localhost:7001/api/v1/",
// "changeOrigin": true,
// "pathRewrite": { "^/api" : "" }
// }
// },
"env": {
"development": {
"extraBabelPlugins": [
@@ -22,5 +30,5 @@ export default {
["import", { "libraryName": "antd", "style": true}]
]
}
}
}
}
+1 -1
View File
@@ -52,7 +52,7 @@
"scripts": {
"dev": "roadhog server --open=fasle",
"lint": "eslint --fix --ext .js src",
"build": "atool-build"
"build": "roadhog build"
},
"theme": "./src/theme.js",
"standard": {
-20
View File
@@ -1,20 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<link rel="stylesheet" href="index.css" />
<!--[if lte IE 10]>
<script
src="https://as.alipayobjects.com/g/component/??console-polyfill/0.2.2/index.js,media-match/2.0.2/media.match.min.js"></script>
<![endif]-->
</head>
<body>
<div id="root"></div>
<script src="index.js"></script>
</body>
</html>
-16
View File
@@ -1,16 +0,0 @@
import './_index.html'
import 'babel-polyfill'
import createLoading from 'dva-loading'
import dva from 'dva'
// 1. Initialize
const app = dva(createLoading())
// 2. Model
app.model(require('./models/app'))
// 3. Router
app.router(require('./router'))
// 4. Start
app.start('#root')
+2 -2
View File
@@ -5,7 +5,7 @@
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<link rel="stylesheet" href="/index.css" />
<link rel="stylesheet" href="index.css" />
<!--[if lte IE 10]>
<script
src="https://as.alipayobjects.com/g/component/??console-polyfill/0.2.2/index.js,media-match/2.0.2/media.match.min.js"></script>
@@ -14,7 +14,7 @@
<body>
<div id="root"></div>
<script src="/index.js"></script>
<script src="index.js"></script>
</body>
</html>
+1 -1
View File
@@ -29,7 +29,6 @@ const adminUsers = [
module.exports = {
'POST /api/login' (req, res) {
console.log(req.body)
const now = new Date()
now.setDate(now.getDate() + 1)
res.cookie('token', JSON.stringify({
@@ -65,6 +64,7 @@ module.exports = {
},
'POST /api/logout' (req, res) {
res.clearCookie('token')
res.json({
success: true,
message: '退出成功',
-1
View File
@@ -1,6 +1,5 @@
import React, { PropTypes } from 'react'
import { Router } from 'dva/router'
// import pathToRegexp from 'path-to-regexp'
import App from './routes/app'
const cached = {}