Commit 3a078ebd authored by wangxuelai's avatar wangxuelai

Merge remote-tracking branch 'origin/sj-dev-v1' into draw-develop

parents 389e6e2c 1e2bd113
......@@ -838,7 +838,7 @@ export default {
const webapp = yield select(state => state.webapp);
const { userInfo } = webapp;
const isexpire = isOnline((userInfo && userInfo.expiresDateTime) || 0);
if (isexpire) {
if (!isexpire) {
window.location.href = `${location.protocol}//${location.hostname}${location.port == '' ? '' : `:${location.port}`}${location.pathname}#/erp/schoollist`;
}
},
......
......@@ -54,8 +54,8 @@ class ClassrRgistration extends React.Component {
type: e.target.value,
parmas: {
mode_type: 1,
buy: 1,
give: 1,
buy: 0,
give: 0,
},
});
}
......@@ -156,9 +156,11 @@ class ClassrRgistration extends React.Component {
</div>
<div className={pageStyle.tips}>长按识别进入“轻校通”小程序, 填写信息自己的信息加入班级</div>
<div className={pageStyle.imgBox}>
<img className={pageStyle.qrCodeImage} src={imagify(qrcodeUrl2)} alt="" />
{ qrcodeUrl2 ? <img className={pageStyle.qrCodeImage} src={imagify(qrcodeUrl2)} alt="" /> :
<div className={pageStyle.noimgBox}></div>
}
</div>
<div className={pageStyle.saveBtn} onClick={this.saveImg}>保存邀请码图片至桌面</div>
{qrcodeUrl2 && <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>
......@@ -177,12 +179,12 @@ class ClassrRgistration extends React.Component {
</div>
{parmas.mode_type != 3 &&
<div className={pageStyle.fromItem}>
<span className={pageStyle.fromItemspan}>购买: &nbsp;&nbsp;</span><InputNumber min={1} max={9999} value={parmas.buy} onChange={this.onBuyChange} /><span>&nbsp;&nbsp;{parmas.mode_type == 1 ? '课时' : '天'}</span>
<span className={pageStyle.fromItemspan}>购买: &nbsp;&nbsp;</span><InputNumber min={0} max={9999} value={parmas.buy} onChange={this.onBuyChange} /><span>&nbsp;&nbsp;{parmas.mode_type == 1 ? '课时' : '天'}</span>
</div>
}
{parmas.mode_type != 3 &&
<div className={pageStyle.fromItem}>
<span className={pageStyle.fromItemspan}>赠送: &nbsp;&nbsp;</span><InputNumber min={1} max={9999} value={parmas.give} onChange={this.onGiveChange} /><span>&nbsp;&nbsp;{parmas.mode_type == 1 ? '课时' : '天'}</span>
<span className={pageStyle.fromItemspan}>赠送: &nbsp;&nbsp;</span><InputNumber min={0} max={9999} value={parmas.give} onChange={this.onGiveChange} /><span>&nbsp;&nbsp;{parmas.mode_type == 1 ? '课时' : '天'}</span>
</div>
}
</div>
......
......@@ -165,4 +165,12 @@
.modalfooter{
display: flex;
justify-content: center;
}
.noimgBox{
width:218px;
height:218px;
background:rgba(231,231,231,1);
border-radius:109px;
margin: 0 auto;
margin-top: 10px;
}
\ No newline at end of file
......@@ -128,7 +128,7 @@ export function translateType(type) {
}
function isOnline(expiredate) {
const nowTime = Math.floor(Date.now() / 1000);
if (expiredate > nowTime) {
if (expiredate > nowTime || expiredate == 0) {
return true;
}
return false;
......
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