Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
ShanaMaid committed Apr 1, 2017
1 parent c6da3b3 commit ec3c1fa
Show file tree
Hide file tree
Showing 8 changed files with 46 additions and 17 deletions.
17 changes: 17 additions & 0 deletions dist/app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
var express = require('express');
var proxy = require('http-proxy-middleware');

var app = express();
app.use('/static', express.static('static'));
app.use('/assets', express.static('assets'));
app.use('/api', proxy({
target: 'http://api.zhuishushenqi.com/',
pathRewrite: {'^/api' : '/'},
changeOrigin: true
}
));

app.get('/', function (req, res) {
res.sendFile(__dirname + '/index.html');
});
app.listen(3001);
38 changes: 24 additions & 14 deletions dist/assets/app.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/assets/app.js.map

Large diffs are not rendered by default.

Binary file added dist/static/error.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added dist/static/menu.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,13 @@
"babel-plugin-import": "^1.1.1",
"babel-preset-es2015": "^6.24.0",
"core-js": "^2.0.0",
"http-proxy-middleware": "^0.17.4",
"normalize.css": "^4.0.0",
"randomcolor": "^0.4.4",
"react": "^15.0.0",
"react-dom": "^15.0.0",
"react-overdrive": "0.0.4",
"react-pull-to-refresh": "^1.0.6",
"react-redux": "^5.0.3",
"react-router": "^4.0.0",
"react-router-dom": "^4.0.0",
Expand Down
2 changes: 1 addition & 1 deletion src/components/Main.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ class AppComponent extends React.Component {
placement="bottomRight"
trigger={['click']}
>
<img src="../images/menu.png" className={styles.dropdown}/>
<img src="/static/menu.png" className={styles.dropdown}/>
</Dropdown>
<Link to="/search"><Icon type="search" className={styles.search}/></Link>
</Header>
Expand Down
2 changes: 1 addition & 1 deletion src/components/resultBookItem.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ class ResultBookItem extends React.Component{


handleImageErrored(e){
e.target.src = '../images/error.jpg'
e.target.src = '/static/error.jpg'
}

render() {
Expand Down

0 comments on commit ec3c1fa

Please sign in to comment.