Commit 98b6952a authored by baixian's avatar baixian

微官网

parents 82702b22 6778646d
......@@ -18,5 +18,5 @@
</head>
<body>
<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>
\ No newline at end of file
......@@ -314,7 +314,7 @@ export default {
join_count: 0,
tags: [],
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 = {
......@@ -329,7 +329,7 @@ export default {
join_count: 0,
tags: [],
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 {
});
}
},
* 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 }) {
const { sid, locationQuery } = yield select(state => state.webapp);
const { auth_code } = locationQuery;
......@@ -101,7 +135,8 @@ export default {
wxInfo: {
title: data.data.title,
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 {
wechat_status: '',
assign_class_status: '',
schedule_id: '',
extra: 'time,recently_course,leaves_count ',
extra: 'time,recently_course,leaves_count,integral_count',
birthday_start: '',
birthday_end: '',
status: 1,
......@@ -96,7 +96,7 @@ export default {
wechat_status: '',
assign_class_status: '',
schedule_id: '',
extra: 'time,recently_course,leaves_count ',
extra: 'time,recently_course,leaves_count,integral_count',
birthday_start: '',
birthday_end: '',
},
......@@ -254,7 +254,7 @@ export default {
wechat_status: '',
assign_class_status: '',
schedule_id: '',
extra: 'time,recently_course,leaves_count ',
extra: 'time,recently_course,leaves_count, integral_count',
birthday_start: '',
birthday_end: '',
birthday_day: '',
......@@ -282,7 +282,7 @@ export default {
wechat_status: '',
assign_class_status: '',
schedule_id: '',
extra: 'time,recently_course',
extra: 'time,recently_course, integral_count',
birthday_start: '',
birthday_end: '',
}),
......@@ -1193,7 +1193,7 @@ export default {
wechat_status: '',
assign_class_status: '',
schedule_id: '',
extra: 'time,recently_course,leaves_count',
extra: 'time,recently_course,leaves_count, integral_count',
birthday_start: '',
birthday_end: '',
status: 1,
......@@ -1214,7 +1214,7 @@ export default {
wechat_status: '',
assign_class_status: '',
schedule_id: '',
extra: 'time,recently_course,leaves_count',
extra: 'time,recently_course,leaves_count, integral_count',
birthday_start: '',
birthday_end: '',
},
......
......@@ -445,7 +445,7 @@ class Officialweb extends React.Component {
<Popover placement="topRight" title="微信扫码预览" content={qrcodeBox} trigger="click">
<Button className={pageStyle.previewbtnbox} onClick={this.previewOfficialweb}>预览</Button>
</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> */}
</div>
{cropperboxShow && <Cropper
......
......@@ -27,6 +27,12 @@ class PushSetting extends React.Component {
type: 'pushsetting/gobindwx',
});
}
refreshPushSetting = () => {
const { dispatch } = this.props;
dispatch({
type: 'pushsetting/refreshPushSetting',
});
}
render() {
const {
isEmpty,
......@@ -34,6 +40,7 @@ class PushSetting extends React.Component {
sid,
hasPushAuth,
} = this.props;
console.log(wxInfo, 'wxInfo');
const data = [
{
title: 'Ant Design Title 1',
......@@ -48,12 +55,16 @@ class PushSetting extends React.Component {
renderItem={item => (
<List.Item>
<List.Item.Meta
avatar={<Avatar src={imagify(item.head_img)} />}
avatar={<Avatar src={imagify(item.logo)} />}
title={<span>{item.title}</span>}
description={
(
<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>
)}
......
......@@ -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() {
const { getFieldDecorator } = this.props.form;
const {
......@@ -810,7 +825,7 @@ class StudentMgt extends React.Component {
dataIndex: 'name',
key: 'name',
fixed: 'left',
width: 110,
width: 150,
render: (text, record) => {
return (
<div>
......@@ -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: '年龄',
dataIndex: 'birthday',
......@@ -874,7 +905,7 @@ class StudentMgt extends React.Component {
title: '购买总课时',
dataIndex: 'totoalbuy',
key: 'totoalbuy',
width: 110,
width: 120,
render: (text, record) => {
return (
<div>{Number(record.buy) + Number(record.give)}</div>
......@@ -885,19 +916,19 @@ class StudentMgt extends React.Component {
title: '付费课时',
dataIndex: 'buy',
key: 'buy',
width: 100,
width: 120,
},
{
title: '赠送课时',
dataIndex: 'give',
key: 'give',
width: 100,
width: 120,
},
{
title: '消耗付费课时/赠送课时',
dataIndex: 'expend_buy',
key: 'expend_buy',
width: 200,
width: 220,
render: (text, record) => {
return (
<div>{record.expend_buy} / {record.expend_give}</div>
......@@ -908,7 +939,7 @@ class StudentMgt extends React.Component {
title: '剩余付费课时/赠送课时',
dataIndex: 'expend_give',
key: 'expend_give',
width: 200,
width: 210,
render: (text, record) => {
return (
<div>{record.surplus_buy} / {record.surplus_give}</div>
......@@ -927,17 +958,12 @@ class StudentMgt extends React.Component {
key: 'leaves_count',
width: 100,
},
{
title: '',
dataIndex: 'empty',
key: 'empty',
},
{
title: '操作',
dataIndex: 'c',
key: 'c',
fixed: 'right',
width: 230,
width: 300,
render: (text, record, index) => {
return (
<div className={pageStyle.tableoperatebox}>
......@@ -1150,6 +1176,7 @@ class StudentMgt extends React.Component {
rowKey="id"
bordered
footer={null}
onChange={this.handleChangeTable}
/>
<div className={pageStyle.tablefooterbox}>
<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