Commit e5ea31b2 by FE

pull

parents 7a6d4187 87e0d8cc
...@@ -83,9 +83,10 @@ class Prizes extends Component { ...@@ -83,9 +83,10 @@ class Prizes extends Component {
const { const {
showSystemNotices showSystemNotices
} = this.props } = this.props
const {notices} = this.state
return ( return (
<> <>
{showSystemNotices && <SystemBulletScreen bullets={this.state.notices}/>} {(showSystemNotices && notices && notices.length) ? <SystemBulletScreen bullets={notices}/> : null}
<div className={'prizes-box'} ref={el => this.prizeBox = el}> <div className={'prizes-box'} ref={el => this.prizeBox = el}>
<a href="javascript:;" className='rule-btn' onClick={this.showRules}>活动规则 > </a> <a href="javascript:;" className='rule-btn' onClick={this.showRules}>活动规则 > </a>
<div className={`bg`} ref={el => this.bg = el}/> <div className={`bg`} ref={el => this.bg = el}/>
...@@ -99,8 +100,8 @@ class Prizes extends Component { ...@@ -99,8 +100,8 @@ class Prizes extends Component {
item.img_name item.img_name
? <i className="prize-list__image" style={{ ? <i className="prize-list__image" style={{
backgroundImage: `url(${item.img_name})` backgroundImage: `url(${item.img_name})`
}}></i> }}/>
: <i className="prize-list__image"></i> : <i className="prize-list__image"/>
} }
{/* <img src={item.img_name} alt=""/> */} {/* <img src={item.img_name} alt=""/> */}
{ {
......
...@@ -61,8 +61,8 @@ class SystemBulletScreen extends Component { ...@@ -61,8 +61,8 @@ class SystemBulletScreen extends Component {
}, 1000) }, 1000)
} else { } else {
setTimeout(() => { setTimeout(() => {
++this.count ++this.count;
swiper.slideNext() (swiper && !swiper.destroyed) && swiper.slideNext()
}, 3000) }, 3000)
} }
} }
...@@ -99,17 +99,18 @@ class SystemBulletScreen extends Component { ...@@ -99,17 +99,18 @@ class SystemBulletScreen extends Component {
this.state.showNotices && this.state.showNotices &&
<div id="system-bullet-screen" onTransitionEnd={this.removeSystemNotices} ref={el => this.sysNotice = el}> <div id="system-bullet-screen" onTransitionEnd={this.removeSystemNotices} ref={el => this.sysNotice = el}>
<img className='avatar' <img className='avatar'
src='https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/newyear20/system-avatar.png' alt=""/> src='https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/newyear20/system-notice-icon.png' alt=""/>
<div className='sys-bullet-screen-swiper-container'> <div className='sys-bullet-screen-swiper-container'>
<ul className="swiper-wrapper"> <ul className="swiper-wrapper">
{ {
bullets && bullets.length && bullets.map((item, index) => { (bullets && bullets.length) ? bullets.map((item, index) => {
return ( return (
<li className="swiper-slide" key={index}> <li className="swiper-slide" key={index}>
<span>{item}</span> <span>{item}</span>
</li> </li>
) )
}) })
: null
} }
</ul> </ul>
</div> </div>
......
...@@ -119,9 +119,9 @@ class Landing extends Component { ...@@ -119,9 +119,9 @@ class Landing extends Component {
handleToMyTreasure = () => { handleToMyTreasure = () => {
this.joinSuccessPopup && this.joinSuccessPopup.remove() this.joinSuccessPopup && this.joinSuccessPopup.remove()
if(getParam('version')) { if (getParam('version')) {
history.push(`/year/yearTreasure?id=${id}&version=${getParam('version')}`) history.push(`/year/yearTreasure?id=${id}&version=${getParam('version')}`)
}else { } else {
history.push(`/year/yearTreasure?id=${id}`) history.push(`/year/yearTreasure?id=${id}`)
} }
} }
...@@ -276,17 +276,13 @@ class Landing extends Component { ...@@ -276,17 +276,13 @@ class Landing extends Component {
showShareTip = () => { showShareTip = () => {
const {user} = this.props const {user} = this.props
if (browser.isAndroidApp) { if (browser.isAndroidApp || browser.isIOSApp) {
} else if (browser.isIOSApp) {
SendMessageToApp('toShare', { SendMessageToApp('toShare', {
title: `@${user.data.username} 邀您一起组队拿豪礼!`, title: `@${user.data.username} 邀您一起组队拿豪礼!`,
desc: `加入我的队伍,机械键盘,纸质书籍等超多奖品等你拿!`, desc: `加入我的队伍,机械键盘,纸质书籍等超多奖品等你拿!`,
link: `${window.location.origin}/${location.pathname}?treasure_code=${getParam('treasure_code')}&origin=2`, link: `${window.location.origin}/${location.pathname}?treasure_code=${getParam('treasure_code')}&origin=2`,
//todo 分享图片更换 imgUrl: 'https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/newyear20/H5/wx-share-icon.png'
imgUrl: 'https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/newIndex/community/tou5_bj.png'
}) })
} else { } else {
......
...@@ -297,18 +297,15 @@ class YearCourse extends Component { ...@@ -297,18 +297,15 @@ class YearCourse extends Component {
http.get(`${API['base-api']}/wx/user_temporary_qrcode/${_this.props.user.data.uid}`) http.get(`${API['base-api']}/wx/user_temporary_qrcode/${_this.props.user.data.uid}`)
.then(res => { .then(res => {
const {errno, data, msg} = res.data const {errno, data, msg} = res.data
QRCode.toDataURL('http://weixin.qq.com/q/02mntn9j4xcw01_VSN1tc2', (err, url) => { if (errno == 0) {
QRCode.toDataURL(data.url, (err, url) => {
this.setState({ this.setState({
followBarcode: url, followBarcode: url,
}) })
}) })
// _this.followBarcode = "https://mp.weixin.qq.com/cgi-bin/showqrcode?ticket=gQEV8DwAAAAAAAAAAS5odHRwOi8vd2VpeGluLnFxLmNvbS9xLzAybW50bjlqNHhjdzAxX1ZTTjF0YzIAAgR5pfBdAwSAUQEA" } else {
Toast.info(msg, 2)
// if (errno == 0) { }
// _this.followBarcode = data.url
// } else {
// Message.warning(msg)
// }
}) })
} }
......
...@@ -120,7 +120,7 @@ class YarnWish extends Component { ...@@ -120,7 +120,7 @@ class YarnWish extends Component {
{item.type == 2 ? '到手最低:¥' : '¥'} {item.type == 2 ? '到手最低:¥' : '¥'}
<span <span
className="new-price">{item.type == 4 ? '0.01' : item.price2}</span> className="new-price">{item.type == 4 ? '0.01' : item.price2}</span>
<span className="old-price"> 现价:<s>¥{item.price1}</s></span> <span className="old-price">{item.type == 2 ? '' : '现价:'}<s>¥{item.price1}</s></span>
</div> </div>
<div className="status"> <div className="status">
......
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