Commit 024c09d4 by zhanghaozhe

分享页返回

parent 55148ed3
...@@ -17,8 +17,10 @@ class Landing extends Component { ...@@ -17,8 +17,10 @@ class Landing extends Component {
closeIcon = 'https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/newyear20/H5/close-btn.png' closeIcon = 'https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/newyear20/H5/close-btn.png'
createTeamSuccessPopup = null createTeamSuccessPopup = null
joinSuccessPopup = null joinSuccessPopup = null
shareTipPopup = null
swiper = null swiper = null
state = { state = {
teamData: { teamData: {
member: [] member: []
...@@ -42,6 +44,10 @@ class Landing extends Component { ...@@ -42,6 +44,10 @@ class Landing extends Component {
} }
} }
componentWillUnmount() {
this.shareTipPopup && this.shareTipPopup.remove()
}
fetchPageData = ({origin = this.state.origin, treasure_code = this.state.treasure_code} = {}) => { fetchPageData = ({origin = this.state.origin, treasure_code = this.state.treasure_code} = {}) => {
const {location} = this.props const {location} = this.props
...@@ -304,7 +310,7 @@ class Landing extends Component { ...@@ -304,7 +310,7 @@ class Landing extends Component {
}) })
} else { } else {
Popup({ this.shareTipPopup = Popup({
title: <div>还差<span>{this.state.teamData.lack_member}</span>名队友即可获得宝箱 快分享给好友吧~</div>, title: <div>还差<span>{this.state.teamData.lack_member}</span>名队友即可获得宝箱 快分享给好友吧~</div>,
className: `landing-share-tip ${browser.isWeixin ? 'wechat' : ''}`, className: `landing-share-tip ${browser.isWeixin ? 'wechat' : ''}`,
closable: false, closable: false,
......
...@@ -109,6 +109,7 @@ ...@@ -109,6 +109,7 @@
width: 36px; width: 36px;
height: 36px; height: 36px;
border-radius: 50%; border-radius: 50%;
border: 1px solid #fff;
} }
} }
......
...@@ -96,6 +96,7 @@ class TeamInfo extends Component { ...@@ -96,6 +96,7 @@ class TeamInfo extends Component {
if(this.props.user.hasError) { if(this.props.user.hasError) {
this.toLogin(); this.toLogin();
} else { } else {
sessionStorage.setItem('showShareTip', '1')
const {is_my_team, my_team: {treasure_code}} = this.state; const {is_my_team, my_team: {treasure_code}} = this.state;
if(is_my_team) { // 有自己的队伍 if(is_my_team) { // 有自己的队伍
// 直接跳转 // 直接跳转
......
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