Commit 1972d9a3 by wangshuo

新人福利弹框下架

parent 5fbcbc13
...@@ -13,7 +13,8 @@ import { connect } from "react-redux" ...@@ -13,7 +13,8 @@ import { connect } from "react-redux"
import TopSwiper from "./TopSwiper" import TopSwiper from "./TopSwiper"
// import ExpandActiveToast from './expandActiveToast' // import ExpandActiveToast from './expandActiveToast'
import AllCourseNavigation from "./all-course" import AllCourseNavigation from "./all-course"
import { UserGift } from "src/common" //tan框
// import { UserGift } from "src/common"
// const animateTypes = Swiper.animateTypes // const animateTypes = Swiper.animateTypes
...@@ -67,7 +68,7 @@ class Index extends Component { ...@@ -67,7 +68,7 @@ class Index extends Component {
} }
componentWillMount() { componentWillMount() {
this.showUserGiftFun() // this.showUserGiftFun()
} }
userStatus = () => { userStatus = () => {
...@@ -79,7 +80,7 @@ class Index extends Component { ...@@ -79,7 +80,7 @@ class Index extends Component {
this.setState({ this.setState({
isShowUserGift: false, isShowUserGift: false,
}) })
Toast.info("新人大礼包已领取成功!", 2) // Toast.info("新人大礼包已领取成功!", 2)
} else { } else {
this.setState({ this.setState({
isShowUserGift: false, isShowUserGift: false,
...@@ -89,31 +90,31 @@ class Index extends Component { ...@@ -89,31 +90,31 @@ class Index extends Component {
}) })
} }
showUserGiftFun = () => { // showUserGiftFun = () => {
let newer_last_time = localStorage.getItem("newer_last_time") // 获取用户关闭大礼包的时间 // let newer_last_time = localStorage.getItem("newer_last_time") // 获取用户关闭大礼包的时间
let now_time = new Date().valueOf() // let now_time = new Date().valueOf()
if (!newer_last_time || now_time - newer_last_time > 86400000) { // if (!newer_last_time || now_time - newer_last_time > 86400000) {
this.setState({ // this.setState({
isShowUserGift: true, // isShowUserGift: true,
}) // })
} else { // } else {
this.setState({ // this.setState({
isShowUserGift: false, // isShowUserGift: false,
}) // })
} // }
} // }
close = () => { // close = () => {
this.setState({ // this.setState({
isShowUserGift: false, // isShowUserGift: false,
}) // })
let now_time = new Date().valueOf() // 获取当前时间 // let now_time = new Date().valueOf() // 获取当前时间
localStorage.setItem("newer_last_time", now_time) // 存储关闭时间 // localStorage.setItem("newer_last_time", now_time) // 存储关闭时间
} // }
get_newerModal = () => { // get_newerModal = () => {
this.close() // this.close()
this.props.history.push("/passport/login") // this.props.history.push("/passport/login")
} // }
// 首页课程 // 首页课程
getIndexData = () => { getIndexData = () => {
...@@ -250,9 +251,9 @@ class Index extends Component { ...@@ -250,9 +251,9 @@ class Index extends Component {
/> />
)} )}
{this.state.isShowUserGift && ( {/* {this.state.isShowUserGift && (
<UserGift close={this.close} get_newerModal={this.get_newerModal} /> <UserGift close={this.close} get_newerModal={this.get_newerModal} />
)} )} */}
</div> </div>
) )
} }
......
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