Commit 96770aee by FE

pull

parent 42fa021b
...@@ -53,7 +53,7 @@ class FollowQRcode extends Component { ...@@ -53,7 +53,7 @@ class FollowQRcode extends Component {
<p className="tip">长按二维码保存到相册</p> <p className="tip">长按二维码保存到相册</p>
</div> </div>
<div className='close'> <div className='close'>
<i className='iconfont iconiconfront-2'></i> <i className='iconfont iconiconfront-2' onClick={this.props.toClose}></i>
</div> </div>
</div> </div>
</div> </div>
......
.followQRcode-box { .followQRcode-box {
position: fixed; // position: fixed;
top: 0; // top: 0;
left: 0; // left: 0;
bottom: 0; // bottom: 0;
right: 0; // right: 0;
background: rgba(0, 0, 0, .6); // background: rgba(0, 0, 0, .6);
z-index: 1; // z-index: 1;
.followQRcode { .followQRcode {
width: 290px; width: 290px;
......
...@@ -8,6 +8,7 @@ import { http, getParam, validateTel } from "@/utils"; ...@@ -8,6 +8,7 @@ import { http, getParam, validateTel } from "@/utils";
import { Formik, withFormik, Form, Field } from 'formik'; import { Formik, withFormik, Form, Field } from 'formik';
import { Toast } from 'antd-mobile'; import { Toast } from 'antd-mobile';
import Captcha from '@/common/Captcha'; import Captcha from '@/common/Captcha';
import FollowQRcode from './../followQRcode';
import './index.scss'; import './index.scss';
class RedPacket extends PureComponent { class RedPacket extends PureComponent {
...@@ -104,6 +105,18 @@ class RedPacket extends PureComponent { ...@@ -104,6 +105,18 @@ class RedPacket extends PureComponent {
}); });
} }
// 提示关注公众号
openTip = () => {
const { shareInfo } = this.state;
// is_follow 是否关注公众号,0否,1是
if(!shareInfo.is_follow) {
this.setState({
type: 11
});
}
}
handleToOpen = () => { handleToOpen = () => {
const { history } = this.props; const { history } = this.props;
const { shareInfo: { share_code='' } } = this.state; const { shareInfo: { share_code='' } } = this.state;
...@@ -462,6 +475,7 @@ class RedPacket extends PureComponent { ...@@ -462,6 +475,7 @@ class RedPacket extends PureComponent {
// const isClick = // const isClick =
return ( return (
<> <>
<div className="red-packet"> <div className="red-packet">
<p className="red-packet__title">分享课程给好友,你和好友都可以领红包哦〜</p> <p className="red-packet__title">分享课程给好友,你和好友都可以领红包哦〜</p>
<button className="red-packet__button" onClick={this.handleToShare}>分享领红包</button> <button className="red-packet__button" onClick={this.handleToShare}>分享领红包</button>
...@@ -566,6 +580,7 @@ class RedPacket extends PureComponent { ...@@ -566,6 +580,7 @@ class RedPacket extends PureComponent {
handleToClose={() => { handleToClose={() => {
const isShare = getParam('share_code')? true : false; const isShare = getParam('share_code')? true : false;
this.handleToClose(false, isShare); this.handleToClose(false, isShare);
this.openTip();
}} }}
/> />
} }
...@@ -588,6 +603,7 @@ class RedPacket extends PureComponent { ...@@ -588,6 +603,7 @@ class RedPacket extends PureComponent {
handleToClose={() => { handleToClose={() => {
const isShare = getParam('share_code')? true : false; const isShare = getParam('share_code')? true : false;
this.handleToClose(false, isShare); this.handleToClose(false, isShare);
this.openTip();
}} }}
/> />
} }
...@@ -827,6 +843,12 @@ class RedPacket extends PureComponent { ...@@ -827,6 +843,12 @@ class RedPacket extends PureComponent {
/> />
</div> </div>
} }
{/* 关注公众号 */}
{
type === 11 &&
<FollowQRcode toClose={() => this.handleToClose(false)} />
}
</div> </div>
} }
</> </>
......
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