Commit 17bc3abc by xuzhenghua

pull

parents ba54e94b cb29e024
...@@ -26,7 +26,6 @@ class Prizes extends Component { ...@@ -26,7 +26,6 @@ class Prizes extends Component {
componentDidMount() { componentDidMount() {
this.getPrizes() this.getPrizes()
} }
getPrizes = () => { getPrizes = () => {
......
...@@ -6,7 +6,7 @@ import { connect } from "react-redux" ...@@ -6,7 +6,7 @@ import { connect } from "react-redux"
import Prizes from "@components/activity/newyear-2019/common/prizes" import Prizes from "@components/activity/newyear-2019/common/prizes"
import BulletScreen from "@components/activity/newyear-2019/common/user-bullet-screen" import BulletScreen from "@components/activity/newyear-2019/common/user-bullet-screen"
import './landing.scss' 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 { Link } from "react-router-dom"
import QRCode from "qrcode" import QRCode from "qrcode"
import YearCourse from '../preheat/YearCourse' import YearCourse from '../preheat/YearCourse'
...@@ -169,13 +169,14 @@ class Landing extends Component { ...@@ -169,13 +169,14 @@ class Landing extends Component {
if (browser.isWeixin) { if (browser.isWeixin) {
wxShare({ wxShare({
title: `@${user.data.username} 邀您一起组队拿豪礼!`, title: `@${user.data.username} 邀您一起组队拿豪礼!`,
desc: `加我的队伍,机械键盘,纸质书籍等超多奖品等你拿!`, desc: `加我的队伍,机械键盘,纸质书籍等超多奖品等你拿!`,
link: `${window.location.origin}/${location.pathname}?treasure_code=${treasure_code}&origin=2`, 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' imgUrl: 'https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/newIndex/community/tou5_bj.png'
}) })
} }
sessionStorage.setItem('showShareTip', '1') 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.createTeamSuccessPopup && this.createTeamSuccessPopup.remove() && (this.createTeamSuccessPopup = null)
this.joinSuccessPopup && this.joinSuccessPopup.remove() && (this.joinSuccessPopup = null) this.joinSuccessPopup && this.joinSuccessPopup.remove() && (this.joinSuccessPopup = null)
this.fetchPageData({treasure_code, origin: 1}) this.fetchPageData({treasure_code, origin: 1})
...@@ -261,53 +262,39 @@ class Landing extends Component { ...@@ -261,53 +262,39 @@ 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 = () => { showShareTip = () => {
Popup({ const {user} = this.props
title: <div>还差<span>{this.state.teamData.lack_member}</span>名队友即可获得宝箱 快分享给好友吧~</div>, if (browser.isAndroidApp) {
className: `landing-share-tip ${browser.isWeixin ? 'wechat' : ''}`,
closable: false,
close: () => { } else if (browser.isIOSApp) {
sessionStorage.removeItem('showShareTip')
this.getFollowStatus() SendMessageToApp('toShare', {
.then(isFollow => { title: `@${user.data.username} 邀您一起组队拿豪礼!`,
!isFollow && this.remind('create', getParam('treasure_code')) 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'
})
} 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' : ''}`,
closable: false,
close: () => {
sessionStorage.removeItem('showShareTip')
this.getFollowStatus()
.then(isFollow => {
!isFollow && this.remind('create', getParam('treasure_code'))
})
}
})
}
} }
showOpenInBrowserTip = () => { showOpenInBrowserTip = () => {
......
...@@ -236,7 +236,7 @@ ...@@ -236,7 +236,7 @@
} }
.content { .content {
padding: 0 29px 15px; padding: 0 19px 15px;
margin-top: 22px; margin-top: 22px;
color: #666666; color: #666666;
font-size: 14px; font-size: 14px;
...@@ -353,93 +353,6 @@ ...@@ -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 { .landing-open-in-browser-tip, .landing-share-tip {
font-size: 17px; font-size: 17px;
color: #111; color: #111;
......
...@@ -585,11 +585,11 @@ class YearCourse extends Component { ...@@ -585,11 +585,11 @@ class YearCourse extends Component {
</div> </div>
<div className="price"> <div className="price">
{item.type == 2 ? '到手最低:¥' : '¥'} {item.type == 2 ? '到手最低:¥' : '¥'}
<span className="new-price">{item.price1}</span> <span className="new-price">{item.price2}</span>
<span <span
className="old-price"> className="old-price">
{item.type == 2 ? '' : '现价:'} {item.type == 2 ? '' : '现价:'}
<s>¥{item.price0}</s></span> <s>¥{item.price1}</s></span>
</div> </div>
<div className="status"> <div className="status">
...@@ -676,11 +676,11 @@ class YearCourse extends Component { ...@@ -676,11 +676,11 @@ class YearCourse extends Component {
</div> </div>
<div className="price"> <div className="price">
{item.type == 2 ? '到手最低:¥' : '¥'} {item.type == 2 ? '到手最低:¥' : '¥'}
<span className="new-price">{item.price1}</span> <span className="new-price">{item.price2}</span>
<span <span
className="old-price"> className="old-price">
{item.type == 2 ? '' : '现价:'} {item.type == 2 ? '' : '现价:'}
<s>¥{item.price0}</s></span> <s>¥{item.price1}</s></span>
</div> </div>
<div className="status"> <div className="status">
...@@ -767,11 +767,11 @@ class YearCourse extends Component { ...@@ -767,11 +767,11 @@ class YearCourse extends Component {
</div> </div>
<div className="price"> <div className="price">
{item.type == 2 ? '到手最低:¥' : '¥'} {item.type == 2 ? '到手最低:¥' : '¥'}
<span className="new-price">{item.price1}</span> <span className="new-price">{item.price2}</span>
<span <span
className="old-price"> className="old-price">
{item.type == 2 ? '' : '现价:'} {item.type == 2 ? '' : '现价:'}
<s>¥{item.price0}</s></span> <s>¥{item.price1}</s></span>
</div> </div>
<div className="status"> <div className="status">
...@@ -858,11 +858,11 @@ class YearCourse extends Component { ...@@ -858,11 +858,11 @@ class YearCourse extends Component {
</div> </div>
<div className="price"> <div className="price">
{item.type == 2 ? '到手最低:¥' : '¥'} {item.type == 2 ? '到手最低:¥' : '¥'}
<span className="new-price">{item.price1}</span> <span className="new-price">{item.price2}</span>
<span <span
className="old-price"> className="old-price">
{item.type == 2 ? '' : '现价:'} {item.type == 2 ? '' : '现价:'}
<s>¥{item.price0}</s></span> <s>¥{item.price1}</s></span>
</div> </div>
<div className="status"> <div className="status">
......
...@@ -81,7 +81,7 @@ class TreasureRank extends Component { ...@@ -81,7 +81,7 @@ class TreasureRank extends Component {
} }
</dd> </dd>
<dd className="rank-column"> <dd className="rank-column">
<span>{item.user_name}</span> <span className="rank-column__name">{item.user_name}</span>
</dd> </dd>
<dd className="rank-column"> <dd className="rank-column">
<span>{item.num}</span> <span>{item.num}</span>
...@@ -97,7 +97,7 @@ class TreasureRank extends Component { ...@@ -97,7 +97,7 @@ class TreasureRank extends Component {
)) ))
} }
<div className="rank-more" onClick={this.switchMoreRank}> <div className="rank-more" onClick={this.switchMoreRank}>
<span className="rank-more__txt">展开</span> <span className="rank-more__txt">{isMore? '展开' : '收起'}</span>
<i className="rank-more__icon" data-more={isMore}></i> <i className="rank-more__icon" data-more={isMore}></i>
</div> </div>
</div> </div>
......
...@@ -120,12 +120,21 @@ ...@@ -120,12 +120,21 @@
} }
} }
.rank-column__name {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.rank-column__txt { .rank-column__txt {
display: inline-block; display: inline-block;
width: 100%; width: 100%;
box-sizing: border-box; box-sizing: border-box;
padding: 0 5px; padding: 0 5px;
text-align: left; text-align: left;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
} }
a.rank-column__txt { a.rank-column__txt {
......
...@@ -61,7 +61,7 @@ class YarnWish extends Component { ...@@ -61,7 +61,7 @@ class YarnWish extends Component {
const {list, activityStage} = this.state const {list, activityStage} = this.state
return ( return (
<div className='yarn-wish'> <div className='year-wish'>
<div className="banner"><img <div className="banner"><img
src="https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/newyear20/H5/xy_banner_bj.png" alt=""/></div> src="https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/newyear20/H5/xy_banner_bj.png" alt=""/></div>
{ {
...@@ -73,7 +73,7 @@ class YarnWish extends Component { ...@@ -73,7 +73,7 @@ class YarnWish extends Component {
toCourse={this.toCourse}> toCourse={this.toCourse}>
{ {
item.type == 4 && item.type == 4 && item.is_buy != 1 &&
<div className="group-num">限量300</div> <div className="group-num">限量300</div>
} }
...@@ -99,7 +99,7 @@ class YarnWish extends Component { ...@@ -99,7 +99,7 @@ class YarnWish extends Component {
</> </>
} }
{ {
item.type == 1 && (item.type == 1 || item.type == 4) &&
<> <>
<span className="tag">拼团价</span> <span className="tag">拼团价</span>
<span className="time">12.23开团</span> <span className="time">12.23开团</span>
...@@ -116,11 +116,8 @@ class YarnWish extends Component { ...@@ -116,11 +116,8 @@ class YarnWish extends Component {
</div> </div>
<div className="price"> <div className="price">
{item.type == 2 ? '到手最低:¥' : '¥'} {item.type == 2 ? '到手最低:¥' : '¥'}
<span className="new-price">{item.price1}</span> <span className="new-price">{item.type == 4?'0.01':item.price2}</span>
<span <span className="old-price"> 现价:<s>¥{item.price1}</s></span>
className="old-price">
{item.type == 2 ? '' : '现价:'}
<s>¥{item.price0}</s></span>
</div> </div>
<div className="status"> <div className="status">
......
...@@ -2,7 +2,7 @@ html, body, #root { ...@@ -2,7 +2,7 @@ html, body, #root {
height: 100%; height: 100%;
} }
.yarn-wish { .year-wish {
min-height: 100%; min-height: 100%;
background-color: #BA2C21; background-color: #BA2C21;
padding-bottom: 35px; padding-bottom: 35px;
...@@ -214,3 +214,7 @@ html, body, #root { ...@@ -214,3 +214,7 @@ html, body, #root {
} }
} }
.year-wish + .year19-index {
display: none;
}
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