Commit 27f2d682 by FE

Merge branch '00' of gitlab.julyedu.com:baiguangyao/mr-julyedu into 00

parents 6a1b5b23 75753b6e
......@@ -26,7 +26,6 @@ class Prizes extends Component {
componentDidMount() {
this.getPrizes()
}
getPrizes = () => {
......
......@@ -6,7 +6,7 @@ import { connect } from "react-redux"
import Prizes from "@components/activity/newyear-2019/common/prizes"
import BulletScreen from "@components/activity/newyear-2019/common/user-bullet-screen"
import './landing.scss'
import { browser, getParam, http, wxShare } from "@/utils"
import { browser, getParam, http, wxShare, SendMessageToApp } from "@/utils"
import { Link } from "react-router-dom"
import QRCode from "qrcode"
import YearCourse from '../preheat/YearCourse'
......@@ -169,13 +169,14 @@ class Landing extends Component {
if (browser.isWeixin) {
wxShare({
title: `@${user.data.username} 邀您一起组队拿豪礼!`,
desc: `加我的队伍,机械键盘,纸质书籍等超多奖品等你拿!`,
desc: `加我的队伍,机械键盘,纸质书籍等超多奖品等你拿!`,
link: `${window.location.origin}/${location.pathname}?treasure_code=${treasure_code}&origin=2`,
//todo 分享图片更换
imgUrl: 'https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/newIndex/community/tou5_bj.png'
})
}
sessionStorage.setItem('showShareTip', '1')
history.replace(`${match.path}?treasure_code=${treasure_code}&origin=${1}`)
history.replace(`${match.url}?treasure_code=${treasure_code}&origin=${1}`)
this.createTeamSuccessPopup && this.createTeamSuccessPopup.remove() && (this.createTeamSuccessPopup = null)
this.joinSuccessPopup && this.joinSuccessPopup.remove() && (this.joinSuccessPopup = null)
this.fetchPageData({treasure_code, origin: 1})
......@@ -261,41 +262,26 @@ class Landing extends Component {
})
}
unpackTreasureBox = () => {
Popup({
title: '恭喜你获得',
className: 'landing-unpack-treasure-box',
closeIcon: this.closeIcon,
content: <div className='unpack-box-wrapper'>
<div className="prize-wrapper">
<img className='prize'
src="https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1575544072904&di=474bca496055f1141a40ae2df45d1bbb&imgtype=0&src=http%3A%2F%2Fphotocdn.sohu.com%2F20110926%2FImg320518331.jpg"
alt=""/>
</div>
<div className="prize-name">AI100题纸质书</div>
<a className="delivery-info" href='javascript:;'>查看/修改收货信息</a>
<ul className="members">
{
new Array(4).fill('a').map((item, index) => {
return <li key={index}>
<div className="avatar-wrapper">
{
index === 0 && <sup>队长</sup>
}
<img src="https://julyedu-img-public.oss-cn-beijing.aliyuncs.com/Public/Image/default/robot.png"
alt=""/>
</div>
<span className='prize-name'>AI100题纸质书</span>
</li>
})
}
</ul>
<button>继续组队开宝箱</button>
</div>
showShareTip = () => {
const {user} = this.props
if (browser.isAndroidApp) {
} else if (browser.isIOSApp) {
SendMessageToApp('toShare', {
title: `@${user.data.username} 邀您一起组队拿豪礼!`,
desc: `加入我的队伍,机械键盘,纸质书籍等超多奖品等你拿!`,
link: `${window.location.origin}/${location.pathname}?treasure_code=${getParam('treasure_code')}&origin=2`,
//todo 分享图片更换
imgUrl: 'https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/newIndex/community/tou5_bj.png'
})
}
showShareTip = () => {
} else {
const {history, match} = this.props
if (browser.isWeixin && getParam('origin') == 1) {
history.replace(`${match.url}?treasure_code=${getParam('treasure_code')}&origin=2`)
}
Popup({
title: <div>还差<span>{this.state.teamData.lack_member}</span>名队友即可获得宝箱 快分享给好友吧~</div>,
className: `landing-share-tip ${browser.isWeixin ? 'wechat' : ''}`,
......@@ -309,6 +295,7 @@ class Landing extends Component {
}
})
}
}
showOpenInBrowserTip = () => {
Popup({
......
......@@ -353,93 +353,6 @@
}
}
.landing-unpack-treasure-box {
text-align: center;
&.popup-container {
width: 320px;
padding: 20px 18px;
top: 62px;
.title {
font-size: 18px;
color: #111;
margin-bottom: 10px;
}
}
.prize-wrapper {
width: 130px;
height: 103px;
margin: 0 auto 5px;
border: 1px solid #CDCDCD;
img {
width: 100%;
height: 100%;
}
}
.prize-name {
font-size: 15px;
color: #FF232D;
margin-bottom: 5px;
}
.members {
background: #EFEFEF;
text-align: left;
padding: 12px;
margin-top: 12px;
li:nth-last-child(1) {
margin-bottom: 0;
}
li {
display: flex;
align-items: center;
height: 25px;
margin-bottom: 8px;
font-size: 12px;
line-height: 25px;
.avatar-wrapper {
position: relative;
width: 25px;
height: 25px;
margin-right: 8px;
sup {
@extend .sup;
top: -50%;
right: -80%;
}
}
img {
width: 100%;
height: 100%;
border-radius: 50%;
}
.prize-name {
color: #090909;
margin-bottom: 0;
}
.unopened {
color: #9A9A9A;
}
}
}
button {
@extend .popup-button;
}
}
.landing-open-in-browser-tip, .landing-share-tip {
font-size: 17px;
color: #111;
......
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