Commit a67d3ca1 by FE

merge new-share

parents 7628a0b4 32b0cf0f
......@@ -595,7 +595,6 @@ class Detail extends Component {
/>
}
{/*砍价*/}
{
course_info.is_baoming === 0 && (!course_info.is_aist) && course_info.is_bargain &&
......
import React, { PureComponent } from 'react';
import CopyToClipboard from 'react-copy-to-clipboard';
import classnames from 'classnames';
import { connect } from 'redux';
import { isEmpty } from 'lodash';
import { browser } from '@/utils';
import { http, getParam, validateTel } from "@/utils";
import { Formik, withFormik, Form, Field } from 'formik';
import { Formik, Form, Field } from 'formik';
import { Toast } from 'antd-mobile';
import Captcha from '@/common/Captcha';
import FollowQRcode from './../followQRcode';
......@@ -62,11 +61,11 @@ class RedPacket extends PureComponent {
}
}
// 绑定时间
startCountDown = () => {
if(this.countdownTimer) {
window.clearInterval(this.countdownTimer);
}
const { endTime } = this.state;
let time = endTime;
let minutes = 0;
......@@ -87,13 +86,12 @@ class RedPacket extends PureComponent {
}, 1000)
}
// 获取分享信息
handleToShare = () => {
const { history } = this.props;
// 获取分享信息
http.get(`${API.home}/sys/redPacket/shareUrl/${getParam('id')}`).then(res => {
const { code, data } = res.data;
if(code === 4030) {
if(code === 4030 || code === 4040) {
history.push('/passport/login');
}
if(code === 200) {
......@@ -117,11 +115,10 @@ class RedPacket extends PureComponent {
}
}
// 拆红包
handleToOpen = () => {
const { history } = this.props;
const { shareInfo: { share_code='' } } = this.state;
// 拆红包
http.post(
`${API.home}/sys/redPacket/split`,
{
......@@ -217,9 +214,8 @@ class RedPacket extends PureComponent {
}
}
}
}
}else if(code === 4030) {
}
}else if(code === 4030 || code === 4040) {
history.push('/passport/login');
}
})
......@@ -295,6 +291,7 @@ class RedPacket extends PureComponent {
}
}
// 复制口令
handleToCopy = () => {
this.setState({
isCopy: true
......@@ -472,10 +469,8 @@ class RedPacket extends PureComponent {
const cls = classnames('popup-mask',{
'popup-mask--no': type !== 0
});
// const isClick =
return (
<>
<div className="red-packet">
<p className="red-packet__title">分享课程给好友,你和好友都可以领红包哦〜</p>
<button className="red-packet__button" onClick={this.handleToShare}>分享领红包</button>
......@@ -805,7 +800,7 @@ class RedPacket extends PureComponent {
<li className="popup-bind__account">
{/* wechat */}
<i className="iconfont iconweixinzhifu"></i>
<i className="icon-wachat"></i>
<p className="popup-bind__account--name">{bindInfo['wechat_nickname']}</p>
</li>
}
......
......@@ -496,7 +496,8 @@
.popup-bind__title {
margin: 0;
font-size: 14px;
font-size: 16px;
font-weight: 500;
color: #333;
text-align: center;
line-height: 1;
......@@ -505,7 +506,7 @@
.popup-bind__desc {
margin: 0;
padding: 0 20px;
font-size: 12px;
font-size: 14px;
color: #666;
text-align: left;
}
......@@ -519,15 +520,22 @@
align-items: center;
height: 30px;
margin: 0 52px;
padding: 0 4px;
text-align: left;
&:nth-child(n+2) {
border-top: 1px solid #E5E5E5;
}
.iconfont {
font-size: 22px;
color: #999;
}
}
.popup-bind__account--name {
margin: 0;
padding-left: 7px;
font-size: 12px;
color: #999;
}
......@@ -546,7 +554,17 @@
display: inline-block;
width: 22px;
height: 22px;
background-image: url('./qq.png');
background-image: url('./QQicon.png');
background-size: auto 100%;
background-repeat: no-repeat;
background-position: center;
}
.icon-wachat {
display: inline-block;
width: 22px;
height: 22px;
background-image: url('./wechat.png');
background-size: 100% auto;
background-repeat: no-repeat;
background-position: center;
......
src/components/detail/redPacket/wechat.png

791 Bytes | W: | H:

src/components/detail/redPacket/wechat.png

782 Bytes | W: | H:

src/components/detail/redPacket/wechat.png
src/components/detail/redPacket/wechat.png
src/components/detail/redPacket/wechat.png
src/components/detail/redPacket/wechat.png
  • 2-up
  • Swipe
  • Onion skin
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