Commit 98b6952a authored by baixian's avatar baixian

微官网

parents 82702b22 6778646d
...@@ -18,5 +18,5 @@ ...@@ -18,5 +18,5 @@
</head> </head>
<body> <body>
<div id="root"></div> <div id="root"></div>
<script type="text/javascript" src="/dist/main.98a3f4.js"></script></body> <script type="text/javascript" src="/dist/main.da4348.js"></script></body>
</html> </html>
\ No newline at end of file
...@@ -314,7 +314,7 @@ export default { ...@@ -314,7 +314,7 @@ export default {
join_count: 0, join_count: 0,
tags: [], tags: [],
module_switch: { module_switch: {
adCarousel: true, orgdesc: true, teacher: true, clocklist: true, classmoments: true, onlineclass: true, togetherclock: true, adCarousel: false, orgdesc: false, teacher: false, clocklist: false, classmoments: false, onlineclass: false, togetherclock: false,
}, },
}; };
element.data = { element.data = {
...@@ -329,7 +329,7 @@ export default { ...@@ -329,7 +329,7 @@ export default {
join_count: 0, join_count: 0,
tags: [], tags: [],
module_switch: { module_switch: {
adCarousel: true, orgdesc: true, teacher: true, clocklist: true, classmoments: true, onlineclass: true, togetherclock: true, adCarousel: false, orgdesc: false, teacher: false, clocklist: false, classmoments: false, onlineclass: false, togetherclock: false,
}, },
}; };
} }
......
...@@ -46,6 +46,40 @@ export default { ...@@ -46,6 +46,40 @@ export default {
}); });
} }
}, },
* refreshPushSetting({ payload }, { call, put, select }) {
const { sid } = yield select(state => state.webapp);
const data = yield call(pushSettingAjax.getOfficialAccount, {
school_id: sid,
});
if (data.code == 200) {
yield put({
type: 'updateState',
payload: {
isEmpty: false,
wxInfo: {
title: data.data.title,
created_at: data.data.created_at,
logo: data.data.head_img,
template_config_status: data.data.template_config_status,
},
},
});
} else if (data.code == 40000) {
yield put({
type: 'updateState',
payload: {
isEmpty: true,
},
});
} else {
yield put({
type: 'webapp/errorrequestresolve',
payload: {
data,
},
});
}
},
* queryinfo({ payload }, { call, put, select }) { * queryinfo({ payload }, { call, put, select }) {
const { sid, locationQuery } = yield select(state => state.webapp); const { sid, locationQuery } = yield select(state => state.webapp);
const { auth_code } = locationQuery; const { auth_code } = locationQuery;
...@@ -101,7 +135,8 @@ export default { ...@@ -101,7 +135,8 @@ export default {
wxInfo: { wxInfo: {
title: data.data.title, title: data.data.title,
created_at: data.data.created_at, created_at: data.data.created_at,
logo: '', logo: data.data.head_img,
template_config_status: data.data.template_config_status,
}, },
}, },
}); });
......
...@@ -75,7 +75,7 @@ export default { ...@@ -75,7 +75,7 @@ export default {
wechat_status: '', wechat_status: '',
assign_class_status: '', assign_class_status: '',
schedule_id: '', schedule_id: '',
extra: 'time,recently_course,leaves_count ', extra: 'time,recently_course,leaves_count,integral_count',
birthday_start: '', birthday_start: '',
birthday_end: '', birthday_end: '',
status: 1, status: 1,
...@@ -96,7 +96,7 @@ export default { ...@@ -96,7 +96,7 @@ export default {
wechat_status: '', wechat_status: '',
assign_class_status: '', assign_class_status: '',
schedule_id: '', schedule_id: '',
extra: 'time,recently_course,leaves_count ', extra: 'time,recently_course,leaves_count,integral_count',
birthday_start: '', birthday_start: '',
birthday_end: '', birthday_end: '',
}, },
...@@ -254,7 +254,7 @@ export default { ...@@ -254,7 +254,7 @@ export default {
wechat_status: '', wechat_status: '',
assign_class_status: '', assign_class_status: '',
schedule_id: '', schedule_id: '',
extra: 'time,recently_course,leaves_count ', extra: 'time,recently_course,leaves_count, integral_count',
birthday_start: '', birthday_start: '',
birthday_end: '', birthday_end: '',
birthday_day: '', birthday_day: '',
...@@ -282,7 +282,7 @@ export default { ...@@ -282,7 +282,7 @@ export default {
wechat_status: '', wechat_status: '',
assign_class_status: '', assign_class_status: '',
schedule_id: '', schedule_id: '',
extra: 'time,recently_course', extra: 'time,recently_course, integral_count',
birthday_start: '', birthday_start: '',
birthday_end: '', birthday_end: '',
}), }),
...@@ -1193,7 +1193,7 @@ export default { ...@@ -1193,7 +1193,7 @@ export default {
wechat_status: '', wechat_status: '',
assign_class_status: '', assign_class_status: '',
schedule_id: '', schedule_id: '',
extra: 'time,recently_course,leaves_count', extra: 'time,recently_course,leaves_count, integral_count',
birthday_start: '', birthday_start: '',
birthday_end: '', birthday_end: '',
status: 1, status: 1,
...@@ -1214,7 +1214,7 @@ export default { ...@@ -1214,7 +1214,7 @@ export default {
wechat_status: '', wechat_status: '',
assign_class_status: '', assign_class_status: '',
schedule_id: '', schedule_id: '',
extra: 'time,recently_course,leaves_count', extra: 'time,recently_course,leaves_count, integral_count',
birthday_start: '', birthday_start: '',
birthday_end: '', birthday_end: '',
}, },
......
...@@ -445,7 +445,7 @@ class Officialweb extends React.Component { ...@@ -445,7 +445,7 @@ class Officialweb extends React.Component {
<Popover placement="topRight" title="微信扫码预览" content={qrcodeBox} trigger="click"> <Popover placement="topRight" title="微信扫码预览" content={qrcodeBox} trigger="click">
<Button className={pageStyle.previewbtnbox} onClick={this.previewOfficialweb}>预览</Button> <Button className={pageStyle.previewbtnbox} onClick={this.previewOfficialweb}>预览</Button>
</Popover> </Popover>
<Button type="primary" className={pageStyle.savebtn} onClick={this.goBack}>返回</Button> {/* <Button type="primary" className={pageStyle.savebtn} onClick={this.goBack}>返回</Button> */}
{/* <Button type="primary" className={pageStyle.savebtn} loading={officialwebPostStatus} onClick={this.saveOfficialWeb}>保存</Button> */} {/* <Button type="primary" className={pageStyle.savebtn} loading={officialwebPostStatus} onClick={this.saveOfficialWeb}>保存</Button> */}
</div> </div>
{cropperboxShow && <Cropper {cropperboxShow && <Cropper
......
...@@ -27,6 +27,12 @@ class PushSetting extends React.Component { ...@@ -27,6 +27,12 @@ class PushSetting extends React.Component {
type: 'pushsetting/gobindwx', type: 'pushsetting/gobindwx',
}); });
} }
refreshPushSetting = () => {
const { dispatch } = this.props;
dispatch({
type: 'pushsetting/refreshPushSetting',
});
}
render() { render() {
const { const {
isEmpty, isEmpty,
...@@ -34,6 +40,7 @@ class PushSetting extends React.Component { ...@@ -34,6 +40,7 @@ class PushSetting extends React.Component {
sid, sid,
hasPushAuth, hasPushAuth,
} = this.props; } = this.props;
console.log(wxInfo, 'wxInfo');
const data = [ const data = [
{ {
title: 'Ant Design Title 1', title: 'Ant Design Title 1',
...@@ -48,12 +55,16 @@ class PushSetting extends React.Component { ...@@ -48,12 +55,16 @@ class PushSetting extends React.Component {
renderItem={item => ( renderItem={item => (
<List.Item> <List.Item>
<List.Item.Meta <List.Item.Meta
avatar={<Avatar src={imagify(item.head_img)} />} avatar={<Avatar src={imagify(item.logo)} />}
title={<span>{item.title}</span>} title={<span>{item.title}</span>}
description={ description={
( (
<div> <div>
<div>{`${item.created_at}绑定`}</div> <div>{`${item.created_at}绑定`}</div>
{item.template_config_status == 1 && <div>状态:未配置</div>}
{item.template_config_status == 2 && <div>状态:配置中<span style={{ paddingLeft: '10px' }} className="hreflink" onClick={this.refreshPushSetting}>刷新状态</span></div>}
{item.template_config_status == 3 && <div>状态:配置成功</div>}
{item.template_config_status == 4 && <div>状态:配置失败,请联系轻校客服 </div>}
<div ><span id="linkcopy">{ENVIRONMENT == 'pro' ? `https://h5.qingxiao.online/qxbindpush.html?sid=${sid}` : `https://clock-h5.wp53.cn/qxbindpush.html?sid=${sid}`}</span><span style={{ paddingLeft: '10px' }} className="hreflink" data-clipboard-target="#linkcopy" id="btnCopyLink">复制</span></div> <div ><span id="linkcopy">{ENVIRONMENT == 'pro' ? `https://h5.qingxiao.online/qxbindpush.html?sid=${sid}` : `https://clock-h5.wp53.cn/qxbindpush.html?sid=${sid}`}</span><span style={{ paddingLeft: '10px' }} className="hreflink" data-clipboard-target="#linkcopy" id="btnCopyLink">复制</span></div>
</div> </div>
)} )}
......
...@@ -743,6 +743,21 @@ class StudentMgt extends React.Component { ...@@ -743,6 +743,21 @@ class StudentMgt extends React.Component {
}, },
}); });
} }
handleChangeTable = (pagination, filters, sorter) => {
const { dispatch } = this.props;
if (sorter.columnKey) {
dispatch({
type: 'students/studentsList',
payload: {
params: {
page: 1,
sort_field: sorter.columnKey,
sort_type: sorter.order === 'ascend' ? 'asc' : 'desc',
},
},
});
}
}
render() { render() {
const { getFieldDecorator } = this.props.form; const { getFieldDecorator } = this.props.form;
const { const {
...@@ -810,7 +825,7 @@ class StudentMgt extends React.Component { ...@@ -810,7 +825,7 @@ class StudentMgt extends React.Component {
dataIndex: 'name', dataIndex: 'name',
key: 'name', key: 'name',
fixed: 'left', fixed: 'left',
width: 110, width: 150,
render: (text, record) => { render: (text, record) => {
return ( return (
<div> <div>
...@@ -856,6 +871,22 @@ class StudentMgt extends React.Component { ...@@ -856,6 +871,22 @@ class StudentMgt extends React.Component {
); );
}, },
}, },
{
title: '积分',
dataIndex: 'integral_count',
key: 'integral_count',
sorter: true,
// eslint-disable-next-line no-nested-ternary
sortOrder: studentListQueryParams.sort_field == 'integral_count' ? (studentListQueryParams.sort_type == 'desc' ? 'descend' : 'ascend') : '',
sortDirections: ['descend', 'ascend'],
width: 150,
render: (text, record) => {
return (
<div>
{text || 0}
</div>);
},
},
{ {
title: '年龄', title: '年龄',
dataIndex: 'birthday', dataIndex: 'birthday',
...@@ -874,7 +905,7 @@ class StudentMgt extends React.Component { ...@@ -874,7 +905,7 @@ class StudentMgt extends React.Component {
title: '购买总课时', title: '购买总课时',
dataIndex: 'totoalbuy', dataIndex: 'totoalbuy',
key: 'totoalbuy', key: 'totoalbuy',
width: 110, width: 120,
render: (text, record) => { render: (text, record) => {
return ( return (
<div>{Number(record.buy) + Number(record.give)}</div> <div>{Number(record.buy) + Number(record.give)}</div>
...@@ -885,19 +916,19 @@ class StudentMgt extends React.Component { ...@@ -885,19 +916,19 @@ class StudentMgt extends React.Component {
title: '付费课时', title: '付费课时',
dataIndex: 'buy', dataIndex: 'buy',
key: 'buy', key: 'buy',
width: 100, width: 120,
}, },
{ {
title: '赠送课时', title: '赠送课时',
dataIndex: 'give', dataIndex: 'give',
key: 'give', key: 'give',
width: 100, width: 120,
}, },
{ {
title: '消耗付费课时/赠送课时', title: '消耗付费课时/赠送课时',
dataIndex: 'expend_buy', dataIndex: 'expend_buy',
key: 'expend_buy', key: 'expend_buy',
width: 200, width: 220,
render: (text, record) => { render: (text, record) => {
return ( return (
<div>{record.expend_buy} / {record.expend_give}</div> <div>{record.expend_buy} / {record.expend_give}</div>
...@@ -908,7 +939,7 @@ class StudentMgt extends React.Component { ...@@ -908,7 +939,7 @@ class StudentMgt extends React.Component {
title: '剩余付费课时/赠送课时', title: '剩余付费课时/赠送课时',
dataIndex: 'expend_give', dataIndex: 'expend_give',
key: 'expend_give', key: 'expend_give',
width: 200, width: 210,
render: (text, record) => { render: (text, record) => {
return ( return (
<div>{record.surplus_buy} / {record.surplus_give}</div> <div>{record.surplus_buy} / {record.surplus_give}</div>
...@@ -927,17 +958,12 @@ class StudentMgt extends React.Component { ...@@ -927,17 +958,12 @@ class StudentMgt extends React.Component {
key: 'leaves_count', key: 'leaves_count',
width: 100, width: 100,
}, },
{
title: '',
dataIndex: 'empty',
key: 'empty',
},
{ {
title: '操作', title: '操作',
dataIndex: 'c', dataIndex: 'c',
key: 'c', key: 'c',
fixed: 'right', fixed: 'right',
width: 230, width: 300,
render: (text, record, index) => { render: (text, record, index) => {
return ( return (
<div className={pageStyle.tableoperatebox}> <div className={pageStyle.tableoperatebox}>
...@@ -1150,6 +1176,7 @@ class StudentMgt extends React.Component { ...@@ -1150,6 +1176,7 @@ class StudentMgt extends React.Component {
rowKey="id" rowKey="id"
bordered bordered
footer={null} footer={null}
onChange={this.handleChangeTable}
/> />
<div className={pageStyle.tablefooterbox}> <div className={pageStyle.tablefooterbox}>
<span className={pageStyle.tablefooterstatic}>共{studentListTotal}条数据</span> <span className={pageStyle.tablefooterstatic}>共{studentListTotal}条数据</span>
......
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