Commit a61240e7 by yanglang123

修改bug

parent 8af1899f
No preview for this file type
...@@ -272,7 +272,7 @@ class Banner extends Component { ...@@ -272,7 +272,7 @@ class Banner extends Component {
componentWillReceiveProps(nextProps) { componentWillReceiveProps(nextProps) {
if (this.props != nextProps) { if (this.props != nextProps) {
let { ListBanner = [] } = this.props; let { ListBanner = [] } = this.props;
ListBanner.splice(6); ListBanner.splice(10);
ListBanner = ListBanner.map((itme, index) => ListBanner = ListBanner.map((itme, index) =>
Object.assign(itme, { index }) Object.assign(itme, { index })
); );
...@@ -348,13 +348,11 @@ class Banner extends Component { ...@@ -348,13 +348,11 @@ class Banner extends Component {
render() { render() {
const { switchState, inputNum, pcAccessId } = this.state; const { switchState, inputNum, pcAccessId } = this.state;
let { ListBanner = [] } = this.props; let { ListBanner = [] } = this.props;
console.log("ListBanner", ListBanner); ListBanner.splice(10);
ListBanner.splice(6);
ListBanner = ListBanner.map((itme, index) => ListBanner = ListBanner.map((itme, index) =>
Object.assign(itme, { index }) Object.assign(itme, { index })
); );
let { records = [], total = 20, current = 1 } = this.props.existList; let { records = [], total = 20, current = 1 } = this.props.existList;
console.log(ListBanner, "@@@");
records = records.map((itme, index) => Object.assign(itme, { index })); records = records.map((itme, index) => Object.assign(itme, { index }));
const ids = ListBanner.map(item => item.id); const ids = ListBanner.map(item => item.id);
......
...@@ -764,6 +764,7 @@ class NewTP extends Component { ...@@ -764,6 +764,7 @@ class NewTP extends Component {
} }
// 二维码导出 // 二维码导出
qdcode(record) { qdcode(record) {
console.log(record, "111111111");
const param = { const param = {
// 项目id // 项目id
id: record.id, id: record.id,
...@@ -815,6 +816,7 @@ class NewTP extends Component { ...@@ -815,6 +816,7 @@ class NewTP extends Component {
// }; // };
// 下载二维码 // 下载二维码
downqcode() { downqcode() {
console.log("22222");
const saveAs = require("../../../common/FileSaver.js"); const saveAs = require("../../../common/FileSaver.js");
const { qcodelist } = this.props; const { qcodelist } = this.props;
var zip = new JSZip(); var zip = new JSZip();
...@@ -825,49 +827,6 @@ class NewTP extends Component { ...@@ -825,49 +827,6 @@ class NewTP extends Component {
for (let i = 0; i < qcodelist.length; i++) { for (let i = 0; i < qcodelist.length; i++) {
if (qcodelist[i].info.signTimeId.enablePosition == "1") { if (qcodelist[i].info.signTimeId.enablePosition == "1") {
var canvas1 = document.getElementById(qcodelist[i].signTimeIds);
var context = canvas1.getContext("2d");
var initWidth = canvas1.width;
var initHeight = canvas1.height;
var imageData = context.getImageData(0, 0, initWidth, initHeight);
var canvas2 = document.createElement("canvas");
canvas2.id = qcodelist[i].signTimeIds + new Date().getTime();
var context2 = canvas2.getContext("2d");
var img = document.getElementById("miniCode");
canvas2.width = initWidth;
canvas2.height = initHeight + 60;
context2.drawImage(img, 0, 0, initWidth, initHeight);
// context2.putImageData(imageData,0,0);
// 设置字体
context2.font = "24px bold";
// 设置颜色
context2.fillStyle = "#000";
// 设置水平对齐方式
context2.textAlign = "center";
// 设置垂直对齐方式
context2.textBaseline = "middle";
// 绘制文字(参数:要写的字,x坐标,y坐标)
context2.fillText(
"邀请码:" + qcodelist[i].info.signTimeId.code,
canvas2.width / 2,
initHeight + 30
);
zip.file(
trainName +
"(" +
qcodelist[i].startTime +
"~" +
qcodelist[i].endTime +
")" +
qcodelist[i].info.signTimeId.address +
"_" +
qcodelist[i].info.signTimeId.range +
"米.png",
canvas2.toDataURL("png").substring(22),
{ base64: true }
);
} else {
zip.file( zip.file(
trainName + trainName +
"(" + "(" +
...@@ -1300,9 +1259,7 @@ class NewTP extends Component { ...@@ -1300,9 +1259,7 @@ class NewTP extends Component {
moment(values.time[1]).format("YYYY-MM-DD HH:mm:ss") moment(values.time[1]).format("YYYY-MM-DD HH:mm:ss")
).getTime(), ).getTime(),
// 是否需要审核,付费报名不需要审核 // 是否需要审核,付费报名不需要审核
needAudit: values.needAudit needAudit: values.needAudit ? 1 : 0,
? 1
: 0,
// 报名人数限制 // 报名人数限制
enablePay: 0, enablePay: 0,
personLimitNum: values.personLimitNum ? values.personLimitNum : 0, personLimitNum: values.personLimitNum ? values.personLimitNum : 0,
...@@ -3287,19 +3244,6 @@ class NewTP extends Component { ...@@ -3287,19 +3244,6 @@ class NewTP extends Component {
} }
qclist = newlist.map((d, index) => { qclist = newlist.map((d, index) => {
if (d.enablePosition == "1") { if (d.enablePosition == "1") {
//将小程序从个人版迁成企业版
return (
<QRCode
value={
"https://open.weixin.qq.com/sns/getexpappinfo?appid=wx270fc674b6a906b0&amp;path=pages/invitation/invitation.html&from=singlemessage&isappinstalled=0#wechat-redirect"
}
key={d.signTimeIds}
id={d.signTimeIds}
level="L"
size={num}
/>
);
} else {
return ( return (
<QRCode <QRCode
value={JSON.stringify(d)} value={JSON.stringify(d)}
......
...@@ -20,15 +20,13 @@ class ExamPublish extends Component { ...@@ -20,15 +20,13 @@ class ExamPublish extends Component {
textAlign: "center", textAlign: "center",
}} }}
> >
<div className="publishBlock" style={{ marginBottom: 16 }}> {/* <div className="publishBlock" style={{ marginBottom: 16 }}>
{/*<h5>考试链接:XXXXXXXXXXXXXXXXXXXXXXXXXXX</h5>*/}
<h5>考试二维码:</h5> <h5>考试二维码:</h5>
{/*<img alt="" src="http://img1.gtimg.com/digi/pics/hv1/34/21/1899/123487864.png"/>*/}
<QRCode <QRCode
value={JSON.stringify({ type: "exam", id: this.props.examID })} value={JSON.stringify({ type: "exam", id: this.props.examID })}
size={200} size={200}
/> />
</div> </div> */}
<div className={styles.publishBtn}> <div className={styles.publishBtn}>
<Link <Link
to={ to={
...@@ -52,13 +50,12 @@ class ExamPublish extends Component { ...@@ -52,13 +50,12 @@ class ExamPublish extends Component {
> >
<div className={styles.publishBlock}> <div className={styles.publishBlock}>
<h3>恭喜您,考试发布成功!</h3> <h3>恭喜您,考试发布成功!</h3>
{/*<h5>考试链接:XXXXXXXXXXXXXXXXXXXXXXXXXXX</h5>*/} {/* <h5>考试二维码:</h5>
<h5>考试二维码:</h5>
{/*<img alt="" src="http://img1.gtimg.com/digi/pics/hv1/34/21/1899/123487864.png"/>*/}
<QRCode <QRCode
value={JSON.stringify({ type: "exam", id: this.props.examID })} value={JSON.stringify({ type: "exam", id: this.props.examID })}
size={200} size={200}
/> /> */}
</div> </div>
<div className={styles.publishBtn}> <div className={styles.publishBtn}>
<Link <Link
......
...@@ -1413,11 +1413,11 @@ class ExamStrategy extends Component { ...@@ -1413,11 +1413,11 @@ class ExamStrategy extends Component {
> >
<div className="publishBlock"> <div className="publishBlock">
<h3> 恭喜您,考试发布成功!</h3> <h3> 恭喜您,考试发布成功!</h3>
<h5>考试二维码:</h5> {/* <h5>考试二维码:</h5>
<QRCode <QRCode
value={JSON.stringify({ type: "exam", id: this.props.examID })} value={JSON.stringify({ type: "exam", id: this.props.examID })}
size={200} size={200}
/> /> */}
</div> </div>
</Modal> </Modal>
<Modal <Modal
......
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