mirror of
https://github.com/zuiidea/antd-admin
synced 2026-10-30 13:23:49 +00:00
adjust
This commit is contained in:
+9
-1
@@ -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
@@ -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": {
|
||||
|
||||
@@ -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>
|
||||
@@ -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
@@ -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
@@ -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,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 = {}
|
||||
|
||||
Reference in New Issue
Block a user