Commit b3475f4f by xuzhenghua

新用户大礼包

parents bd1951ca c98c546a
......@@ -83,14 +83,14 @@
"deposit-pay-order.js": "/mrstatic/js/deposit-pay-order.4afe834f.chunk.js",
"deposit-pay-order.js.map": "/mrstatic/js/deposit-pay-order.4afe834f.chunk.js.map",
"detail.css": "/mrstatic/css/detail.418d7070.chunk.css",
"detail.js": "/mrstatic/js/detail.9edb7739.chunk.js",
"detail.js.map": "/mrstatic/js/detail.9edb7739.chunk.js.map",
"detail.js": "/mrstatic/js/detail.bf131e66.chunk.js",
"detail.js.map": "/mrstatic/js/detail.bf131e66.chunk.js.map",
"intelligent-recommend.css": "/mrstatic/css/intelligent-recommend.aac549ab.chunk.css",
"intelligent-recommend.js": "/mrstatic/js/intelligent-recommend.45d273d1.chunk.js",
"intelligent-recommend.js.map": "/mrstatic/js/intelligent-recommend.45d273d1.chunk.js.map",
"main.css": "/mrstatic/css/main.a093e69c.chunk.css",
"main.js": "/mrstatic/js/main.103e7a0e.chunk.js",
"main.js.map": "/mrstatic/js/main.103e7a0e.chunk.js.map",
"main.js": "/mrstatic/js/main.036b4dd3.chunk.js",
"main.js.map": "/mrstatic/js/main.036b4dd3.chunk.js.map",
"ml.css": "/mrstatic/css/ml.b63458cf.chunk.css",
"ml.js": "/mrstatic/js/ml.1b9cbd26.chunk.js",
"ml.js.map": "/mrstatic/js/ml.1b9cbd26.chunk.js.map",
......@@ -115,8 +115,8 @@
"python-class.css": "/mrstatic/css/python-class.1718dcc2.chunk.css",
"python-class.js": "/mrstatic/js/python-class.72547aba.chunk.js",
"python-class.js.map": "/mrstatic/js/python-class.72547aba.chunk.js.map",
"runtime~main.js": "/mrstatic/js/runtime~main.c07aae5b.js",
"runtime~main.js.map": "/mrstatic/js/runtime~main.c07aae5b.js.map",
"runtime~main.js": "/mrstatic/js/runtime~main.28c995b5.js",
"runtime~main.js.map": "/mrstatic/js/runtime~main.28c995b5.js.map",
"search.css": "/mrstatic/css/search.9c45e5d3.chunk.css",
"search.js": "/mrstatic/js/search.a16b3ac2.chunk.js",
"search.js.map": "/mrstatic/js/search.a16b3ac2.chunk.js.map",
......@@ -260,6 +260,6 @@
"mrstatic/media/iconfont.css": "/mrstatic/media/iconfont.f2f4294d.woff",
"mrstatic/media/kanjia_cg_icon.png": "/mrstatic/media/kanjia_cg_icon.81a489ac.png",
"mrstatic/media/video.scss": "/mrstatic/media/progress-share-bg.80011994.png",
"precache-manifest.6084fcaffa739813ed00af7b28261680.js": "/precache-manifest.6084fcaffa739813ed00af7b28261680.js",
"precache-manifest.263d8c127fcdaa1d8fd42c1757687745.js": "/precache-manifest.263d8c127fcdaa1d8fd42c1757687745.js",
"service-worker.js": "/service-worker.js"
}
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -24,16 +24,16 @@ self.__precacheManifest = [
"url": "/mrstatic/js/3.a7b4987a.chunk.js"
},
{
"revision": "6902434f8f18a23319d57d0ac8aaea8c",
"url": "/mrstatic/media/redb_sp_bj@2x.6902434f.png"
"revision": "c79abf5cb7ae8a82009cf68fe44d1078",
"url": "/mrstatic/media/redb_money_bj@2x.c79abf5c.png"
},
{
"revision": "33fd19f4a827d64b7b03",
"url": "/mrstatic/js/4.ed571284.chunk.js"
},
{
"revision": "c79abf5cb7ae8a82009cf68fe44d1078",
"url": "/mrstatic/media/redb_money_bj@2x.c79abf5c.png"
"revision": "6902434f8f18a23319d57d0ac8aaea8c",
"url": "/mrstatic/media/redb_sp_bj@2x.6902434f.png"
},
{
"revision": "493724861df3c83c5aa4",
......@@ -88,8 +88,8 @@ self.__precacheManifest = [
"url": "/mrstatic/js/Examination.b0265dae.chunk.js"
},
{
"revision": "64fd0b167457064e12ff8a6afcd31720",
"url": "/mrstatic/media/iconfont.64fd0b16.eot"
"revision": "99b2454970e48c8bb00578cdca15b3d2",
"url": "/mrstatic/media/iconfont.99b24549.ttf"
},
{
"revision": "b213e50541273b70baef",
......@@ -100,8 +100,8 @@ self.__precacheManifest = [
"url": "/mrstatic/js/MyEdit.5e5255ee.chunk.js"
},
{
"revision": "99b2454970e48c8bb00578cdca15b3d2",
"url": "/mrstatic/media/iconfont.99b24549.ttf"
"revision": "64fd0b167457064e12ff8a6afcd31720",
"url": "/mrstatic/media/iconfont.64fd0b16.eot"
},
{
"revision": "0a094fc8f8bf94a9d44f",
......@@ -220,8 +220,8 @@ self.__precacheManifest = [
"url": "/mrstatic/js/55.86f5f380.chunk.js"
},
{
"revision": "6037546fb2fdb67f6f26",
"url": "/mrstatic/js/detail.9edb7739.chunk.js"
"revision": "6a7784ade407c7645219",
"url": "/mrstatic/js/detail.bf131e66.chunk.js"
},
{
"revision": "a319a65a656d2d555ab1",
......@@ -236,8 +236,8 @@ self.__precacheManifest = [
"url": "/mrstatic/js/53.be714528.chunk.js"
},
{
"revision": "02c7877567f99220bc8c",
"url": "/mrstatic/js/main.103e7a0e.chunk.js"
"revision": "64140dc178a4104487c5",
"url": "/mrstatic/js/main.036b4dd3.chunk.js"
},
{
"revision": "6d0a8687325eec5f71ee",
......@@ -304,8 +304,8 @@ self.__precacheManifest = [
"url": "/mrstatic/js/python-class.72547aba.chunk.js"
},
{
"revision": "40fa4d54da1bf143d0d1",
"url": "/mrstatic/js/runtime~main.c07aae5b.js"
"revision": "31b83e609953118cbc29",
"url": "/mrstatic/js/runtime~main.28c995b5.js"
},
{
"revision": "6b4dbd5d80b91b388465",
......@@ -404,7 +404,7 @@ self.__precacheManifest = [
"url": "/mrstatic/css/53.820320a6.chunk.css"
},
{
"revision": "02c7877567f99220bc8c",
"revision": "64140dc178a4104487c5",
"url": "/mrstatic/css/main.a093e69c.chunk.css"
},
{
......@@ -420,7 +420,7 @@ self.__precacheManifest = [
"url": "/mrstatic/css/55.f03957a5.chunk.css"
},
{
"revision": "6037546fb2fdb67f6f26",
"revision": "6a7784ade407c7645219",
"url": "/mrstatic/css/detail.418d7070.chunk.css"
},
{
......@@ -560,7 +560,7 @@ self.__precacheManifest = [
"url": "/mrstatic/css/1.4f6c0784.chunk.css"
},
{
"revision": "a6def0d08ae8045d913a0c0757deedb7",
"revision": "4e70010b7ae461aecc87f4f7a4d16851",
"url": "/index.html"
}
];
\ No newline at end of file
......@@ -14,7 +14,7 @@
importScripts("https://storage.googleapis.com/workbox-cdn/releases/3.6.3/workbox-sw.js");
importScripts(
"/precache-manifest.6084fcaffa739813ed00af7b28261680.js"
"/precache-manifest.263d8c127fcdaa1d8fd42c1757687745.js"
);
workbox.clientsClaim();
......
......@@ -19,7 +19,7 @@ class UserGift extends Component {
}
get_newerModal = () => {
this.props.history.push('/passport/login')
this.props.get_newerModal()
}
close = () => {
this.props.close()
......
......@@ -63,20 +63,25 @@ class Index extends Component {
componentDidMount() {
this.getIndexData()
this.showUserGiftFun()
this.userStatus()
}
componentWillMount(){
this.showUserGiftFun()
}
userStatus =()=>{
this.setState({
isShowUserGift: false
})
http.get(`${API['base-api']}/sys/user/new_user_status`).then((res) => {
const {errno, data} = res.data
if (errno === 0) {
if (data.status == 1) {
// 新用户登录之后判断是否是新用户
this.setState({
isShowUserGift: false
})
Toast.info('新人大礼包已领取成功!', 2)
} else {
this.setState({
isShowUserGift: false
})
}
}
})
......@@ -103,6 +108,11 @@ class Index extends Component {
localStorage.setItem('newer_last_time', now_time) // 存储关闭时间
}
get_newerModal = ()=>{
this.close()
this.props.history.push('/passport/login')
}
// 首页课程
getIndexData = () => {
http.get(`${API.home}/m/home`).then((res) => {
......@@ -247,7 +257,7 @@ class Index extends Component {
{
this.state.isShowUserGift &&
<UserGift close={this.close} history={this.props.history}/>
<UserGift close={this.close} get_newerModal={this.get_newerModal}/>
}
</div>
)
......
......@@ -59,8 +59,6 @@ class Detail extends Component {
componentDidMount() {
this.fetchCourseInfo()
this.showUserGiftFun()
this.userStatus()
const {location: {state = {}}} = this.props
if (state.oid) {
this.check(state.oid)
......@@ -84,18 +82,28 @@ class Detail extends Component {
if (getParam('ac') && Number(getParam('ac')) === 11) {
this.getBorwerCourse()
}
this.userStatus()
}
componentWillMount(){
this.showUserGiftFun()
}
userStatus = () => {
this.setState({
isShowUserGift: false
})
http.get(`${API['base-api']}/sys/user/new_user_status`).then((res) => {
const {errno, data} = res.data
if (errno === 0) {
if (data.status == 1) {
// 新用户登录之后判断是否是新用户
this.setState({
isShowUserGift: false
})
Toast.info('新人大礼包已领取成功!', 2)
} else {
this.setState({
isShowUserGift: false
})
}
}
})
......@@ -121,6 +129,10 @@ class Detail extends Component {
let now_time = (new Date()).valueOf() // 获取当前时间
localStorage.setItem('newer_last_time', now_time) // 存储关闭时间
}
get_newerModal = ()=>{
this.close()
this.props.history.push('/passport/login')
}
getBorwerCourse = () => {
http.get(`${API.home}/sys/user/blessing`, {type: 4, course_id: getParam('id')}).then(res => {
......@@ -867,7 +879,7 @@ class Detail extends Component {
{
this.state.isShowUserGift &&
<UserGift close={this.close} history={this.props.history}/>
<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