Commit a500adfc authored by sujie@126.com's avatar sujie@126.com

dd

parent 050dce64
{
// 使用 IntelliSense 了解相关属性。
// 悬停以查看现有属性的描述。
// 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "启动程序",
"program": "${workspaceFolder}\\server"
}
]
}
\ No newline at end of file
......@@ -853,10 +853,9 @@ export default {
});
},
* classInviteCode({ payload }, { call, put, select }) {
const { params } = payload;
const { params, type } = payload;
const { sid, schoolUserInfo } = yield select(state => state.webapp);
const { inviteClassInfo } = yield select(state => state.classmgt);
console.log(params, inviteClassInfo, schoolUserInfo);
const saveData = yield call(commonAjax.courseTemplateAdd, {
school_id: sid,
teacher_id: schoolUserInfo.id,
......@@ -879,7 +878,7 @@ export default {
yield put({
type: 'updateState',
payload: {
classInviteqrcodeShow: true,
classInviteqrcodeShow: !!(type == 2),
classInviteqrcodeUrl: qrcodeData.data.url,
},
});
......
......@@ -379,21 +379,26 @@ export default {
},
* createInviteQrcode({ payload }, { call, put, select }) {
const { sid } = yield select(state => state.webapp);
const qrcodeData = yield call(commonAjax.generateQrcode, {
scene: `s=${sid}`,
page: 'src/pages/setting/bindmobile',
const scholluuidData = yield call(commonAjax.getschooluuid, {
school_id: sid,
});
if (qrcodeData.code == 200) {
message.success('小程序码生成成功', 1);
yield put({
type: 'updateState',
payload: {
inviteCode: qrcodeData.data.url,
inviteCodeShow: true,
},
if (scholluuidData.code == 200) {
const qrcodeData = yield call(commonAjax.generateQrcode, {
scene: `s=${sid}uuid=${scholluuidData.data}`,
page: 'src/pages/setting/bindmobile',
});
} else {
message.error('小程序码生成失败', 1);
if (qrcodeData.code == 200) {
message.success('小程序码生成成功', 1);
yield put({
type: 'updateState',
payload: {
inviteCode: qrcodeData.data.url,
inviteCodeShow: true,
},
});
} else {
message.error('小程序码生成失败', 1);
}
}
},
},
......
import { connect } from 'dva';
import React from 'react';
import PropTypes from 'prop-types';
import { message, Row, Col, Input, Select, Modal, Form, Radio, InputNumber } from 'antd';
import { message, Row, Col, Input, Select, Modal, Form, Radio, InputNumber, Button } from 'antd';
import ClipboardJS from 'clipboard';
import pageStyle from './classrRgistration.less';
import { pageIn, imagify } from '../../utils/index';
......@@ -38,8 +38,8 @@ class ClassrRgistration extends React.Component {
}
save = () => {
const { save } = this.props;
const { parmas } = this.state;
save(parmas);
const { parmas, type } = this.state;
save(parmas, type);
}
close = () => {
const { close } = this.props;
......@@ -54,8 +54,8 @@ class ClassrRgistration extends React.Component {
type: e.target.value,
parmas: {
mode_type: 1,
buy: 0,
give: 0,
buy: 1,
give: 1,
},
});
}
......@@ -125,6 +125,7 @@ class ClassrRgistration extends React.Component {
confirmLoading={classSubmitting}
maskClosable={false}
zIndex={110}
footer={<div className={pageStyle.modalfooter}><Button key="submit" type="primary" onClick={this.save}>生成报名码</Button></div>}
>
<div className={pageStyle.tipsBox}>
<div className={pageStyle.tipsIcon}></div>
......@@ -145,6 +146,22 @@ class ClassrRgistration extends React.Component {
<Radio value={2}>批量给学员购买课时/天同时自动邀请进班</Radio>
</Radio.Group>
</div>
{type == 1 &&
<div className={`${pageStyle.codeImgBox} ${pageStyle.innerCodeImgBox}`}>
<div className={pageStyle.title}>
{inviteClassInfo.title}
</div>
<div className={pageStyle.tips}>长按识别进入“轻校通”小程序, 填写信息自己的信息加入班级</div>
<div className={pageStyle.imgBox}>
<img className={pageStyle.qrCodeImage} src={imagify(qrcodeUrl)} alt="" />
</div>
<div className={pageStyle.saveBtn} onClick={this.saveImg}>保存邀请码图片至桌面</div>
<div className={pageStyle.footer}>
<div className={pageStyle.text} id="copy">各位同学家长,为了更好地服务于大家请点开图片长按识别填写自己的信息,加入班级;</div>
<div className={pageStyle.copyBtn} data-clipboard-target="#copy" id="btnCopyLink">复制文字</div>
</div>
</div>
}
{type == 2 &&
<div className={pageStyle.fromBox}>
<div className={pageStyle.fromTitle}>收费模式</div>
......
......@@ -150,4 +150,19 @@
cursor: pointer;
}
}
}
.innerCodeImgBox{
position: relative;
left: 0;
top: 0;
margin-left: 0;
border-radius:4px;
border:1px solid rgba(0,0,0,0.15);
box-shadow:0px 0px 0px 0px rgba(0,0,0,0);
margin: 0 auto;
margin-top: 22px;
}
.modalfooter{
display: flex;
justify-content: center;
}
\ No newline at end of file
......@@ -388,13 +388,14 @@ class ClassMgtForm extends React.Component {
},
});
}
classrRgistrationSave = (params) => {
classrRgistrationSave = (params, type) => {
//
const { dispatch } = this.props;
dispatch({
type: 'classmgt/classInviteCode',
payload: {
params,
type,
},
});
}
......
......@@ -687,6 +687,7 @@ class StudentMgt extends React.Component {
{hasBtnPower('sjd/student', 'enrolCode') && <Button className={pageStyle.headerbtn} onClick={this.toSetSelfJoin}>自助报名二维码</Button>}
{hasBtnPower('sjd/student', 'bundlingCode') && <Button id={pageStyle.headerself} className={pageStyle.headerbtn} onClick={this.bindQrcodeShow}>自助绑定二维码</Button>}
{hasBtnPower('sjd/student', 'bundlingCode') && <Button id={pageStyle.headerself} loading={Inviteloading} className={pageStyle.headerbtn} onClick={() => this.inviteCodeDialogVisible(true)}>快捷邀请学员</Button>}
<Button icon="download" className={pageStyle.downloadbtn} onClick={() => this.exportExcel(columns)} >导出</Button>
</div>
<div className={pageStyle.search}>
<div className={pageStyle.title}>
......@@ -775,7 +776,6 @@ class StudentMgt extends React.Component {
<Col className={pageStyle.searchbtnbox} xs={{ span: 12 }} sm={{ span: 12 }} md={{ span: 12 }} lg={{ span: 6 }}>
<Button className={pageStyle.resetbtn} onClick={this.reset}>重置</Button>
<Button className={pageStyle.searchbtn} type="primary" onClick={this.search}>搜索</Button>
<Button icon="download" className={pageStyle.downloadbtn} onClick={() => this.exportExcel(columns)} >导出</Button>
</Col>
</Row>
</div>
......
......@@ -179,7 +179,7 @@
}
.downloadbtn{
margin-left: 15px;
//margin-left: 15px;
}
@media (max-width: 988px) {
.searchbtnbox {
......
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