Commit 1972d9a3 by wangshuo

新人福利弹框下架

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