|
@@ -1,5 +1,5 @@
|
|
|
import React, {Component} from 'react'
|
|
import React, {Component} from 'react'
|
|
|
-import {BrowserRouter as Router, Route, Redirect} from 'react-router-dom'
|
|
|
|
|
|
|
+import {BrowserRouter as Router, Route, Redirect, Switch} from 'react-router-dom'
|
|
|
import BindMenu from "../modules/accountBind/BindMenu";
|
|
import BindMenu from "../modules/accountBind/BindMenu";
|
|
|
import AccountBind from "../modules/accountBind/AccountBind";
|
|
import AccountBind from "../modules/accountBind/AccountBind";
|
|
|
import NewAlbum from "../modules/album/NewAlbum";
|
|
import NewAlbum from "../modules/album/NewAlbum";
|
|
@@ -62,96 +62,110 @@ import ChangePhoneNumber from '../modules/hiPages/changephonenumber/ChangePhoneN
|
|
|
import ScoreNotification from '../modules/hiPages/scorenotification/ScoreNotification';
|
|
import ScoreNotification from '../modules/hiPages/scorenotification/ScoreNotification';
|
|
|
import AccessNoticeDetail from '../modules/hiPages/accessnoticedetail/AccessNoticeDetail';
|
|
import AccessNoticeDetail from '../modules/hiPages/accessnoticedetail/AccessNoticeDetail';
|
|
|
import ChartDemo from "../modules/chart/ChartDemo";
|
|
import ChartDemo from "../modules/chart/ChartDemo";
|
|
|
|
|
+import {connect} from "react-redux";
|
|
|
|
|
|
|
|
-
|
|
|
|
|
-export default class RouteConfig extends Component {
|
|
|
|
|
|
|
+class RouteConfig extends Component {
|
|
|
|
|
|
|
|
render() {
|
|
render() {
|
|
|
return (
|
|
return (
|
|
|
<Router>
|
|
<Router>
|
|
|
<div>
|
|
<div>
|
|
|
- <Route exact path='/' render={() => (
|
|
|
|
|
- <Redirect to='/bindMenu/app/'/>
|
|
|
|
|
- )}/>
|
|
|
|
|
-
|
|
|
|
|
- {/*饶猛*/}
|
|
|
|
|
- <Route path="/homePage" component={HomePage}/>{/*首页*/}
|
|
|
|
|
- <Route path='/userInfoPage/:type?' component={UserInfo}/>{/*个人信息*/}
|
|
|
|
|
-
|
|
|
|
|
- <Route path='/bindMenu/:type/:openid?/:wxAvatar?' component={BindMenu}/>{/*绑定菜单页面*/}
|
|
|
|
|
- <Route path='/accountBind/:type?' component={AccountBind}/>{/*绑定页面*/}
|
|
|
|
|
-
|
|
|
|
|
- <Route path='/newAlbum/:classId/:name?' component={NewAlbum}/>{/*新建相册*/}
|
|
|
|
|
- <Route path='/uploadImage/:albumId' component={UploadImage}/>{/*照片上传*/}
|
|
|
|
|
- <Route path='/classAlbum/:type?' component={ClassAlbum}/>{/*班级相册*/}
|
|
|
|
|
- <Route path='/pictureList/:type/:albumId/:title?' component={PictureList}/>{/*相册详情*/}
|
|
|
|
|
- <Route path='/uploadVideo/:classId/:name?' component={UploadVideo}/>{/*视频上传*/}
|
|
|
|
|
- <Route path='/videoPlayer/:title?' component={VideoPlayer}/>{/*视频播放*/}
|
|
|
|
|
-
|
|
|
|
|
- <Route path='/phonesSelect' component={PhonesSelect}/>{/*教师端通讯录*/}
|
|
|
|
|
- <Route path='/phonesList/:type/:classId?/:classTitle?' component={PhonesList}/>{/*家长端通讯录*/}
|
|
|
|
|
- <Route path='/phonesSearch/:type' component={PhonesSearch}/>{/*通讯录搜索页面*/}
|
|
|
|
|
-
|
|
|
|
|
- <Route path='/principalMailbox' component={PrincipalMailbox}/>{/*校长信箱*/}
|
|
|
|
|
- <Route path='/meetingSignIn' component={MeetingSignIn}/>{/*会议列表*/}
|
|
|
|
|
- <Route path='/systemMessage' component={SystemMessage}/>{/*系统消息*/}
|
|
|
|
|
- <Route path='/useHelp' component={UseHelp}/>{/*使用帮助*/}
|
|
|
|
|
- <Route path='/wonderMoment/:type?' component={WonderMoment}/>{/*精彩瞬间*/}
|
|
|
|
|
- <Route path='/principalHistory' component={PrincipalHistory}/>{/*校长信箱历史投递*/}
|
|
|
|
|
- <Route path='/campusCardRecharge/:type' component={CampusCardRecharge}/>{/*校园卡*/}
|
|
|
|
|
- <Route path='/consumeRePage/:type/:cardId' component={ConsumeRePage}/>{/*校园卡 1:消费记录 2.充值记录*/}
|
|
|
|
|
-
|
|
|
|
|
- <Route path='/rechargeList/:userId?' component={RechargeList}/>{/*家长端收费列表*/}
|
|
|
|
|
- <Route path='/rechargeRelease' component={RechargeRelease}/>{/*发起收费*/}
|
|
|
|
|
- <Route path='/classRechargeList' component={ClassRechargeList}/>{/*班级收费列表*/}
|
|
|
|
|
- <Route path='/classRechargeDetail/:payId' component={ClassRechargeDetail}/>{/*收费详情*/}
|
|
|
|
|
-
|
|
|
|
|
- <Route path='/announceRelease' component={AnnounceRelease}/>{/*新建通知公告*/}
|
|
|
|
|
- <Route path='/notifyBoard/parent' component={NotifyBoardParent}/>{/*家长端通知公告列表*/}
|
|
|
|
|
- <Route path='/notifyBoard/teacher' component={NotifyBoardTeacher}/>{/*教师端通知公告列表*/}
|
|
|
|
|
- <Route path='/notifyDetail/:role/:notifyId' component={NotifyBoardDetail}/>{/*通知公告详情*/}
|
|
|
|
|
-
|
|
|
|
|
- <Route path='/releaseAssignment' component={ReleaseAssignmentPage}/>{/*作业发布*/}
|
|
|
|
|
- <Route path='/assignmentList/:role' component={HomeWorkList}/>{/*作业列表*/}
|
|
|
|
|
- <Route path='/assignmentDetail/:role/:id' component={AssignmentDetailPage}/>{/*作业详情*/}
|
|
|
|
|
-
|
|
|
|
|
- <Route path='/voteList' component={VoteListParent}/>{/*家长端投票列表*/}
|
|
|
|
|
- <Route path='/voteListTab' component={VoteListTeacher}/>{/*教师端投票列表*/}
|
|
|
|
|
- <Route path="/voteDetail/:id/:role?" component={VoteDetailPage}/>{/*投票详情*/}
|
|
|
|
|
-
|
|
|
|
|
- {/*测试demo*/}
|
|
|
|
|
- <Route path='/chartDemo' component={ChartDemo}/>{/*图表测试页面*/}
|
|
|
|
|
-
|
|
|
|
|
- {/*方龙海*/}
|
|
|
|
|
- <Route path='/access-notice/:stuId?' component={AccessNotice}/> {/*出入校通知*/}
|
|
|
|
|
- <Route path='/field-trip' component={FieldTrip}/> {/*//外勤出差*/}
|
|
|
|
|
- <Route path='/res_apply' component={ResApply}/>{/*//用品申请*/}
|
|
|
|
|
- <Route path='/send-vote' component={SendVote}/>{/*//发起投票*/}
|
|
|
|
|
- <Route path='/sendMeetting' component={SendMeet}/> {/*//发起会议*/}
|
|
|
|
|
- <Route path='/class-schedule' component={ClassSchedule}/> {/*//课程表*/}
|
|
|
|
|
- <Route path='/score-inquiry' component={ScoreInquiry}/> {/*//成绩查询*/}
|
|
|
|
|
- <Route path='/approvel' component={Approvel}/>{/*我的审批*/}
|
|
|
|
|
- <Route path='/approvel-detail/:approveId/:isMyApply' component={ApprovelDetail}/> {/*审批详情*/}
|
|
|
|
|
- <Route path='/meet-detail/:meetId?' component={MeetDetail}/> {/*会议签到详情 meetingSignIn*/}
|
|
|
|
|
- <Route path='/leavedetail/:role/:lvId' component={LeaveDetail}/> {/*学生请假详情*/}
|
|
|
|
|
- <Route path="/changephonenumber" component={ChangePhoneNumber}/> {/*更换手机号码*/}
|
|
|
|
|
- <Route path="/scorenotification/:stuId?" component={ScoreNotification}/> {/*成绩通知*/}
|
|
|
|
|
- <Route path="/accessnoticedetail/:stuId/:anId?" component={AccessNoticeDetail}/> {/*出入校通知详情*/}
|
|
|
|
|
- {/*<Route path="/accessnoticedetail" component={AccessNoticeDetail}/> /!*出入校通知详情*!/*/}
|
|
|
|
|
- <Route path='/leaveAddC' component={LeaveAddCPage}/>{/*老师请假*/}
|
|
|
|
|
- <Route path='/leaveAdd' component={LeaveAddPage}/> {/*学生请假*/}
|
|
|
|
|
- <Route path='/leaveList/:role' component={LeaveListPage}/>{/*学生请假列表*/}
|
|
|
|
|
-
|
|
|
|
|
- {/*刘杰*/}
|
|
|
|
|
- <Route path={"/MobileUploadDemo"} component={MobileUploadDemo}/>
|
|
|
|
|
- <Route path={"/MobileUpload"} component={MobileUpload}/>
|
|
|
|
|
- <Route path={"/ImageGrid"} component={ImageGrid}/>
|
|
|
|
|
- <Route path={"/TestImagesViewer"} component={TestImagesViewer}/>
|
|
|
|
|
- <Route path={'/picturesWall'} component={PicturesWallItem}/>
|
|
|
|
|
- <Route path='/leaveApproval' component={LeaveApprovalPage}/>
|
|
|
|
|
-
|
|
|
|
|
|
|
+ <Switch>
|
|
|
|
|
+ <Route exact path='/' render={() => (
|
|
|
|
|
+ <Redirect to='/bindMenu/app/'/>
|
|
|
|
|
+ )}/>
|
|
|
|
|
+
|
|
|
|
|
+ {/*饶猛*/}
|
|
|
|
|
+ <Route path="/homePage" component={HomePage}/>{/*首页*/}
|
|
|
|
|
+ <Route path='/userInfoPage/:type?' component={UserInfo}/>{/*个人信息*/}
|
|
|
|
|
+
|
|
|
|
|
+ <Route path='/bindMenu/:type/:openid?/:wxAvatar?' component={BindMenu}/>{/*绑定菜单页面*/}
|
|
|
|
|
+ <Route path='/accountBind/:type?' component={AccountBind}/>{/*绑定页面*/}
|
|
|
|
|
+
|
|
|
|
|
+ <Route path='/newAlbum/:classId/:name?' component={NewAlbum}/>{/*新建相册*/}
|
|
|
|
|
+ <Route path='/uploadImage/:albumId' component={UploadImage}/>{/*照片上传*/}
|
|
|
|
|
+ <Route path='/classAlbum/:type?' component={ClassAlbum}/>{/*班级相册*/}
|
|
|
|
|
+ <Route path='/pictureList/:type/:albumId/:title?' component={PictureList}/>{/*相册详情*/}
|
|
|
|
|
+ <Route path='/uploadVideo/:classId/:name?' component={UploadVideo}/>{/*视频上传*/}
|
|
|
|
|
+ <Route path='/videoPlayer/:title?' component={VideoPlayer}/>{/*视频播放*/}
|
|
|
|
|
+
|
|
|
|
|
+ <Route path='/phonesSelect' component={PhonesSelect}/>{/*教师端通讯录*/}
|
|
|
|
|
+ <Route path='/phonesList/:type/:classId?/:classTitle?' component={PhonesList}/>{/*家长端通讯录*/}
|
|
|
|
|
+ <Route path='/phonesSearch/:type' component={PhonesSearch}/>{/*通讯录搜索页面*/}
|
|
|
|
|
+
|
|
|
|
|
+ <Route path='/principalMailbox' component={PrincipalMailbox}/>{/*校长信箱*/}
|
|
|
|
|
+ <Route path='/meetingSignIn' component={MeetingSignIn}/>{/*会议列表*/}
|
|
|
|
|
+ <Route path='/systemMessage' component={SystemMessage}/>{/*系统消息*/}
|
|
|
|
|
+ <Route path='/useHelp' component={UseHelp}/>{/*使用帮助*/}
|
|
|
|
|
+ <Route path='/wonderMoment/:type?' component={WonderMoment}/>{/*精彩瞬间*/}
|
|
|
|
|
+ <Route path='/principalHistory' component={PrincipalHistory}/>{/*校长信箱历史投递*/}
|
|
|
|
|
+ <Route path='/campusCardRecharge/:type' component={CampusCardRecharge}/>{/*校园卡*/}
|
|
|
|
|
+ <Route path='/consumeRePage/:type/:cardId' component={ConsumeRePage}/>{/*校园卡 1:消费记录 2.充值记录*/}
|
|
|
|
|
+
|
|
|
|
|
+ <Route path='/rechargeList/:userId?' component={RechargeList}/>{/*家长端收费列表*/}
|
|
|
|
|
+ <Route path='/rechargeRelease' component={RechargeRelease}/>{/*发起收费*/}
|
|
|
|
|
+ <Route path='/classRechargeList' component={ClassRechargeList}/>{/*班级收费列表*/}
|
|
|
|
|
+ <Route path='/classRechargeDetail/:payId' component={ClassRechargeDetail}/>{/*收费详情*/}
|
|
|
|
|
+
|
|
|
|
|
+ <Route path='/announceRelease' component={AnnounceRelease}/>{/*新建通知公告*/}
|
|
|
|
|
+ <Route path='/notifyBoard/parent' component={NotifyBoardParent}/>{/*家长端通知公告列表*/}
|
|
|
|
|
+ <Route path='/notifyBoard/teacher' component={NotifyBoardTeacher}/>{/*教师端通知公告列表*/}
|
|
|
|
|
+ <Route path='/notifyDetail/:role/:notifyId' component={NotifyBoardDetail}/>{/*通知公告详情*/}
|
|
|
|
|
+
|
|
|
|
|
+ <Route path='/releaseAssignment' component={ReleaseAssignmentPage}/>{/*作业发布*/}
|
|
|
|
|
+ <Route path='/assignmentList/:role' component={HomeWorkList}/>{/*作业列表*/}
|
|
|
|
|
+ <Route path='/assignmentDetail/:role/:id' component={AssignmentDetailPage}/>{/*作业详情*/}
|
|
|
|
|
+
|
|
|
|
|
+ <Route path='/voteList' component={VoteListParent}/>{/*家长端投票列表*/}
|
|
|
|
|
+ <Route path='/voteListTab' component={VoteListTeacher}/>{/*教师端投票列表*/}
|
|
|
|
|
+ <Route path="/voteDetail/:id/:role?" component={VoteDetailPage}/>{/*投票详情*/}
|
|
|
|
|
+
|
|
|
|
|
+ {/*测试demo*/}
|
|
|
|
|
+ <Route path='/chartDemo' component={ChartDemo}/>{/*图表测试页面*/}
|
|
|
|
|
+
|
|
|
|
|
+ {/*方龙海*/}
|
|
|
|
|
+ <Route path='/access-notice/:stuId?' component={AccessNotice}/> {/*出入校通知*/}
|
|
|
|
|
+ <Route path='/field-trip' component={FieldTrip}/> {/*//外勤出差*/}
|
|
|
|
|
+ <Route path='/res_apply' component={ResApply}/>{/*//用品申请*/}
|
|
|
|
|
+ <Route path='/send-vote' component={SendVote}/>{/*//发起投票*/}
|
|
|
|
|
+ <Route path='/sendMeetting' component={SendMeet}/> {/*//发起会议*/}
|
|
|
|
|
+ <Route path='/class-schedule' component={ClassSchedule}/> {/*//课程表*/}
|
|
|
|
|
+ <Route path='/score-inquiry' component={ScoreInquiry}/> {/*//成绩查询*/}
|
|
|
|
|
+ <Route path='/approvel' component={Approvel}/>{/*我的审批*/}
|
|
|
|
|
+ <Route path='/approvel-detail/:approveId/:isMyApply' component={ApprovelDetail}/> {/*审批详情*/}
|
|
|
|
|
+ <Route path='/meet-detail/:meetId?' component={MeetDetail}/> {/*会议签到详情 meetingSignIn*/}
|
|
|
|
|
+ <Route path='/leavedetail/:role/:lvId' component={LeaveDetail}/> {/*学生请假详情*/}
|
|
|
|
|
+ <Route path="/changephonenumber" component={ChangePhoneNumber}/> {/*更换手机号码*/}
|
|
|
|
|
+ <Route path="/scorenotification/:stuId?" component={ScoreNotification}/> {/*成绩通知*/}
|
|
|
|
|
+ <Route path="/accessnoticedetail/:stuId/:anId?" component={AccessNoticeDetail}/> {/*出入校通知详情*/}
|
|
|
|
|
+ {/*<Route path="/accessnoticedetail" component={AccessNoticeDetail}/> /!*出入校通知详情*!/*/}
|
|
|
|
|
+ <Route path='/leaveAddC' component={LeaveAddCPage}/>{/*老师请假*/}
|
|
|
|
|
+ <Route path='/leaveAdd' component={LeaveAddPage}/> {/*学生请假*/}
|
|
|
|
|
+ <Route path='/leaveList/:role' component={LeaveListPage}/>{/*学生请假列表*/}
|
|
|
|
|
+
|
|
|
|
|
+ {/*刘杰*/}
|
|
|
|
|
+ <Route path={"/MobileUploadDemo"} component={MobileUploadDemo}/>
|
|
|
|
|
+ <Route path={"/MobileUpload"} component={MobileUpload}/>
|
|
|
|
|
+ <Route path={"/ImageGrid"} component={ImageGrid}/>
|
|
|
|
|
+ <Route path={"/TestImagesViewer"} component={TestImagesViewer}/>
|
|
|
|
|
+ <Route path={'/picturesWall'} component={PicturesWallItem}/>
|
|
|
|
|
+ <Route path='/leaveApproval' component={LeaveApprovalPage}/>
|
|
|
|
|
+
|
|
|
|
|
+ {/*404页面*/}
|
|
|
|
|
+ <Route render={() => (
|
|
|
|
|
+ <Redirect to={'/bindMenu/app/' + this.props.userInfo.appId}/>
|
|
|
|
|
+ )}/>
|
|
|
|
|
+ </Switch>
|
|
|
</div>
|
|
</div>
|
|
|
</Router>
|
|
</Router>
|
|
|
);
|
|
);
|
|
|
}
|
|
}
|
|
|
-}
|
|
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+let mapStateToProps = (state) => ({
|
|
|
|
|
+ userInfo: {...state.redUserInfo}
|
|
|
|
|
+})
|
|
|
|
|
+
|
|
|
|
|
+let mapDispatchToProps = (dispatch) => ({})
|
|
|
|
|
+
|
|
|
|
|
+export default connect(mapStateToProps, mapDispatchToProps)(RouteConfig)
|