Commit 6e3492f8 by xuzhenghua

pull

parent b621cf13
......@@ -85,7 +85,7 @@ class Prizes extends Component {
} = this.props
return (
<>
{showSystemNotices && <SystemBulletScreen bullets={this.state.notices}/>}
{showSystemNotices && <SystemBulletScreen/>}
<div className={'prizes-box'} ref={el => this.prizeBox = el}>
<a href="javascript:;" className='rule-btn' onClick={this.showRules}>活动规则 > </a>
<div className={`bg`} ref={el => this.bg = el}/>
......
......@@ -70,7 +70,7 @@ class SplitSuccess extends Component {
{
item.prize
? <span className="member-item__prize">{item.prize}</span>
: <span className="member-item__prize">尚未开宝箱</span>
: <span className="member-item__prize">尚未开宝箱</span>
}
</div>
))
......
......@@ -61,15 +61,17 @@ class SystemBulletScreen extends Component {
content.style.transform = `translate3d(${-(contentWidth - wrapperWidth) - 10}px,0,0)`
}, 1000)
} else {
setTimeout(() => {
swiper.slideNext()
}, 3000)
this.swiper.slideNext()
}
}
transitionEnd = () => {
const {
bullets = []
bullets = [
'第一条消息,第一条消息,第一条消息,第一条消息,第一条消息,第一条消息,',
'第二条消息,第二条消息,第二条消息,第二条消息,第二条消息,第二条消息,',
'第三条消息,第三条消息,第三条消息,第三条消息,第三条消息,第三条消息,',
]
} = this.props
const len = bullets.length * 3
......
......@@ -11,8 +11,6 @@
height: 100%;
padding: 2px;
line-height: 26px;
display: flex;
align-items: center;
}
.avatar {
......
......@@ -6,8 +6,6 @@ import './bullet-screen.scss'
class UserBulletScreen extends Component {
swiper
state = {
bulletScreenData: []
}
......@@ -16,10 +14,6 @@ class UserBulletScreen extends Component {
this.getBulletScreenData(true)
}
componentWillUpdate() {
this.swiper && this.swiper.destroy()
}
initializeBulletScreen = () => {
const _this = this
......
......@@ -34,7 +34,6 @@ class Landing extends Component {
componentDidMount() {
this.fetchPageData()
window.showFollowAlert = this.remind.bind(this, 'create')
}
componentDidUpdate(prevProps) {
......@@ -55,8 +54,7 @@ class Landing extends Component {
this.setState({
teamData: data,
isCaptain: sessionStorage.getItem('isCaptain') ? sessionStorage.getItem('isCaptain') : getParam('origin') == 1,
activityEnd: data.status == 5
isCaptain: sessionStorage.getItem('isCaptain') ? sessionStorage.getItem('isCaptain') : getParam('origin') == 1
})
let searchParams = new URLSearchParams(window.location.search)
......@@ -69,6 +67,12 @@ class Landing extends Component {
this.showSharePromptWithParam()
} else if (code === 12005) {
this.setState({
activityEnd: true
})
} else {
Toast.info(msg, 2, null, false)
}
......@@ -231,7 +235,7 @@ class Landing extends Component {
}
remind = (type = 'create', treasure_code, origin = 1) => {
const {user} = this.props
const {match, history, user} = this.props
http.get(`${API["base-api"]}/wx/user_temporary_qrcode/${user.data.uid}`)
.then(res => {
const {data} = res.data
......@@ -285,12 +289,10 @@ class Landing extends Component {
closable: false,
close: () => {
sessionStorage.removeItem('showShareTip')
if (!user.hasError) {
this.getFollowStatus()
.then(isFollow => {
!isFollow && this.remind('create', getParam('treasure_code'), 1)
})
}
this.getFollowStatus()
.then(isFollow => {
!isFollow && this.remind('create', getParam('treasure_code'), 1)
})
}
})
}
......
......@@ -391,7 +391,3 @@
width: 312px;
}
}
.year19-index{
display: none;
}
......@@ -161,7 +161,7 @@ class TreasureTeam extends Component {
{
currentMember.prize_name
? <p className="team-prize">{currentMember.prize_name}</p>
: <p className="team-prize">尚未开宝箱</p>
: <p className="team-prize">尚未开宝箱</p>
}
{
currentMember.uid == userInfo.uid
......
......@@ -41,7 +41,7 @@ class LiveRoom extends Component {
// 检查是否已登录
const {hasError, data = {}} = this.props.user;
if(hasError) {
this.toLogin();
this.props.history.push('/passport/login');
}else{
http.get(`${API['base-api']}/sys/createLiveQrcode/${id}`).then(res => {
let { errno, data, msg } = res.data;
......@@ -67,7 +67,7 @@ class LiveRoom extends Component {
toLivingRoom = (id) => {
const {hasError, data = {}} = this.props.user;
if(hasError) {
this.toLogin();
this.props.history.push('/passport/login');
}else{
window.location.href = `${window.location.protocol}//www.julyedu.com/live/m_room/${id}`
}
......@@ -76,7 +76,7 @@ class LiveRoom extends Component {
checkVideo = (url) => {
const {hasError, data = {}} = this.props.user;
if(hasError) {
this.toLogin();
this.props.history.push('/passport/login');
}else{
const vCourseId = url.split('/')[0];
history.push(`/play/video?id=${vCourseId}`)
......@@ -103,15 +103,6 @@ class LiveRoom extends Component {
}
}
// 去登录
toLogin = () => {
if (!getParam('version')) {
this.props.history.push('/passport/login')
} else {
SendMessageToApp("toLogin")
}
}
render() {
const { list,showMark,subUrl } = this.state;
return (
......
......@@ -438,7 +438,7 @@ class YearCourse extends Component {
{/*浮框*/}
<div className='nav-right'>
<span onClick={this.toBoxList} className='nav-right__link'>
宝箱
宝箱
{
removable > 0 &&
<i className="nav-right__number">{removable}</i>
......
......@@ -131,23 +131,7 @@ export default class index extends Component {
</div>
<div className="banner-treasure__decorate"></div>
</div>
{/*浮框*/}
<div className='nav-right'>
<span onClick={this.toBoxList} className='nav-right__link'>
未开宝箱
{
removable > 0 &&
<i className="nav-right__number">{removable}</i>
}
</span>
<a onClick={() => this.toYearWish()} className='nav-right__link'>
心愿单
{
this.state.txt1 > 0 &&
<i className="nav-right__number">{this.state.txt1}</i>
}
</a>
</div>
{/* 大咖直播 */}
<LiveRoom/>
......
import React, { Component } from 'react';
import './team.scss'
import { getParam, http, SendMessageToApp } from "@/utils"
import { getParam, http, SendMessageToApp, browser } from "@/utils"
import { Toast } from 'antd-mobile';
import {withRouter} from 'react-router-dom';
import {compose} from "redux"
......@@ -54,7 +54,7 @@ class TeamInfo extends Component {
// 跳转到我的宝箱页
toYearTreasure = (close) => {
if(this.props.user.hasError) {
this.toLogin();
this.props.history.push('/passport/login');
} else {
let search = '';
if(close) {
......@@ -69,19 +69,10 @@ class TeamInfo extends Component {
}
// 去登录
toLogin = () => {
if (!getParam('version')) {
this.props.history.push('/passport/login')
} else {
SendMessageToApp("toLogin")
}
}
// 邀请好友组队
createTeam = () => {
if(this.props.user.hasError) {
this.toLogin();
this.props.history.push('/passport/login');
} else {
const {is_my_team, my_team: {treasure_code}} = this.state;
if(is_my_team) { // 有自己的队伍
......@@ -129,7 +120,7 @@ class TeamInfo extends Component {
} else if (removable === 0) {
Text = `共${total}个宝箱`;
} else {
Text = `共${total}个宝箱/${removable}个未`;
Text = `共${total}个宝箱/${removable}个未`;
}
return (
......
......@@ -33,8 +33,6 @@ class YarnWish extends Component {
this.setState({
list: JSON.stringify(data) === '{}' ? [] : data
})
} else if (code === 4030) {
this.props.history.push('/passport/login')
}
})
}
......
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