Commit c8557c2c authored by wangxuelai's avatar wangxuelai

'路由守卫的修改'

parent b16b1666
<!DOCTYPE html><html lang="en"><head><meta charset="UTF-8"><title>轻校</title><link rel="shortcut icon" href="https://cdn.img.shangjiadao.cn/qingxiao/biz/image/qxlogo4.png"><meta content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=0;" name="viewport"><meta http-equiv="X-UA-Compatible" content="IE=edge"><!-- Polyfills --><!--[if lt IE 10]>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>轻校</title>
<link rel="shortcut icon" href="https://cdn.img.shangjiadao.cn/qingxiao/biz/image/qxlogo4.png">
<meta content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=0;" name="viewport">
<meta http-equiv="X-UA-Compatible" content="IE=edge"><!-- Polyfills -->
<!--[if lt IE 10]>
<script src="js/console-polyfill.js"></script>
<![endif]--><script charset="utf-8" src="https://map.qq.com/api/js?v=2.exp&key=XSZBZ-5LHCV-5I2P7-UQHPW-6456F-JBB3B"></script><link href="https://cdn.img.shangjiadao.cn/qingxiao/biz/dist/index.css?1568024803493" rel="stylesheet"><script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/lib/vendor.dll.js?3" charset="utf-8"></script><script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/js/console-polyfill.js?3" charset="utf-8"></script><script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/js/es6-shim.min.js?3" charset="utf-8"></script><script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/js/es5-shim.js?3" charset="utf-8"></script><script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/js/es5-sham.min.js?3" charset="utf-8"></script><script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/js/json3.min.js?3" charset="utf-8"></script><script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/js/html5shiv.min.js?3" charset="utf-8"></script><script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/js/polyfill.js?3" charset="utf-8"></script></head><body><div id="root"></div><script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/dist/index.js?1568024803493" charset="utf-8"></script></body></html>
\ No newline at end of file
<![endif]-->
<script charset="utf-8" src="https://map.qq.com/api/js?v=2.exp&key=XSZBZ-5LHCV-5I2P7-UQHPW-6456F-JBB3B"></script>
<link href="/dist/index.css?1568024803493" rel="stylesheet">
<script src="/lib/vendor.dll.js?3" charset="utf-8"></script>
<script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/js/console-polyfill.js?3" charset="utf-8"></script>
<script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/js/es6-shim.min.js?3" charset="utf-8"></script>
<script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/js/es5-shim.js?3" charset="utf-8"></script>
<script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/js/es5-sham.min.js?3" charset="utf-8"></script>
<script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/js/json3.min.js?3" charset="utf-8"></script>
<script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/js/html5shiv.min.js?3" charset="utf-8"></script>
<script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/js/polyfill.js?3" charset="utf-8"></script>
</head>
<body>
<div id="root"></div>
<script src="/dist/index.js?15682322222024803493" charset="utf-8"></script>
</body>
</html>
\ No newline at end of file
......@@ -55,7 +55,7 @@
"html-webpack-plugin": "^3.1.0",
"husky": "^0.12.0",
"redbox-react": "^1.4.3",
"roadhog": "^2.0.0",
"roadhog": "^2.5.0-beta.4",
"webpack": "^3.8.1"
}
}
......@@ -9,10 +9,10 @@ if (ENVIRONMENT == 'pro') {
api = 'https://wx.m.shangjiadao.cn/v2/api/';
dakaapi = 'https://qxapi.qingxiao.online/daka/v3/';
} else if (ENVIRONMENT == 'dev') {
api = 'https://wx.m.shangjiadao.cn/v2/api/';
dakaapi = 'https://qxapi.qingxiao.online/daka/v3/';
// api = 'https://test.wp53.cn/v2/api/';
// dakaapi = 'https:clock.wp53.cn/v3/';
// api = 'https://wx.m.shangjiadao.cn/v2/api/';
// dakaapi = 'https://qxapi.qingxiao.online/daka/v3/';
api = 'https://test.wp53.cn/v2/api/';
dakaapi = 'https:clock.wp53.cn/v3/';
} else if (ENVIRONMENT == 'testenv') {
api = 'https://test.wp53.cn/v2/api/';
dakaapi = 'https:clock.wp53.cn/v3/';
......
......@@ -10,8 +10,8 @@ export default {
isFather: false,
activeurl: `${__IMGCDN__}menu/indexactive.png`,
notactiveurl: `${__IMGCDN__}menu/index.png`,
path: '/sjd/headquarters/index',
relativePath: ['/sjd/headquarters/index'],
path: '/hdqrs/index',
relativePath: ['/hdqrs/index'],
},
{
id: '8',
......@@ -23,8 +23,8 @@ export default {
isFather: false,
activeurl: `${__IMGCDN__}menu/schoolinfoactive.png`,
notactiveurl: `${__IMGCDN__}menu/schoolinfo.png`,
path: '/sjd/headquarters/detail',
relativePath: ['/sjd/headquarters/detail'],
path: '/hdqrs/detail',
relativePath: ['/hdqrs/detail'],
},
{
id: '9',
......@@ -36,8 +36,8 @@ export default {
isFather: false,
activeurl: `${__IMGCDN__}menu/schoolstaticactive.png`,
notactiveurl: `${__IMGCDN__}menu/schoolstatic.png`,
path: '/sjd/headquarters/static',
relativePath: ['/sjd/headquarters/static'],
path: '/hdqrs/static',
relativePath: ['/hdqrs/static'],
},
],
};
......@@ -51,7 +51,7 @@ export default {
if (joinschooldata.code == 200) {
message.success('新建总部成功', 1);
yield put(routerRedux.push({
pathname: '/schoollist',
pathname: '/erp/schoollist',
}));
} else {
yield put({
......
......@@ -107,7 +107,7 @@ export default {
},
});
yield put(routerRedux.push({
pathname: '/schoollist',
pathname: '/erp/schoollist',
}));
} else {
message.error('登录失败,请重试', 1.5);
......
......@@ -103,7 +103,7 @@ export default {
});
// 跳转到完善信息页
yield put(routerRedux.push({
pathname: '/schoollist',
pathname: '/erp/schoollist',
}));
} else {
message.error('注册失败,请重试', 1.5);
......
......@@ -208,7 +208,7 @@ export default {
});
if (schooladd.code == 200) {
yield put(routerRedux.push({
pathname: '/schoollist',
pathname: '/erp/schoollist',
}));
} else {
yield put({
......@@ -253,7 +253,7 @@ export default {
},
* goCreateDepartment({ payload }, { call, put, select }) {
yield put(routerRedux.push({
pathname: '/joinschooladd',
pathname: '/erp/joinschooladd',
}));
},
* goSchoolEdit({ payload }, { call, put, select }) {
......
......@@ -54,7 +54,7 @@ export default {
},
* goUserSetting({ payload }, { call, put, select }) {
yield put(routerRedux.push({
pathname: '/usersetting',
pathname: '/erp/usersetting',
}));
},
* goSchoolSystem({ payload }, { call, put, select }) {
......@@ -83,7 +83,7 @@ export default {
},
* addSchool({ payload }, { call, put, select }) {
yield put(routerRedux.push({
pathname: '/schooladd',
pathname: '/erp/schooladd',
}));
},
* joinDepartmentoperate({ payload }, { call, put, select }) {
......@@ -145,7 +145,7 @@ export default {
type,
});
yield put(routerRedux.push({
pathname: '/sjd/headquarters/index',
pathname: '/hdqrs/index',
}));
},
* pageInit({ payload }, { call, put, select }) {
......
......@@ -11,7 +11,7 @@ import {
pageIn,
LocalStorage,
SessionStorage,
// isOnline,
isOnline,
translateType,
} from '../utils/index';
const pathToRegexp = require('path-to-regexp');
......@@ -61,54 +61,8 @@ export default {
globalErrorType: -1,
},
});
const user = LocalStorage.getItem('user');
const departmentid = LocalStorage.getItem('departmentid');
const role = LocalStorage.getItem('role');
const rootMap = LocalStorage.getItem('rootMap');
const sid = LocalStorage.getItem('sid');
let userUserful = true;
if (!user || !user.token || (new Date()).getTime() > user.expiresDateTime * 1000) {
userUserful = false;
} else {
userUserful = true;
if (pathname == '/login') {
dispatch(routerRedux.replace({
pathname: '/schoollist',
}));
}
}
if (['/joinschooladd', '/schoollist', '/schooladd', '/usersetting'].indexOf(pathname) != -1 || pathname.indexOf('sjd') != -1) {
if (!userUserful) { // 检测已sjd开头的url或者headquarters开头的路由
// Modal.warn({
// title: '登录信息丢失,请重新登录',
// onOk: () => {
// },
// });
dispatch(routerRedux.replace({
pathname: '/login',
}));
localStorage.clear();
return;
}
}
if (pathname.indexOf('sjd') != -1 && pathname.indexOf('headquarters') == -1) {
if (!role || !rootMap || !sid) {
dispatch(routerRedux.replace({
pathname: '/schoollist',
}));
return;
}
}
if (pathname.indexOf('headquarters') != -1) {
if (!departmentid) {
dispatch(routerRedux.replace({
pathname: '/schoollist',
}));
return;
}
}
// 监听路由变化 判断缓存是否存在 实现路由守卫的功能
if (pathname.indexOf('headquarters') == -1) {
if (pathname.indexOf('hdqrs') == -1) {
dispatch({
type: 'updateState',
payload: {
......@@ -140,7 +94,9 @@ export default {
},
});
if (pathname === '/login') {
console.log('/login');
dispatch({
type: 'judgeexpire',
});
}
if (pathname === '/register') {
console.log('/register');
......@@ -206,12 +162,13 @@ export default {
},
});
}
if (pathname === '/schoollist') {
if (pathname === '/erp/schoollist') {
console.log('schoollistschoollist');
dispatch({
type: 'schoollist/queryschoollist',
});
}
if (pathname === '/schooladd') {
if (pathname === '/erp/schooladd') {
dispatch({
type: 'schooladd/getcategorys',
});
......@@ -232,7 +189,7 @@ export default {
},
});
}
if (pathname === '/schoollist') {
if (pathname === '/erp/schoollist') {
dispatch({
type: 'webapp/updateState',
payload: {
......@@ -243,7 +200,7 @@ export default {
},
});
}
if (pathname === '/usersetting') {
if (pathname === '/erp/usersetting') {
dispatch({
type: 'webapp/updateState',
payload: {
......@@ -318,7 +275,7 @@ export default {
},
});
}
if (pathname === '/sjd/headquarters/index') {
if (pathname === '/hdqrs/index') {
dispatch({
type: 'headquarters/headquarterModelIndex',
payload: {
......@@ -339,7 +296,7 @@ export default {
},
});
}
if (pathname === '/sjd/headquarters/static') {
if (pathname === '/hdqrs/static') {
dispatch({
type: 'hqstatistical/headquarterModelDetail',
payload: {
......@@ -367,7 +324,7 @@ export default {
},
});
}
if (pathname === '/sjd/headquarters/detail') {
if (pathname === '/hdqrs/detail') {
dispatch({
type: 'headquarters/headquarterModelDetail',
payload: {
......@@ -445,7 +402,7 @@ export default {
type: 'classmgt/queryinfo',
});
}
if (pathname == '/usersetting') {
if (pathname == '/erp/usersetting') {
dispatch({
type: 'usersetting/queryinfo',
});
......@@ -657,11 +614,17 @@ export default {
type: 'updateState',
});
},
// * judgeexpire({ payload }, { put, call, select }) {
// },
* judgeexpire({ payload }, { put, select }) {
const webapp = yield select(state => state.webapp);
const { userInfo } = webapp;
const isexpire = isOnline((userInfo && userInfo.expiresDateTime) || 0);
if (isexpire) {
window.location.href = `${location.protocol}//${location.hostname}${location.port == '' ? '' : `:${location.port}`}${location.pathname}#/erp/schoollist`;
}
},
* shiftSchool({ payload }, { put, select }) {
yield put(routerRedux.replace({
pathname: '/schoollist',
pathname: '/erp/schoollist',
}));
},
* goHome({ payload }, { put, select }) {
......@@ -733,7 +696,7 @@ export default {
},
* goSchoollist({ payload }, { put, select }) {
yield put(routerRedux.push({
pathname: '/schoollist',
pathname: '/erp/schoollist',
}));
},
* errorrequestresolve({ payload }, { put, select }) {
......@@ -760,6 +723,7 @@ export default {
globalErrorType: 3,
},
});
} else if (data.code === 100001) { // 接口少了token
} else {
message.error(data.msg || '未知错误', 1);
}
......
import React from 'react';
import { connect } from 'dva';
import { Layout, Modal, Button, Drawer, Icon } from 'antd';
import { Redirect } from 'dva/router';
import SjdIndexStyle from './SjdIndex.less';
import SjdMenu from '../components/SjdMenu';
import SjdHeader from '../components/SjdHeader';
import {
LocalStorage,
SessionStorage,
} from '../utils/index';
const { Sider, Content } = Layout;
class SjdIndex extends React.Component {
componentWillUnmount() { // 卸载
const { dispatch } = this.props;
dispatch({
type: 'webapp/unloadstates',
});
}
onClose = () => {
const { dispatch } = this.props;
dispatch({
type: 'webapp/menucollapse',
payload: {
collapsed: true,
},
});
}
signout = () => {
const { dispatch } = this.props;
dispatch({
type: 'webapp/signout',
payload: {
dispatch,
},
});
}
goSchoollist = () => {
const { dispatch } = this.props;
dispatch({
type: 'webapp/goSchoollist',
});
}
render() {
const {
collapsed, locationPathname, screenIsBig, globalErrorType,
} = this.props;
let contentMarginLeft = 0;
let paddingRight = 20;
let paddingLeft = 20;
if (screenIsBig) {
contentMarginLeft = !collapsed ? 204 : 84;
} else {
contentMarginLeft = 0;
paddingRight = 10;
paddingLeft = 10;
}
let mainDom = (
<div className="mainDom">
<Layout
style={{ minHeight: '100vh' }}
>
{!screenIsBig &&
<Drawer
visible={!collapsed}
closable={false}
onClose={this.onClose}
placement="left"
bodyStyle={{ padding: 0 }}
width={200}
>
<SjdMenu />
</Drawer>
}
{screenIsBig &&
<Sider
trigger={null}
collapsible
collapsed={collapsed}
style={{
overflow: 'auto',
height: '100vh',
position: 'fixed',
left: 0,
zIndex: 100,
}}
className={SjdIndexStyle.menusider}
>
<SjdMenu />
</Sider>
}
<Layout>
<SjdHeader />
<Content
className={SjdIndexStyle.content}
style={{
marginLeft: contentMarginLeft,
marginTop: 90,
paddingRight,
paddingLeft,
}}>
{this.props.children}
</Content>
</Layout>
</Layout>
<Modal
title="温馨提示"
style={{ top: 20 }}
visible={globalErrorType == 1}
maskStyle={{ zIndex: 1003 }}
zIndex={1004}
closable={false}
footer={<div><Button onClick={this.signout}>重新登录</Button></div>}
>
<div style={{ display: 'flex', alignItems: 'center' }}>
<Icon type="info-circle" style={{ color: '#faad14', fontSize: '30px', marginRight: '10px' }} />
<span>登录信息过期,请重新登录</span>
</div>
</Modal>
<Modal
title="温馨提示"
style={{ top: 20 }}
visible={globalErrorType == 3}
maskStyle={{ zIndex: 1003 }}
zIndex={1004}
closable={false}
footer={<div><Button onClick={this.signout}>退出</Button></div>}
>
<div style={{ display: 'flex', alignItems: 'center' }}>
<Icon type="info-circle" style={{ color: '#faad14', fontSize: '30px', marginRight: '10px' }} />
<span>账号已关闭</span>
</div>
</Modal>
</div>
);
const redirectLogin = (<Redirect to={{ pathname: '/login' }} />);
const redirectSchoolList = (<Redirect to={{ pathname: '/erp/schoollist' }} />);
const departmentid = LocalStorage.getItem('departmentid');
const user = LocalStorage.getItem('user');
let userUserful = true;
if (!user || !user.token || (new Date()).getTime() > user.expiresDateTime * 1000) {
userUserful = false;
} else {
userUserful = true;
}
if (!userUserful) {
mainDom = redirectLogin;
localStorage.clear();
} else {
if (!departmentid) {
mainDom = redirectSchoolList;
}
}
return (
mainDom
);
}
}
SjdIndex.propTypes = {
};
function mapStateToProps(state) {
const {
collapsed, userInfo, showExpired, menuDrawerShow, screenIsBig, globalErrorType, locationPathname,
} = state.webapp;
return {
collapsed,
userInfo,
showExpired,
screenIsBig,
globalErrorType, // : -1, // 1: 401token失效 2 40200无权限 3 40201账号已关闭
locationPathname,
};
}
export default connect(mapStateToProps)(SjdIndex);
import React from 'react';
import { connect } from 'dva';
import { Layout, Modal, Button, Drawer, Icon } from 'antd';
import { Redirect } from 'dva/router';
import SjdIndexStyle from './SjdIndex.less';
import SjdMenu from '../components/SjdMenu';
import SjdHeader from '../components/SjdHeader';
import {
LocalStorage,
SessionStorage,
} from '../utils/index';
const { Sider, Content } = Layout;
class OuterPage extends React.Component {
componentWillUnmount() { // 卸载
const { dispatch } = this.props;
dispatch({
type: 'webapp/unloadstates',
});
}
render() {
const {
location, globalErrorType, locationPathname,
} = this.props;
const user = LocalStorage.getItem('user');
let userUserful = true;
const redirectDom = (<Redirect to={{ pathname: '/login' }} />);
if (!user || !user.token || (new Date()).getTime() > user.expiresDateTime * 1000) {
userUserful = false;
localStorage.clear();
} else {
userUserful = true;
}
const mainDom = (
<div>
{this.props.children}
</div>
);
const renderDom = userUserful ? mainDom : redirectDom;
return (
renderDom
);
}
}
OuterPage.propTypes = {
};
function mapStateToProps(state) {
const {
locationPathname, globalErrorType,
} = state.webapp;
return {
locationPathname,
globalErrorType, // : -1, // 1: 401token失效 2 40200无权限 3 40201账号已关闭
};
}
export default connect(mapStateToProps)(OuterPage);
......@@ -43,7 +43,7 @@ class SjdIndex extends React.Component {
}
render() {
const {
collapsed, location, userInfo, showExpired, menuDrawerShow, screenIsBig, globalErrorType,
collapsed, locationPathname, screenIsBig, globalErrorType,
} = this.props;
let contentMarginLeft = 0;
let paddingRight = 20;
......@@ -55,7 +55,7 @@ class SjdIndex extends React.Component {
paddingRight = 10;
paddingLeft = 10;
}
const mainDom = (
let mainDom = (
<div className="mainDom">
<Layout
style={{ minHeight: '100vh' }}
......@@ -133,7 +133,27 @@ class SjdIndex extends React.Component {
</Modal>
</div>
);
const redirectLogin = (<Redirect to={{ pathname: '/login' }} />);
const redirectSchoolList = (<Redirect to={{ pathname: '/erp/schoollist' }} />);
// const renderDom = hasRoot ? mainDom : redirectDom;
const user = LocalStorage.getItem('user');
const role = LocalStorage.getItem('role');
const rootMap = LocalStorage.getItem('rootMap');
const sid = LocalStorage.getItem('sid');
let userUserful = true;
if (!user || !user.token || (new Date()).getTime() > user.expiresDateTime * 1000) {
userUserful = false;
} else {
userUserful = true;
}
if (!userUserful) {
localStorage.clear();
mainDom = redirectLogin;
} else {
if (!role || !rootMap || !sid) {
mainDom = redirectSchoolList;
}
}
return (
mainDom
);
......@@ -145,7 +165,7 @@ SjdIndex.propTypes = {
};
function mapStateToProps(state) {
const {
collapsed, userInfo, showExpired, menuDrawerShow, screenIsBig, globalErrorType,
collapsed, userInfo, showExpired, menuDrawerShow, screenIsBig, globalErrorType, locationPathname,
} = state.webapp;
return {
collapsed,
......@@ -153,6 +173,7 @@ function mapStateToProps(state) {
showExpired,
screenIsBig,
globalErrorType, // : -1, // 1: 401token失效 2 40200无权限 3 40201账号已关闭
locationPathname,
};
}
export default connect(mapStateToProps)(SjdIndex);
......@@ -19,6 +19,16 @@ const SjdIndex = props => (
{ SjdIndex => (<SjdIndex {...props} />) }
</Bundle>
);
const OuterPage = props => (
<Bundle load={() => import(/* webpackChunkName:"outerpage" */'./pages/OuterPage')}>
{ OuterPage => (<OuterPage {...props} />) }
</Bundle>
);
const HdqrsPage = props => (
<Bundle load={() => import(/* webpackChunkName:"hdqrspage" */'./pages/HdqrsPage')}>
{ HdqrsPage => (<HdqrsPage {...props} />) }
</Bundle>
);
const Login = props => (
<Bundle load={() => import(/* webpackChunkName:"login" */'./pages/login/index')}>
{ Login => (<Login {...props} />) }
......@@ -176,9 +186,6 @@ function RouterConfig({ history }) {
<Route path="/sjd/classdetail/:classid" exact component={ClassDetail} />
<Route path="/sjd/thememgt/:classid" exact component={ThemeMgt} />
<Route path="/sjd/clockmgt/:themetype/:classid/:themeid" exact component={ClockMgt} />
<Route path="/sjd/headquarters/index" exact component={Headquarters} />
<Route path="/sjd/headquarters/detail" exact component={HeadquartersDetail} />
<Route path="/sjd/headquarters/static" exact component={HqStatistical} />
<Route path="/sjd/student" exact component={Student} />
<Route path="/sjd/studentinfo/:id" exact component={Studentinfo} />
<Route path="/sjd/teacher" exact component={Teacher} />
......@@ -190,14 +197,31 @@ function RouterConfig({ history }) {
</SjdIndex>
)}
/>
<Route path="/joinschooladd" exact component={JoinSchoolAdd} />
<Route path="/schoollist" exact component={SchoolList} />
<Route path="/schooladd" exact component={SchoolAdd} />
<Route
path="/hdqrs"
render={() => (
<HdqrsPage>
<Route path="/hdqrs/index" exact component={Headquarters} />
<Route path="/hdqrs/detail" exact component={HeadquartersDetail} />
<Route path="/hdqrs/static" exact component={HqStatistical} />
</HdqrsPage>
)}
/>
<Route
path="/erp"
render={() => (
<OuterPage>
<Route path="/erp/joinschooladd" exact component={JoinSchoolAdd} />
<Route path="/erp/schoollist" exact component={SchoolList} />
<Route path="/erp/schooladd" exact component={SchoolAdd} />
<Route path="/erp/usersetting" exact component={UserSetting} />
</OuterPage>
)}
/>
<Route path="/resetpsd" exact component={ResetPsd} />
<Route path="/" exact render={() => (<Redirect to="/login" />)} />
<Route path="/login" exact component={Login} />
<Route path="/register" exact component={Register} />
<Route path="/resetpsd" exact component={ResetPsd} />
<Route path="/usersetting" exact component={UserSetting} />
<Route path="/404" render={() => (<Errorpage />)} />
</Switch>
</Router>
......
......@@ -60,6 +60,12 @@ export default function request(options) {
const teacher = LocalStorage.getItem('teacher') || {};
const needAuth = options.needAuth === undefined ? true : false;
if (needAuth) {
if (!user || !user.token) {
return {
code: 100001,
message: 'error'
}
}
options.headers = {
Authorization: `bearer ${user.token}`
}
......
Arguments:
D:\application\nodejs\node.exe C:\Program Files (x86)\Yarn\bin\yarn.js
PATH:
C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Ruby24\bin;C:\ProgramData\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\TortoiseSVN\bin;C:\ProgramData\chocolatey\bin;C:\Program Files (x86)\Yarn\bin\;C:\Program Files\Git\cmd;C:\Program Files (x86)\Common Files\NSEC\;C:\Python27;D:\application\Microsoft VS Code\bin;D:\application\nodejs\;D:\application\Microsoft VS Code\bin;E:\application\Fiddler;C:\Users\Administrator\AppData\Local\Yarn\bin;E:\application\adb;E:\application\IntelliJ IDEA 2018.3.5\bin;;C:\Program Files\Java\jre1.8.0_191\bin;C:\Program Files\Java\jdk1.8.0_191\bin;C:\Users\Administrator\AppData\Roaming\npm
Yarn version:
1.6.0
Node version:
10.16.0
Platform:
win32 x64
Trace:
Error: ENOENT: no such file or directory, copyfile 'C:\Users\Administrator\AppData\Local\Yarn\Cache\v1\npm-ms-2.1.2-d09d1f357b443f493382a8eb3ccd183872ae6009\index.js' -> 'D:\biz.qingxiao.com\node_modules\@babel\core\node_modules\ms\index.js'
npm manifest:
{
"private": true,
"scripts": {
"start": "set NODE_ENV=development&&set PORT=80 && roadhog server",
"build": "set NODE_ENV=production&&roadhog build",
"test-build": "set NODE_ENV=testenv&&roadhog build",
"lint": "eslint --ext .js src test",
"precommit": "npm run lint",
"lib": "webpack --config webpackconfig/webpack.dll.config.js"
},
"dependencies": {
"@antv/data-set": "^0.10.2",
"antd": "^3.20.3",
"axios": "^0.18.0",
"babel-plugin-import": "^1.6.7",
"babel-polyfill": "^6.26.0",
"bizcharts": "^3.5.5",
"bizcharts-plugin-slider": "^2.1.1-beta.1",
"blueimp-md5": "^2.10.0",
"bundle-loader": "^0.5.6",
"clipboard": "^2.0.0",
"co": "^4.6.0",
"console-polyfill": "^0.3.0",
"cropper": "^3.1.4",
"dva": "^2.1.0",
"dva-loading": "^1.0.4",
"echarts": "^4.0.4",
"es3ify-loader": "^0.2.0",
"es5-shim": "^4.5.10",
"eventsource-polyfill": "^0.9.6",
"fetch-ie8": "^1.5.0",
"fetch-jsonp": "^1.1.3",
"jquery": "^3.3.1",
"lodash": "^4.17.5",
"mockjs": "^1.0.1-beta3",
"path-to-regexp": "^2.1.0",
"qrcode.react": "^0.8.0",
"qs": "^6.5.1",
"react": "^16.2.0",
"react-dom": "^16.2.0",
"video-react": "^0.14.1",
"xlsx": "^0.15.0"
},
"devDependencies": {
"babel-eslint": "^8.2.2",
"babel-plugin-dva-hmr": "^0.3.2",
"es3ify-loader": "^0.2.0",
"eslint": "^4.14.0",
"eslint-config-airbnb": "^16.1.0",
"eslint-config-umi": "^0.1.1",
"eslint-plugin-flowtype": "^2.34.1",
"eslint-plugin-import": "^2.6.0",
"eslint-plugin-jsx-a11y": "^5.1.1",
"eslint-plugin-react": "^7.1.0",
"html-webpack-plugin": "^3.1.0",
"husky": "^0.12.0",
"redbox-react": "^1.4.3",
"roadhog": "^2.5.0-beta.4",
"webpack": "^3.8.1"
}
}
yarn manifest:
No manifest
Lockfile:
No lockfile
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment