后端api(laravel): https://github.com/sweida/apidoc
管理员多个几个权限,因为老是有人将 admin 账号(有管理员权限)搞事情,所以冻结该账号了,自己用github授权登录吧
yarn add react-router-dom
引用
import { BrowerRouter, Roure, Link } from "react-router-dom"
// exact 去掉重复/路径
<Route key={index} path='/' exact compoent={app} />
// to为string
<Link to="/about">关于</Link>
// to为obj
<Link to={{
pathname: '/courses',
search: '?sort=name',
hash: '#the-hash',
state: { fromDashboard: true }
}}/>
yarn add whatwg-fetch
yarn add redux react-redux
import { Provider } from 'react-redux';
import { createStore, applyMiddleware } from "redux";
...
const store = createStore( reducer )
ReactDOM.render(
<Provider store={ store }>
<App />,
</Provider>,
document.getElementById('root')
);
yarn add redux-logger redux-devtools-extension
import { createStore, applyMiddleware } from 'redux';
import { composeWithDevTools } from 'redux-devtools-extension';
const store = createStore(reducer, composeEnhancers(
applyMiddleware(...middleware),
// other store enhancers if any
));
-
分页
-
编辑api
-
已删除的api
-
个人api
-
自动更新删除列表
-
图片没打包,
-
部署后内页css引用地址不对
-
打包后去掉.map文件
token, user需要实时更新
最后一个问题,redux数据保存到loaclstroage
2、部署后,项目详情页刷新会报css路径不对
3、有管理员权限的页面刷新后会跳转到projects