Commit 317c176e authored by wangxuelai's avatar wangxuelai

''

parent 43171c84
......@@ -17,6 +17,6 @@
</head>
<body>
<div id="root"></div>
<script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/dist/main.js?1575469624790" charset="utf-8"></script>
<script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/dist/main.js?1575611168127" charset="utf-8"></script>
</body>
</html>
\ No newline at end of file
......@@ -199,4 +199,13 @@ export default {
index: `${dakaapi}member/materials`,
uploadcourseware: `${dakaapi}member/online_courses/upload_content`,
},
// 新版注册接口
newRegister: {
register: `${dakaapi}common/qx_login/register`,
forget_password: `${dakaapi}common/qx_login/forget_password`,
change_password: `${dakaapi}member/erp/account/change_password`,
send_code: `${dakaapi}common/sms`,
},
deployschool: `${dakaapi}member/one_key_deploy`,
selectdeployschool: `${dakaapi}member/one_key_deploy_status`,
};
......@@ -213,6 +213,7 @@ class classRoomMgt extends React.Component {
timeArr,
edittype,
manageCourseTime,
schoolUserInfo,
} = this.props;
const { errorMsg } = this.state;
const { getFieldDecorator } = this.props.form;
......@@ -286,7 +287,7 @@ class classRoomMgt extends React.Component {
>
{getFieldDecorator('end_date', {
rules: [{ required: true, message: '结束时间不能为空' }],
initialValue: rulePlanDetail.end_date ? moment(rulePlanDetail.end_date, 'YYYY-MM-DD') : moment(new Date(), 'YYYY-MM-DD'),
initialValue: rulePlanDetail.end_date ? moment(rulePlanDetail.end_date, 'YYYY-MM-DD') : moment(moment().add(1, 'y').format('YYYY-MM-DD'), 'YYYY-MM-DD'),
})(<DatePicker style={{ width: '100%' }} placeholder="请选择结束时间" disabledDate={this.endDisabledDate} />)}
</Form.Item>
<Form.Item
......@@ -344,7 +345,7 @@ class classRoomMgt extends React.Component {
<Col span={13}>
{getFieldDecorator('times', {
rules: [{ required: true, message: '上课时间不能为空' }],
initialValue: rulePlanDetail.times,
initialValue: datePlanDetail.times.length > 0 ? datePlanDetail.times : ['10:00-11:00'],
})(
<Select mode="multiple" placeholder="请选择上课时间">
{timeArr.map(ele => <Option key={ele.id} value={`${ele.start_time}-${ele.end_time}`}>{`${ele.start_time}-${ele.end_time}`}</Option>)}
......@@ -381,7 +382,7 @@ class classRoomMgt extends React.Component {
<Row gutter={4}>
<Col span={13}>
{getFieldDecorator('teacher_id', {
initialValue: rulePlanDetail.teacher_id,
initialValue: rulePlanDetail.teacher_id.length > 0 ? rulePlanDetail.teacher_id : schoolUserInfo.id,
rules: [{ required: true, message: '请选择上课老师' }],
})(
<Select style={{ width: '100%' }} placeholder="请选择上课老师">
......@@ -647,6 +648,9 @@ function mapStateToProps(state) {
classList,
widthClassSelect,
} = state.plancourse;
const {
schoolUserInfo,
} = state.webapp;
return {
tabType,
selectWeekDays,
......@@ -660,6 +664,7 @@ function mapStateToProps(state) {
// teacherList,
classList,
widthClassSelect,
schoolUserInfo,
};
}
export default connect(mapStateToProps)(classRoomMgtForm);
......
......@@ -3,6 +3,7 @@ import { connect } from 'dva';
import { routerRedux } from 'dva/router';
import { Menu, Icon, Layout } from 'antd';
import SjdMenuStyle from './SjdMenu.less';
import UserGuide from '../components/UserGuide';
import {
pageIn,
LocalStorage,
......@@ -29,7 +30,10 @@ class SjdMenu extends React.Component {
componentWillUnmount() {
}
selectedMenu = (id, fatherId) => {
const { dispatch } = this.props;
const { dispatch, guideShow } = this.props;
if (guideShow) {
return;
}
dispatch({
type: 'webapp/menuselected',
payload: {
......@@ -66,7 +70,9 @@ class SjdMenu extends React.Component {
});
}
render() {
const { menus, defaultMenu, collapsed } = this.props;
const {
menus, defaultMenu, collapsed, guideStep, guideShow,
} = this.props;
const menuItemStyle = {
fontSize: '13px',
height: '40px',
......@@ -94,6 +100,7 @@ class SjdMenu extends React.Component {
}}
className={`${SjdMenuStyle.menusider} menusider`}
>
<UserGuide />
<div>
{/* <div className={collapsed ? SjdMenuStyle.collapsedlogo : SjdMenuStyle.uncollapsedlogo} onClick={this.goHome} /> */}
<div className={SjdMenuStyle.uncollapsedlogo} onClick={this.goHome} />
......@@ -106,13 +113,14 @@ class SjdMenu extends React.Component {
{
menus.map(ele => (
!ele.isFather ?
<Menu.Item key={ele.id} style={menuItemStyle} onClick={() => this.selectedMenu(ele.id, null)}>
<Menu.Item id={`menu_${ele.id}`} key={ele.id} style={menuItemStyle} onClick={() => this.selectedMenu(ele.id, null)}>
<div className={SjdMenuStyle.menuicon} style={defaultMenu == ele.id ? { width: ele.style.width, height: ele.style.height, backgroundImage: `url(${ele.activeurl})` } : { width: ele.style.width, height: ele.style.height, backgroundImage: `url(${ele.notactiveurl})` }} />
<Icon type="right" style={{ width: 0, minWidth: 'initial', visibility: 'hidden' }} />
<span>{ele.name}</span>
</Menu.Item> :
<SubMenu
key="sub1"
id={`menu_${ele.id}`}
title={
<span style={padding}>
<div className={SjdMenuStyle.menuicon} style={defaultMenu == ele.id ? { width: ele.style.width, height: ele.style.height, backgroundImage: `url(${ele.activeurl})` } : { width: ele.style.width, height: ele.style.height, backgroundImage: `url(${ele.notactiveurl})` }} />
......@@ -122,7 +130,7 @@ class SjdMenu extends React.Component {
}
>
{ele.subMenues.map(submenu => (
<Menu.Item key={submenu.id} style={menuItemStyle} onClick={() => this.selectedMenu(submenu.id, submenu.fatherId)}>
<Menu.Item key={submenu.id} id={`menu_${submenu.id}`} style={menuItemStyle} onClick={() => this.selectedMenu(submenu.id, submenu.fatherId)}>
<div className={SjdMenuStyle.menuicon} style={defaultMenu == submenu.id ? { width: submenu.style.width, height: submenu.style.height, backgroundImage: `url(${submenu.activeurl})` } : { width: submenu.style.width, height: submenu.style.height, backgroundImage: `url(${submenu.notactiveurl})` }} />
<Icon type="right" style={{ width: 0, minWidth: 'initial', visibility: 'hidden' }} />
<span>{submenu.name}</span>
......@@ -145,11 +153,15 @@ function mapStateToProps(state) {
const {
menus, defaultMenu, collapsed, sid,
} = state.webapp;
const {
guideShow,
} = state.userguide;
return {
menus,
defaultMenu,
collapsed,
sid,
guideShow,
};
}
export default connect(mapStateToProps)(SjdMenu);
This diff is collapsed.
.UserGuide {
.guidemask {
position: fixed;
width: 100%;
height: 100%;
left: 0;
top: 0;
z-index: 103;
background-color: rgba(0, 0, 0, 0.5);
}
.textdesc {
color: #FFFFFF;
font-size: 18px;
font-weight: 700;
position: absolute;
}
.linetype1 { // 横线
height: 2px;
background-color: #fff;
position: absolute;
}
.linetype2 { // 竖向
width: 2px;
position: absolute;
background-color: #fff;
}
.circledot {
width: 16px;
height: 16px;
position: absolute;
z-index: 1;
border-radius: 50%;
border: 2px solid rgba(255,255,255,1);
display: flex;
align-items: center;
justify-content: center;
&::after {
content: '';
display: block;
width: 8px;
height: 8px;
border-radius: 50%;
border: 2px solid rgba(255,255,255,1);
}
}
.nextStep {
width:95px;
height:32px;
background:rgba(255,182,26,1);
border-radius:4px;
color: #fff;
text-align: center;
line-height: 32px;
font-size: 14px;
font-weight: 700;
cursor: pointer;
position: absolute;
z-index: 1;
}
}
.guidecover {
width: 256px;
height: 132px;
display: block;
margin: 0 auto 27px;
}
.guidedesc {
line-height: 1;
color: #848484;
font-size: 14px;
text-align: center;
margin-bottom: 68px;
}
.btnbox {
text-align: center;
}
.modalHeader {
text-align: center;
position: relative;
line-height: 1;
margin-top: 10px;
.title {
color: #2D2D2D;
font-size: 22px;
font-weight: 700;
}
.skip {
color: #1890FF;
font-size: 14px;
line-height: 22px;
position: absolute;
right: 0;
top: 50%;
transform: translateY(-50%);
cursor: pointer;
}
.callguide {
}
}
:global {
.UserGuideModal {
.ant-modal-header {
border-bottom: none;
}
}
}
\ No newline at end of file
......@@ -841,6 +841,7 @@ export default {
},
* tabChange({ payload }, { call, put, select }) {
const { tab } = payload;
console.log(tab, 'tabtabtabtabtab');
yield put({
type: 'updateState',
payload: {
......
import { routerRedux } from 'dva/router';
import { message } from 'antd';
import queryString from 'qs';
import { delay } from 'redux-saga';
import {
LocalStorage,
SessionStorage,
isExpired,
} from '../utils/index';
import errorcode from '../common/errorcode';
import * as newregister from '../services/newregister';
import * as schoolajax from '../services/schooladd';
import * as commonajax from '../services/common';
import rootMap from '../common/constants';
export default {
namespace: 'deployschool',
state: {
deployType: 3, // 类型 1-口才 2-美术 3-书法 4-跆拳道 5-通用
sid: 0,
schoolUserInfo: {},
schoolStatus: '', // 1-部署中 2-部署结束
},
subscriptions: {
setup({ dispatch, history }) { // eslint-disable-line
},
},
effects: {
* queryinfo({ payload }, { call, put, select }) { // 释放该页面存储的所有状态
const { id } = payload;
yield put({
type: 'updateState',
payload: {
sid: id,
},
});
yield put({
type: 'querymemberinfo',
});
yield put({
type: 'selectStatus',
});
},
* querymemberinfo({ payload }, { call, put, select }) { // 释放该页面存储的所有状态
const { sid } = yield select(state => state.deployschool);
const nickname = yield call(commonajax.myNickname, {
school_id: sid,
});
if (nickname.code == 200) {
yield put({
type: 'updateState',
payload: {
schoolUserInfo: nickname.data,
},
});
}
},
* selectStatus({ payload }, { call, put, select }) { // 释放该页面存储的所有状态
const { sid } = yield select(state => state.deployschool);
yield put({
type: 'updateState',
payload: {
schoolStatus: '',
},
});
const data = yield call(newregister.selectDeploySchool, {
school_id: sid,
});
if (data.code == 200) {
yield put({
type: 'updateState',
payload: {
schoolStatus: data.data.status,
},
});
}
},
* developSchool({ payload }, { call, put, select }) {
const { deployType, sid } = yield select(state => state.deployschool);
const data = yield call(newregister.deploySchool, {
school_id: sid,
type: deployType,
});
if (data.code == 200) {
yield put({
type: 'updateState',
payload: {
deployType: 3,
schoolStatus: 2,
},
});
} else {
yield put({
type: 'webapp/errorrequestresolve',
payload: {
data,
},
});
}
},
* developSkip({ payload }, { call, put, select }) {
const { schoolUserInfo, sid } = yield select(state => state.deployschool);
const data = yield call(newregister.deploySchool, {
school_id: sid,
type: 6,
});
if (data.code == 200) {
LocalStorage.setItem('sid', sid);
LocalStorage.setItem('role', schoolUserInfo.schoolTeacher ? schoolUserInfo.schoolTeacher.type : 5);
if (schoolUserInfo.schoolTeacher) {
LocalStorage.setItem('rootMap', rootMap.rootMap);
} else {
LocalStorage.setItem('rootMap', rootMap.emptyRootMap);
}
yield put({
type: 'webapp/updateState',
payload: {
sid,
role: schoolUserInfo.schoolTeacher ? schoolUserInfo.schoolTeacher.type : '',
},
});
yield call(commonajax.schoolLoginTime, {
id: sid,
type: 1,
});
yield put(routerRedux.push({
pathname: '/sjd/indexstaic',
}));
} else {
yield put({
type: 'webapp/errorrequestresolve',
payload: {
data,
},
});
}
},
* goHome({ payload }, { put, call, select }) {
const { schoolUserInfo, sid } = yield select(state => state.deployschool);
LocalStorage.setItem('sid', sid);
LocalStorage.setItem('role', schoolUserInfo.schoolTeacher ? schoolUserInfo.schoolTeacher.type : 5);
if (schoolUserInfo.schoolTeacher) {
LocalStorage.setItem('rootMap', rootMap.rootMap);
} else {
LocalStorage.setItem('rootMap', rootMap.emptyRootMap);
}
yield put({
type: 'webapp/updateState',
payload: {
sid,
role: schoolUserInfo.schoolTeacher ? schoolUserInfo.schoolTeacher.type : '',
},
});
yield call(commonajax.schoolLoginTime, {
id: sid,
type: 1,
});
yield put(routerRedux.push({
pathname: '/sjd/indexstaic',
}));
yield delay(200);
const { screenIsBig } = yield select(state => state.webapp);
if (!screenIsBig) {
return;
}
yield put({
type: 'userguide/updateState',
payload: {
guideShow: true, // 引导是否开启
guideStep: 1, // 引导步骤
},
});
},
* pageInit({ payload }, { call, put, select }) {
yield put({
type: 'updateState',
payload: {
deployType: 3,
schoolStatus: '',
},
});
},
},
reducers: {
updateState(state, { payload }) {
return {
...state,
...payload,
};
},
},
};
......@@ -45,6 +45,9 @@ import coursemateria from './coursemateria';
import coursegatherdetail from './coursegatherdetail';
import uploadcourseware from './uploadcourseware';
import classrecord from './classrecord';
import newregister from './newregister';
import userguide from './userguide';
import deployschool from './deployschool';
export default {
loginModel,
indexstaicModel,
......@@ -84,4 +87,7 @@ export default {
coursegatherdetail,
uploadcourseware,
classrecord,
newregister,
userguide,
deployschool,
};
......@@ -12,6 +12,7 @@ import errorcode from '../common/errorcode';
import * as login from '../services/login';
import * as users from '../services/users';
import * as commonAjax from '../services/common';
import * as newregister from '../services/newregister';
export default {
namespace: 'login',
......@@ -22,6 +23,7 @@ export default {
teacherLoginQrcode: '',
generateSuccess: true,
randomString: '',
qxLoading: false,
},
subscriptions: {
setup({ dispatch, history }) { // eslint-disable-line
......@@ -39,13 +41,14 @@ export default {
teacherLoginQrcode: '',
generateSuccess: true,
randomString: '',
qxLoading: false,
},
});
},
*fetch({ payload }, { call, put }) { // eslint-disable-line
yield put({ type: 'save' });
},
* login({ payload }, { call, put }) {
* sjdLogin({ payload }, { call, put }) {
const {
needlogin, mobile, password, type, verifycode,
} = payload;
......@@ -135,6 +138,72 @@ export default {
}
setTimeout(loadmessage);
},
* qxLogin({ payload }, { call, put }) {
const {
needlogin, mobile, password, type, code,
} = payload;
yield put({
type: 'updateState',
payload: {
qxLoading: true,
},
});
const loadmessage = message.loading('登录中...', 0);
let params = {};
if (type == 'verify') {
params = {
type: 3,
mobile,
code,
};
} else {
params = {
type: 4,
mobile,
password,
};
}
const data = yield call(login.newLogin, params);
if (data.code === 200) {
if (data.data && data.data.token) {
LocalStorage.setItem('user', {
expiresIn: data.data.expiresIn,
token: data.data.token,
tokenType: data.data.tokenType,
avatar: (data.data.business && data.data.business.avatar) || '',
consumerId: (data.data.business && data.data.business.consumer_id) || 0,
createdAt: (data.data.business && data.data.business.created_at) || '',
deletedAt: (data.data.business && data.data.business.deleted_at) || '',
id: (data.data.business && data.data.business.id) || 0,
memberId: (data.data.business && data.data.business.member_id) || 0,
mobile: (data.data.business && data.data.business.mobile) || '',
expiresDateTime: data.data.expiresDateTime || '',
nickname: (data.data.business && data.data.business.nickname) || '',
});
message.success('登录成功!', 1);
yield put({
type: 'webapp/updateState',
payload: {
userInfo: LocalStorage.getItem('user'),
},
});
yield put(routerRedux.push({
pathname: '/erp/schoollist',
}));
} else {
message.error('登录失败,请重试', 1.5);
}
} else {
yield put({
type: 'updateState',
payload: {
qxLoading: false,
},
});
message.error(data.msg, 1);
}
setTimeout(loadmessage);
},
* goregister({ payload }, { put }) {
yield put(routerRedux.push({
pathname: '/register',
......
import { routerRedux } from 'dva/router';
import { message } from 'antd';
import queryString from 'qs';
import { delay } from 'redux-saga';
import {
LocalStorage,
SessionStorage,
isExpired,
} from '../utils/index';
import errorcode from '../common/errorcode';
import * as newregister from '../services/newregister';
import * as schoolajax from '../services/schooladd';
export default {
namespace: 'newregister',
state: {
mobile: '',
gettingVerifyCoding: false, // 防止获取验证码重复提交
countdown: 60,
counting: false,
registering: false,
resolves: [],
modalVisible: false,
protocolData: '',
timer: null,
location_address: '',
},
subscriptions: {
setup({ dispatch, history }) { // eslint-disable-line
},
},
effects: {
* register({ payload }, { call, put, select }) {
const {
mobile,
code,
password,
from,
title,
} = payload;
const { locationQuery } = yield select(state => state.webapp);
const {
longitude, latitude, locationAddress, province, city, district,
} = yield select(state => state.schooladd);
yield put({
type: 'updateState',
payload: {
registering: true,
},
});
const data = yield call(newregister.register, {
mobile,
code,
password,
from,
});
if (data.code === 200) {
if (data.data && data.data.token) {
LocalStorage.setItem('user', {
expiresIn: data.data.expiresIn,
token: data.data.token,
tokenType: data.data.tokenType,
avatar: (data.data.business && data.data.business.avatar) || '',
consumerId: (data.data.business && data.data.business.consumer_id) || 0,
createdAt: (data.data.business && data.data.business.created_at) || '',
deletedAt: (data.data.business && data.data.business.deleted_at) || '',
id: (data.data.business && data.data.business.id) || 0,
memberId: (data.data.business && data.data.business.member_id) || 0,
mobile: (data.data.business && data.data.business.mobile) || '',
nickname: (data.data.business && data.data.business.nickname) || '',
expiresDateTime: data.data.expiresDateTime || '',
});
}
message.success('注册成功!', 1);
yield put({
type: 'webapp/updateState',
payload: {
userInfo: LocalStorage.getItem('user'),
},
});
const schooladd = yield call(schoolajax.memberSchoolAdd, {
title,
longitude,
latitude,
location_address: province + city + district + locationAddress,
address: locationAddress,
logo: '',
province,
city,
area: district,
token: data.data.token,
});
if (schooladd.code === 200) {
// LocalStorage.setItem('sid', schooladd.data.id);
// yield put({
// type: 'webapp/updateState',
// payload: {
// sid: LocalStorage.getItem('sid'),
// },
// });
// yield put({
// type: 'updateState',
// payload: {
// schoolId: schooladd.data.id,
// },
// });
yield put({
type: 'updateState',
payload: {
registering: false,
userInfo: LocalStorage.getItem('user'),
location_address: '',
},
});
yield put({
type: 'schooladd/updateState',
payload: {
longitude: '',
latitude: '',
locationAddress: '',
province: '',
city: '',
district: '',
address: '',
},
});
// yield delay(200);
yield put(routerRedux.push({
pathname: `/deploySchool/${schooladd.data.id}`,
}));
}
} else {
message.error(data.msg, 1);
yield put({
type: 'updateState',
payload: {
registering: false,
},
});
}
},
* goToUserInfo({ payload }, { put }) {
yield put(routerRedux.push({
pathname: '/userinfo',
}));
},
* goHome({ payload }, { put }) {
yield put(routerRedux.push({
pathname: '/sjd/indexstaic',
}));
},
* getverifycode({ payload }, { call, put, select }) {
const { countdown, counting, gettingVerifyCoding } = yield select(state => state.newregister);
const { timer } = yield select(state => state.register);
const { mobile, sms_type } = payload;
let newCountdowm = countdown;
let newCounting = counting;
yield put({
type: 'updateState',
payload: {
gettingVerifyCoding: true,
counting: false,
},
});
const verifycodehide = message.loading('正在获取验证码....', 0);
const data = yield call(newregister.getVerifyCode, { mobile, sms_type });
if (data.code === 200) {
setTimeout(verifycodehide);
message.success('验证码获取成功', 1);
yield put({
type: 'updateState',
payload: {
gettingVerifyCoding: false,
},
});
newCounting = true;
yield put({
type: 'updateState',
payload: {
counting: newCounting,
},
});
const setTimer = setInterval(() => {
newCountdowm--;
if (newCountdowm <= 0) {
newCountdowm = 60;
newCounting = false;
clearInterval(setTimer);
}
payload.dispatch({
type: 'newregister/updateState',
payload: {
countdown: newCountdowm,
counting: newCounting,
timer: setTimer,
},
});
}, 1000);
} else {
setTimeout(verifycodehide);
yield put({
type: 'updateState',
payload: {
gettingVerifyCoding: false,
counting: false,
countdown: 60,
},
});
message.error(data.msg, 1);
}
},
* getMobile({ payload }, { call, put, select }) {
yield put({
type: 'updateState',
payload: {
mobile: payload.mobile,
},
});
},
* gologin({ payload }, { call, put, select }) {
const action = {
pathname: '/login',
};
if (payload.mobile !== '') {
action.search = queryString.stringify({
mobile: payload.mobile,
});
}
yield put(routerRedux.push(action));
},
* goVerifyLogin({ payload }, { call, put, select }) {
const action = {
pathname: '/login',
};
if (payload.mobile !== '') {
action.search = queryString.stringify({
mobile: payload.mobile,
});
}
yield put(routerRedux.push(action));
},
* unloadstate({ payload }, { call, put, select }) {
const { timer } = yield select(state => state.register);
if (timer) clearInterval(timer);
yield put({
type: 'updateState',
payload: {
mobile: '',
gettingVerifyCoding: false, // 防止获取验证码重复提交
countdown: 60,
counting: false,
registering: false,
},
});
},
* setlocation({ payload }, { call, put, select }) {
const {
locationAddress, province, city, district,
} = yield select(state => state.schooladd);
yield put({
type: 'updateState',
payload: {
location_address: province + city + district + locationAddress,
},
});
},
* pageInit({ payload }, { call, put, select }) {
yield put({
type: 'updateState',
payload: {
mobile: '',
gettingVerifyCoding: false, // 防止获取验证码重复提交
countdown: 60,
counting: false,
registering: false,
resolves: [],
modalVisible: false,
protocolData: '',
timer: null,
location_address: '',
},
});
},
},
reducers: {
updateState(state, { payload }) {
return {
...state,
...payload,
};
},
},
};
......@@ -224,8 +224,8 @@ export default {
message.error('开始时间不能大于结束时间', 1);
return;
}
if ((endDateTimestamp - startDateTimestamp) > 1000 * 60 * 60 * 24 * 365) {
message.error('排课周期不能超过年', 1);
if ((endDateTimestamp - startDateTimestamp) > 1000 * 60 * 60 * 24 * 365 * 2) {
message.error('排课周期不能超过年', 1);
return;
}
if (selectWeekDays.length == 0) {
......
......@@ -6,7 +6,7 @@ import {
SessionStorage,
isExpired,
} from '../utils/index';
import * as register from '../services/register';
import * as newregister from '../services/newregister';
import errorcode from '../common/errorcode';
export default {
namespace: 'resetpsd',
......@@ -27,16 +27,20 @@ export default {
});
},
* resetpsd({ payload }, { call, put }) {
const { info } = payload;
const { mobile, password, code } = payload;
const resethide = message.loading('正在重置密码...');
const data = yield call(register.resetPsd, { info });
if (!data.code) {
const params = {
mobile, password, code,
};
const data = yield call(newregister.forgetPassword, params);
console.log(data, 'data');
if (data.code === 200) {
setTimeout(resethide);
message.success('密码重置成功', 1);
yield put({
type: 'register/gologin',
type: 'newregister/gologin',
payload: {
mobile: info.mobile,
mobile,
},
});
} else {
......
import { routerRedux } from 'dva/router';
import queryString from 'query-string';
import { message, Modal } from 'antd';
import moment from 'moment';
import { delay } from 'redux-saga';
import errorcode from '../common/errorcode';
import menuConfig from '../common/menuconfig';
import headquartersmenuConfig from '../common/headquartersmenuconfig';
import * as commonajax from '../services/common';
import * as users from '../services/users';
import {
caculateCirclePosition,
} from '../utils/index';
const pathToRegexp = require('path-to-regexp');
export default {
namespace: 'userguide',
state: {
guideShow: false, // 引导是否开启
guideStep: 1, // 引导步骤
position: {},
},
subscriptions: {
setup({ dispatch, history }) {
},
},
effects: {
* getposition({ payload }, { call, put, select }) {
const { page, doms } = payload;
const { screenIsBig } = yield select(state => state.webapp);
if (!screenIsBig) {
return;
}
switch (page) {
case 'course':
doms.addCourseBtn.style.position = 'relative';
doms.addCourseBtn.style.zIndex = 105;
doms.menuBtn.style.position = 'relative';
doms.menuBtn.style.zIndex = 105;
yield put({
type: 'updateState',
payload: {
position: {
addCourseBtn: caculateCirclePosition('bottom', doms.addCourseBtn.getClientRects()[0]),
menuBtn: caculateCirclePosition('right', doms.menuBtn.getClientRects()[0]),
},
},
});
break;
case 'student':
doms.addStudentBtn.style.position = 'relative';
doms.addStudentBtn.style.zIndex = 105;
doms.menuBtn.style.position = 'relative';
doms.menuBtn.style.zIndex = 105;
doms.bindQrcodeBtn.style.position = 'relative';
doms.bindQrcodeBtn.style.zIndex = 105;
doms.inviteQrcodeBtn.style.position = 'relative';
doms.inviteQrcodeBtn.style.zIndex = 105;
yield put({
type: 'updateState',
payload: {
position: {
addStudentBtn: caculateCirclePosition('bottom', doms.addStudentBtn.getClientRects()[0]),
menuBtn: caculateCirclePosition('right', doms.menuBtn.getClientRects()[0]),
bindQrcodeBtn: caculateCirclePosition('bottom', doms.bindQrcodeBtn.getClientRects()[0]),
inviteQrcodeBtn: caculateCirclePosition('right', doms.inviteQrcodeBtn.getClientRects()[0]),
},
},
});
break;
case 'class':
doms.addClassBtn.style.position = 'relative';
doms.addClassBtn.style.zIndex = 105;
doms.menuBtn.style.position = 'relative';
doms.menuBtn.style.zIndex = 105;
doms.firstClassBtn.style.position = 'relative';
doms.firstClassBtn.style.zIndex = 105;
doms.firstClassBtn.style.backgroundColor = '#fff';
yield put({
type: 'updateState',
payload: {
position: {
addClassBtn: caculateCirclePosition('bottom', doms.addClassBtn.getClientRects()[0]),
menuBtn: caculateCirclePosition('right', doms.menuBtn.getClientRects()[0]),
firstClassBtn: caculateCirclePosition('right', doms.firstClassBtn.getClientRects()[0]),
},
},
});
break;
case 'classdetailtab2':
doms.addClassStudentbtn.style.position = 'relative';
doms.addClassStudentbtn.style.zIndex = 105;
doms.menuBtn.style.position = 'relative';
doms.menuBtn.style.zIndex = 105;
yield put({
type: 'updateState',
payload: {
position: {
addClassStudentbtn: caculateCirclePosition('top', doms.addClassStudentbtn.getClientRects()[0]),
menuBtn: caculateCirclePosition('right', doms.menuBtn.getClientRects()[0]),
},
},
});
break;
case 'classdetailtab1':
doms.plancoursebtn.style.position = 'relative';
doms.plancoursebtn.style.zIndex = 105;
doms.menuBtn.style.position = 'relative';
doms.menuBtn.style.zIndex = 105;
doms.classdetailTab3.style.position = 'relative';
doms.classdetailTab3.style.zIndex = 105;
yield put({
type: 'updateState',
payload: {
position: {
plancoursebtn: caculateCirclePosition('top', doms.plancoursebtn.getClientRects()[0]),
classdetailTab3: caculateCirclePosition('left', doms.classdetailTab3.getClientRects()[0]),
menuBtn: caculateCirclePosition('right', doms.menuBtn.getClientRects()[0]),
},
},
});
break;
case 'indexstatic1':
doms.studentjoinbtn.style.position = 'relative';
doms.studentjoinbtn.style.zIndex = 105;
yield put({
type: 'updateState',
payload: {
position: {
studentjoinbtn: caculateCirclePosition('bottom', doms.studentjoinbtn.getClientRects()[0]),
},
},
});
break;
case 'indexstatic2':
doms.callwarnbtn.style.position = 'relative';
doms.callwarnbtn.style.zIndex = 105;
yield put({
type: 'updateState',
payload: {
position: {
callwarnbtn: caculateCirclePosition('bottom', doms.callwarnbtn.getClientRects()[0]),
},
},
});
break;
case 'indexstatic3':
doms.planwarnbtn.style.position = 'relative';
doms.planwarnbtn.style.zIndex = 105;
yield put({
type: 'updateState',
payload: {
position: {
planwarnbtn: caculateCirclePosition('bottom', doms.planwarnbtn.getClientRects()[0]),
},
},
});
break;
case 'indexstatic4':
doms.birthwarnbtn.style.position = 'relative';
doms.birthwarnbtn.style.zIndex = 105;
yield put({
type: 'updateState',
payload: {
position: {
birthwarnbtn: caculateCirclePosition('bottom', doms.birthwarnbtn.getClientRects()[0]),
},
},
});
break;
case 'indexstatic5':
doms.paywarnbtn.style.position = 'relative';
doms.paywarnbtn.style.zIndex = 105;
yield put({
type: 'updateState',
payload: {
position: {
paywarnbtn: caculateCirclePosition('bottom', doms.paywarnbtn.getClientRects()[0]),
},
},
});
break;
default:
break;
}
},
},
reducers: {
save(state, action) {
const newState = state;
newState.count += action.payload;
return { ...state, ...newState };
},
updateState(state, { payload }) {
return {
...state,
...payload,
};
},
},
};
......@@ -12,6 +12,7 @@ import {
import * as usersettingajax from '../services/usersetting';
import * as commonAjax from '../services/common';
import * as register from '../services/register';
import * as newregister from '../services/newregister';
import errorcode from '../common/errorcode';
export default {
namespace: 'usersetting',
......@@ -68,9 +69,9 @@ export default {
}
},
* getverifycode({ payload }, { call, put, select }) {
const { countdown, counting, gettingVerifyCoding } = yield select(state => state.register);
const { countdown, counting, gettingVerifyCoding } = yield select(state => state.newregister);
const { timer } = yield select(state => state.usersetting);
const { mobile, type } = payload;
const { mobile, sms_type } = payload;
let newCountdowm = countdown;
let newCounting = counting;
yield put({
......@@ -81,8 +82,8 @@ export default {
},
});
const verifycodehide = message.loading('正在获取验证码....', 0);
const data = yield call(register.getVerifyCode, { mobile, type });
if (!data.code) {
const data = yield call(newregister.getVerifyCode, { mobile, sms_type });
if (data.code === 200) {
setTimeout(verifycodehide);
message.success('验证码获取成功', 1);
yield put({
......@@ -124,11 +125,16 @@ export default {
countdown: 60,
},
});
message.error(errorcode[data.code] && errorcode[data.code].cn, 1);
message.error(data.msg, 1);
}
},
* resetpsd({ payload }, { call, put, select }) {
const { values, callBack } = payload;
const {
mobile,
password,
code,
callBack,
} = payload;
const { resetPsdSubmitting } = yield select(state => state.usersetting);
if (resetPsdSubmitting) {
return;
......@@ -140,16 +146,21 @@ export default {
},
});
const resethide = message.loading('正在重置密码...');
const data = yield call(register.resetPsd, { info: values });
const data = yield call(newregister.forgetPassword, {
mobile,
password,
code,
});
yield put({
type: 'updateState',
payload: {
resetPsdSubmitting: false,
},
});
if (!data.code) {
if (data.code === 200) {
setTimeout(resethide);
message.success('密码重置成功,下次登录请用新的密码登录', 1);
yield delay(200);
yield put({
type: 'updateState',
payload: {
......@@ -167,7 +178,7 @@ export default {
}
} else {
setTimeout(resethide);
message.error(errorcode[data.code].cn, 1);
message.error(data.msg, 1);
}
},
* updateNickname({ payload }, { call, put, select }) {
......
......@@ -36,6 +36,8 @@ export default {
role: LocalStorage.getItem('role') || '',
isDepartment: false,
globalErrorType: -1, // 1: 401token失效 2 40200无权限 3 40201账号已关闭
guideShow: true, // 引导是否开启
guideStep: 1, // 引导步骤
},
subscriptions: {
setup({ dispatch, history }) {
......@@ -942,6 +944,15 @@ export default {
},
});
}
const deploySchoolMath = pathToRegexp('/deploySchool/:id').exec(pathname);
if (deploySchoolMath) {
dispatch({
type: 'deployschool/queryinfo',
payload: {
id: deploySchoolMath[1],
},
});
}
});
},
},
......
......@@ -53,7 +53,7 @@ class SjdIndex extends React.Component {
}
render() {
const {
collapsed, locationPathname, screenIsBig, globalErrorType,
collapsed, locationPathname, screenIsBig, globalErrorType, guideShow, guideStep,
} = this.props;
let contentMarginLeft = 0;
let paddingRight = 20;
......@@ -169,6 +169,9 @@ class SjdIndex extends React.Component {
const role = LocalStorage.getItem('role');
const rootMap = LocalStorage.getItem('rootMap');
const sid = LocalStorage.getItem('sid');
console.log(rootMap, 'rootMap');
console.log(role, 'role');
console.log(sid, 'sid');
let userUserful = true;
if (!user || !user.token || (new Date()).getTime() > user.expiresDateTime * 1000) {
userUserful = false;
......@@ -194,7 +197,7 @@ SjdIndex.propTypes = {
};
function mapStateToProps(state) {
const {
collapsed, userInfo, showExpired, menuDrawerShow, screenIsBig, globalErrorType, locationPathname,
collapsed, userInfo, showExpired, menuDrawerShow, screenIsBig, globalErrorType, locationPathname, guideShow, guideStep,
} = state.webapp;
return {
collapsed,
......@@ -203,6 +206,8 @@ function mapStateToProps(state) {
screenIsBig,
globalErrorType, // : -1, // 1: 401token失效 2 40200无权限 3 40201账号已关闭
locationPathname,
guideShow,
guideStep,
};
}
export default connect(mapStateToProps)(SjdIndex);
This diff is collapsed.
......@@ -14,8 +14,42 @@ const { TextArea } = Input;
class ClassMgtForm extends React.Component {
componentDidMount() { // 挂载
pageIn('班级管理');
// 初始化地图函数 自定义函数名init
// 定义map变量 调用 qq.maps.Map() 构造函数 获取地图显示容器
// const { dispatch } = this.props;
// const addClassBtn = document.getElementById('class_addClass');
// console.log(document.getElementById('class_0'), 'dsadadas');
// if (addClassBtn) {
// dispatch({
// type: 'userguide/getposition',
// payload: {
// page: 'class',
// doms: {
// addClassBtn,
// menuBtn: document.getElementById('menu_3'),
// firstClassBtn: document.getElementById('class_0'),
// },
// },
// });
// }
}
componentWillReceiveProps() {
const { guideStep, dispatch } = this.props;
setTimeout(() => {
const addClassBtn = document.getElementById('class_addClass');
const firstClassBtn = document.getElementById('class_0');
if (addClassBtn && firstClassBtn && guideStep == 4) {
dispatch({
type: 'userguide/getposition',
payload: {
page: 'class',
doms: {
addClassBtn,
menuBtn: document.getElementById('menu_3'),
firstClassBtn,
},
},
});
}
}, 500);
}
componentWillUnmount() { // 卸载
}
......@@ -30,7 +64,10 @@ class ClassMgtForm extends React.Component {
});
}
addClass = () => {
const { dispatch } = this.props;
const { dispatch, guideShow } = this.props;
if (guideShow) {
return;
}
dispatch({
type: 'classmgt/updateState',
payload: {
......@@ -337,7 +374,10 @@ class ClassMgtForm extends React.Component {
});
}
goClassDetail = (classInfo, type) => {
const { dispatch } = this.props;
const { dispatch, guideShow } = this.props;
if (guideShow) {
return;
}
dispatch({
type: 'classmgt/goClassDetail',
payload: {
......@@ -509,7 +549,7 @@ class ClassMgtForm extends React.Component {
key: 'title',
render: (text, record, index) => {
return (
<div className={pageStyle.classNamebox} onClick={() => this.goClassDetail(record, 2)}>
<div id={`class_${index}`} className={pageStyle.classNamebox} onClick={() => this.goClassDetail(record, 2)}>
{record.title}
</div>
);
......@@ -609,7 +649,7 @@ class ClassMgtForm extends React.Component {
return (
<div className={pageStyle.container}>
<div className={pageStyle.headerbox}>
{hasBtnPower('sjd/classmgt', 'addClass') && <Button icon="plus" className={pageStyle.headerbtn} type="primary" onClick={this.addClass}>添加班级</Button>}
{hasBtnPower('sjd/classmgt', 'addClass') && <Button icon="plus" id="class_addClass" className={pageStyle.headerbtn} type="primary" onClick={this.addClass}>添加班级</Button>}
<Button className={pageStyle.headerbtn} onClick={this.wxSwitch} >微信推送设置</Button>
{hasBtnPower('sjd/classmgt', 'allWindingUp') && <Button className={pageStyle.headerbtn} onClick={this.operateClassStatus}>批量结业</Button>}
<Button icon="download" className={pageStyle.headerbtn} onClick={() => this.exportExcel(columns)} >导出</Button>
......@@ -795,6 +835,12 @@ function mapStateToProps(state) {
wxConfig,
wxTimeKey,
} = state.classmgt;
const {
guideStep,
} = state.userguide;
const {
guideShow,
} = state.userguide;
return {
classList,
editClassModalShow,
......@@ -824,6 +870,8 @@ function mapStateToProps(state) {
wxSubmitting,
wxConfig,
wxTimeKey,
guideStep,
guideShow,
};
}
export default connect(mapStateToProps)(ClassMgt);
......
......@@ -49,6 +49,7 @@
word-break: break-all;
color: #1890FF;
cursor: pointer;
// background-color: #fff;
}
.tableoperatebox {
min-width: 160px;
......
......@@ -15,11 +15,28 @@ class ClassMgtForm extends React.Component {
pageIn('课程管理');
// 初始化地图函数 自定义函数名init
// 定义map变量 调用 qq.maps.Map() 构造函数 获取地图显示容器
const { dispatch } = this.props;
const addCourseBtn = document.getElementById('course_addcourse');
if (addCourseBtn) {
dispatch({
type: 'userguide/getposition',
payload: {
page: 'course',
doms: {
addCourseBtn,
menuBtn: document.getElementById('menu_6'),
},
},
});
}
}
componentWillUnmount() { // 卸载
}
setModalVisible(modalVisible) {
const { dispatch, form } = this.props;
const { dispatch, form, guideShow } = this.props;
if (guideShow) {
return;
}
if (modalVisible) {
this.state.isEdit = false;
} else {
......@@ -254,7 +271,7 @@ class ClassMgtForm extends React.Component {
return (
<div className={pageStyle.container}>
<div className={pageStyle.headerbox}>
{hasBtnPower('sjd/course', 'addCourse') && <Button icon="plus" className={pageStyle.headerbtn} onClick={() => this.setModalVisible(true)} type="primary">新增课程</Button>}
{hasBtnPower('sjd/course', 'addCourse') && <Button icon="plus" className={pageStyle.headerbtn} id="course_addcourse" onClick={() => this.setModalVisible(true)} type="primary">新增课程</Button>}
</div>
<div className={pageStyle.tablebox}>
<Table
......@@ -446,6 +463,9 @@ function mapStateToProps(state) {
courseSubmiting,
colorList,
} = state.course;
const {
guideShow,
} = state.userguide;
return {
coursesinfo,
courseid,
......@@ -454,6 +474,7 @@ function mapStateToProps(state) {
editCourseInfo,
courseSubmiting,
colorList,
guideShow,
};
}
export default connect(mapStateToProps)(ClassMgt);
......
This diff is collapsed.
@import '../../less/variables.less';
.header {
height: 64px;
padding-left: 34px;
background-color: #fff;
display: flex;
align-items: center;
}
.headerlogo {
height: 40px;
display: block;
}
.content {
text-align: center;
margin-top: 20px;
&>h3 {
font-size:20px;
font-family:PingFang SC;
font-weight:bold;
color:rgba(0,0,0,1);
}
&>h2 {
font-size:26px;
font-family:PingFang SC;
font-weight:bold;
color:rgba(0,0,0,1);
margin-top: 100px;
}
&>p {
font-size:22px;
color:#636363;
font-weight: 400;
}
}
.typeList {
display: flex;
align-items: center;
justify-content: center;
margin-top: 70px;
.typeItem {
.typeImg {
width: 115px;
height: 115px;
position: relative;
margin-right: 30px;
cursor: pointer;
.img {
width: 115px;
height: 115px;
box-shadow:0px 0px 10px 0px rgba(0, 0, 0, 0.08);
border-radius: 50%;
}
.imgBg {
position: absolute;
width: 108px;
height: 108px;
border-radius: 50%;
top: 4px;
left: 4px;
background-color: rgba(0,0,0,0.15);
}
.checkImg {
width: 34px;
height: 34px;
position: absolute;
bottom: 0;
right: 0;
}
}
.typeSize {
font-size:16px;
font-family:PingFang SC;
font-weight:bold;
color:rgba(33,33,33,1);
margin-top: 10px;
}
}
}
.createBtn {
height: 60px;
line-height: 60px;
font-size: 16px;
color: #fff;
margin-top: 130px;
width: 390px;
}
.modalWrap {
text-align: center;
&>h3 {
font-size:26px;
font-family:PingFang SC;
font-weight:bold;
color:rgba(0,0,0,1);
}
&>p {
font-size:22px;
font-family:PingFang SC;
font-weight:400;
color: #636363;
}
.stepBox {
width: 700px;
margin: 0 auto;
.stepWrap {
display: flex;
align-items: center;
margin-top: 70px;
.stepLeft {
font-size:20px;
font-family:PingFang SC;
font-weight:bold;
color:rgba(85,85,85,1);
margin-right: 70px;
}
.stepRight {
.lineBox {
display: flex;
align-items: center;
}
.circle {
width: 23px;
height: 23px;
border-radius: 50%;
border: 6px solid #DCDCDC;
&>img {
display: none;
}
}
.checkedcircle {
width: 23px;
height: 23px;
border-radius: 50%;
&>img {
width: 23px;
height: 23px;
}
}
.line {
width: 92px;
height:4px;
background:rgba(220,220,220,1);
}
.lineTitleWrap {
display: flex;
align-items: center;
margin-left: -15px;
.lineTitle {
font-size:18px;
font-weight:500;
color:#D2D2D2;
line-height:30px;
padding-right: 40px;
margin-top: 17px;
}
.lineTitleActive {
font-size:18px;
font-weight:500;
color:#4C4C4C;
line-height:30px;
padding-right: 40px;
margin-top: 17px;
}
}
}
.stepRight1 {
.lineBox {
display: flex;
align-items: center;
}
.circle {
width: 23px;
height: 23px;
border-radius: 50%;
border: 6px solid #DCDCDC;
&>img {
display: none;
}
}
.checkedcircle {
width: 23px;
height: 23px;
border-radius: 50%;
&>img {
width: 23px;
height: 23px;
}
}
.line {
width: 130px;
height:4px;
background:rgba(220,220,220,1);
}
.lineTitleWrap {
display: flex;
align-items: center;
margin-left: -20px;
.lineTitle {
font-size:18px;
font-weight:500;
color:#D2D2D2;
line-height:30px;
padding-right: 40px;
margin-top: 17px;
}
.lineTitleActive {
font-size:18px;
font-weight:500;
color:#4C4C4C;
line-height:30px;
padding-right: 40px;
margin-top: 17px;
}
.lineTitle:not(:last-child),.lineTitleActive:not(:last-child) {
padding-right: 78px;
}
}
}
.line {
position: relative;
.innerBlueLine {
width: 0%;
height: 5px;
position: absolute;
left: 0;
bottom: 0;
z-index: 1;
background: #21BCFF;
}
.innerBlueShow {
width: 0%;
height: 5px;
position: absolute;
left: 0;
bottom: 0;
z-index: 1;
background: #21BCFF;
animation: innerBlueShow .5s forwards;
}
}
}
}
}
@keyframes innerBlueShow{
0% {
width: 0%;
}
30% {
width: 0%;
}
100% {
width: 100%;
}
}
.progress {
position: relative;
width: 630px;
height: 48px;
margin: 40px 0 30px 177px;
background:rgba(255,255,255,1);
border:2px solid rgba(220,220,220,1);
border-radius:24px;
.innerTextWrap {
width: 630px;
font-size:18px;
height: 48px;
font-family:PingFang SC;
font-weight:bold;
color:rgba(0,0,0,1);
text-align: center;
position: relative;
.innerText {
position: absolute;
width: 100%;
height: 100%;
left: 0;
bottom: 0;
z-index: 2;
}
}
}
.innerProgress {
width: 630px;
height: 48px;
background:rgba(255,255,255,1);
border:2px solid rgba(220,220,220,1);
border-radius:24px;
text-align: center;
top:-2px;
left: -1px;
position: absolute;
}
.innerAnimation{
animation: dailogBtnChange 6s linear forwards;
width: 630px;
height: 48px;
background:linear-gradient(90deg,rgba(51,168,255,1),rgba(4,222,254,1));
border-radius:24px;
text-align: center;
line-height: 48px;
font-size:18px;
font-family:PingFang SC;
font-weight:bold;
color:rgba(0,0,0,1);
top:-2px;
left: -1px;
position: absolute;
}
.enterIndex {
width: 630px;
height: 48px;
background:linear-gradient(90deg,rgba(51,168,255,1),rgba(4,222,254,1));
border-radius:24px;
text-align: center;
line-height: 48px;
font-size:18px;
font-family:PingFang SC;
font-weight:bold;
color:#fff;
cursor: pointer;
}
@keyframes dailogBtnChange{
0% {
width: 0px;
}
100% {
width: 630px;
}
}
.skip {
font-size:16px;
font-family:PingFang SC;
font-weight:400;
color:rgba(99,99,99,1);
line-height:48px;
text-align: center;
margin-top: 45px;
cursor: pointer;
}
......@@ -53,6 +53,19 @@ class StaticCenter extends React.Component {
}
componentDidMount() { // 挂载
pageIn('轻校-概况');
const studentjoinbtn = document.getElementById('index_studentjoin');
const { dispatch } = this.props;
if (studentjoinbtn) {
dispatch({
type: 'userguide/getposition',
payload: {
page: 'indexstatic1',
doms: {
studentjoinbtn,
},
},
});
}
}
componentDidUpdate() {
}
......@@ -116,7 +129,10 @@ class StaticCenter extends React.Component {
});
}
goDeadlineStudent = () => {
const { dispatch, renew } = this.props;
const { dispatch, renew, guideShow } = this.props;
if (guideShow) {
return;
}
if (renew.total === 0) {
message.warning('暂无学员课时数过低需要续费喔');
return;
......@@ -126,7 +142,10 @@ class StaticCenter extends React.Component {
});
}
goBirthStudent = () => {
const { dispatch, birthday } = this.props;
const { dispatch, birthday, guideShow } = this.props;
if (guideShow) {
return;
}
if (birthday.total === 0) {
message.warning('今天没有学员生日喔');
return;
......@@ -136,7 +155,10 @@ class StaticCenter extends React.Component {
});
}
goCallStudent = () => {
const { dispatch, callData } = this.props;
const { dispatch, callData, guideShow } = this.props;
if (guideShow) {
return;
}
if (callData.total === 0) {
message.warning('当前暂无未点名课次喔');
return;
......@@ -146,13 +168,19 @@ class StaticCenter extends React.Component {
});
}
goPlanClass = () => {
const { dispatch } = this.props;
const { dispatch, guideShow } = this.props;
if (guideShow) {
return;
}
dispatch({
type: 'indexstaic/goPlanClass',
});
}
goPlanStudent = () => {
const { dispatch, assign } = this.props;
const { dispatch, assign, guideShow } = this.props;
if (guideShow) {
return;
}
if (assign.total === 0) {
message.warning('当前暂无未分配学员喔');
return;
......@@ -295,7 +323,10 @@ class StaticCenter extends React.Component {
}
// 添加学员方法
setModal1Visible(visible) {
const { dispatch, schoolUserInfo } = this.props;
const { dispatch, schoolUserInfo, guideShow } = this.props;
if (guideShow) {
return;
}
dispatch({
type: 'students/updateState',
payload: {
......@@ -866,7 +897,7 @@ class StaticCenter extends React.Component {
<Row gutter={24}>
<Col xs={{ span: 8, offset: 0 }} sm={{ span: 8, offset: 0 }} md={{ span: 4, offset: 1 }} lg={{ span: 4, offset: 1 }} xl={{ span: 4, offset: 1 }}>
<div className={pageStyle.informItem} onClick={() => this.setModal1Visible(true)}>
<div className={pageStyle.informImg}><img src={`${__IMGCDN__}index/inform_icon1.png`} alt="" />
<div className={pageStyle.informImg} id="index_studentjoin"><img src={`${__IMGCDN__}index/inform_icon1.png`} alt="" />
<Badge className={pageStyle.informNum}>
</Badge>
</div>
......@@ -875,7 +906,7 @@ class StaticCenter extends React.Component {
</Col>
<Col xs={{ span: 8, offset: 0 }} sm={{ span: 8, offset: 0 }} md={{ span: 4, offset: 1 }} lg={{ span: 4, offset: 1 }} xl={{ span: 4, offset: 1 }}>
<div className={pageStyle.informItem} onClick={this.goCallStudent}>
<div className={pageStyle.informImg}><img src={`${__IMGCDN__}index/inform_icon2.png`} alt="" />
<div className={pageStyle.informImg} id="index_callwarn"><img src={`${__IMGCDN__}index/inform_icon2.png`} alt="" />
<Badge className={pageStyle.informNum} overflowCount={999} count={callData.total}>
</Badge>
</div>
......@@ -884,7 +915,7 @@ class StaticCenter extends React.Component {
</Col>
<Col xs={{ span: 8, offset: 0 }} sm={{ span: 8, offset: 0 }} md={{ span: 4, offset: 1 }} lg={{ span: 4, offset: 1 }} xl={{ span: 4, offset: 1 }}>
<div className={pageStyle.informItem} onClick={this.goPlanStudent}>
<div className={pageStyle.informImg}><img src={`${__IMGCDN__}index/inform_icon3.png`} alt="" />
<div className={pageStyle.informImg} id="index_planwarn"><img src={`${__IMGCDN__}index/inform_icon3.png`} alt="" />
<Badge className={pageStyle.informNum} overflowCount={999} count={assign.total}>
</Badge>
</div>
......@@ -893,7 +924,7 @@ class StaticCenter extends React.Component {
</Col>
<Col xs={{ span: 8, offset: 0 }} sm={{ span: 8, offset: 0 }} md={{ span: 4, offset: 1 }} lg={{ span: 4, offset: 1 }} xl={{ span: 4, offset: 1 }}>
<div className={pageStyle.informItem} onClick={this.goBirthStudent}>
<div className={pageStyle.informImg}><img src={`${__IMGCDN__}index/inform_icon4.png`} alt="" />
<div className={pageStyle.informImg} id="index_birthwarn"><img src={`${__IMGCDN__}index/inform_icon4.png`} alt="" />
<Badge className={pageStyle.informNum} overflowCount={999} count={birthday.total}>
</Badge>
</div>
......@@ -902,7 +933,7 @@ class StaticCenter extends React.Component {
</Col>
<Col xs={{ span: 8, offset: 0 }} sm={{ span: 8, offset: 0 }} md={{ span: 4, offset: 0 }} lg={{ span: 4, offset: 0 }} xl={{ span: 4, offset: 0 }}>
<div className={pageStyle.informItem} onClick={this.goDeadlineStudent}>
<div className={pageStyle.informImg}><img src={`${__IMGCDN__}index/inform_icon5.png`} alt="" />
<div className={pageStyle.informImg} id="index_paywarn"><img src={`${__IMGCDN__}index/inform_icon5.png`} alt="" />
<Badge className={pageStyle.informNum} overflowCount={999} count={renew.total}>
</Badge>
</div>
......@@ -1033,6 +1064,9 @@ function mapStateToProps(state) {
const {
schoolUserInfo,
} = state.webapp;
const {
guideShow,
} = state.userguide;
return {
staticcenter,
clockCharts,
......@@ -1078,6 +1112,7 @@ function mapStateToProps(state) {
studentChangeScheduleListTotal,
studentChangeScheduleListQueryParams,
schoolUserInfo,
guideShow,
};
}
export default connect(mapStateToProps)(StaticCenter);
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -45,6 +45,32 @@
.loginbox {
flex: 1;
padding-top: 42px;
:global {
.ant-tabs-bar {
border-bottom: none;
}
.ant-tabs-nav-container {
font-size: 18px;
color: #000;
text-align: center;
}
// .ant-tabs-nav .ant-tabs-tab-active {
// color: #19B5FE;
// font-weight: 400;
// }
.ant-tabs-nav .ant-tabs-tab {
margin: 0 ;
padding: 12px 0;
color: #959595;
&:first-child {
margin-right: 150px;
}
&.ant-tabs-tab-active {
color: #19B5FE;
font-weight: 400;
}
}
}
}
.sjd_logo{
text-align: center;
......@@ -66,7 +92,7 @@
max-width: 400px;
margin-bottom: 20px;
margin: 0 auto;
padding-top: 48px;
padding-top: 10px;
}
.loginformforgot {
color: #22B8FF;
......@@ -81,7 +107,7 @@
color: #22B8FF;
font-size: 14px;
padding-left: 11px;
margin-bottom: 72px;
margin-bottom: 50px;
line-height: 1;
margin-top: 24px;
display: flex;
......@@ -302,4 +328,4 @@
width: 22px;
height: 11px;
cursor: pointer;
}
\ No newline at end of file
}
This diff is collapsed.
This diff is collapsed.
......@@ -31,12 +31,15 @@ class LoginForm extends React.Component {
this.props.form.validateFields((err, values) => {
if (!err) {
const {
location, industry, mobile, organization, password, province, verifycode,
mobile, password, code,
} = values;
console.log(values, 'values');
dispatch({
type: 'resetpsd/resetpsd',
payload: {
info: values,
mobile,
password,
code,
},
});
}
......@@ -59,9 +62,9 @@ class LoginForm extends React.Component {
return;
}
dispatch({
type: 'register/getverifycode',
type: 'newregister/getverifycode',
payload: {
type: 2,
sms_type: 8,
mobile,
dispatch,
},
......@@ -102,7 +105,7 @@ class LoginForm extends React.Component {
}
render() {
const { getFieldDecorator } = this.props.form;
const { counting, countdown } = this.props;
const { counting, countdown, mobile } = this.props;
const { pwdvisible } = this.state;
return (
<div className={`login register ${LoginStyles.logincontainer}`}>
......@@ -151,7 +154,7 @@ class LoginForm extends React.Component {
<Row className={`loginrow ${LoginStyles.verycoderow}`}>
<Col span={16}>
<FormItem>
{getFieldDecorator('verify_code', {
{getFieldDecorator('code', {
rules: [
{ required: true, message: '请输入验证码!' },
{ pattern: /^[0-9]{4}$/, message: '验证码是4位数字验证码' },
......@@ -187,12 +190,15 @@ Login.propTypes = {
};
function mapStateToProps(state) {
const { collapsed } = state.webapp;
const { counting, countdown, gettingVerifyCoding } = state.register;
// eslint-disable-next-line no-empty-pattern
const { mobile } = state.resetpsd;
const { counting, countdown, gettingVerifyCoding } = state.newregister;
return {
collapsed,
counting,
countdown,
gettingVerifyCoding,
mobile,
};
}
export default connect(mapStateToProps)(Login);
......@@ -209,7 +209,7 @@ class SchoolAddForm extends React.Component {
required={false}
key={newIndex}
>
<Input placeholder="请输入联系电话" value={k} onChange={e => this.mobileChange(e, newIndex)} />
<Input maxLength={11} placeholder="请输入联系电话" value={k} onChange={e => this.mobileChange(e, newIndex)} />
{mobile.length > 1 ? (
<Button className={pageStyles.delmobile} type="danger" onClick={() => this.delMobile(newIndex)}>删除</Button>
) : null}
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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