Commit b9fdebeb by wangshuo

Merge branch 'dev' of gitlab.julyedu.com:baiguangyao/mr-julyedu into dev

parents 68ecaa20 8e034931
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
"mrstatic/js/1.5e11f90b.chunk.js": "/mrstatic/js/1.5e11f90b.chunk.js", "mrstatic/js/1.5e11f90b.chunk.js": "/mrstatic/js/1.5e11f90b.chunk.js",
"mrstatic/js/1.5e11f90b.chunk.js.map": "/mrstatic/js/1.5e11f90b.chunk.js.map", "mrstatic/js/1.5e11f90b.chunk.js.map": "/mrstatic/js/1.5e11f90b.chunk.js.map",
"mrstatic/css/2.628f7f46.chunk.css": "/mrstatic/css/2.628f7f46.chunk.css", "mrstatic/css/2.628f7f46.chunk.css": "/mrstatic/css/2.628f7f46.chunk.css",
"mrstatic/js/2.d2b0d28a.chunk.js": "/mrstatic/js/2.d2b0d28a.chunk.js", "mrstatic/js/2.4f662d87.chunk.js": "/mrstatic/js/2.4f662d87.chunk.js",
"mrstatic/js/2.d2b0d28a.chunk.js.map": "/mrstatic/js/2.d2b0d28a.chunk.js.map", "mrstatic/js/2.4f662d87.chunk.js.map": "/mrstatic/js/2.4f662d87.chunk.js.map",
"mrstatic/css/3.bf839917.chunk.css": "/mrstatic/css/3.bf839917.chunk.css", "mrstatic/css/3.bf839917.chunk.css": "/mrstatic/css/3.bf839917.chunk.css",
"mrstatic/js/3.40b98937.chunk.js": "/mrstatic/js/3.40b98937.chunk.js", "mrstatic/js/3.40b98937.chunk.js": "/mrstatic/js/3.40b98937.chunk.js",
"mrstatic/js/3.40b98937.chunk.js.map": "/mrstatic/js/3.40b98937.chunk.js.map", "mrstatic/js/3.40b98937.chunk.js.map": "/mrstatic/js/3.40b98937.chunk.js.map",
...@@ -91,9 +91,9 @@ ...@@ -91,9 +91,9 @@
"newyear-2019-landing.css": "/mrstatic/css/newyear-2019-landing.6cf08b5e.chunk.css", "newyear-2019-landing.css": "/mrstatic/css/newyear-2019-landing.6cf08b5e.chunk.css",
"newyear-2019-landing.js": "/mrstatic/js/newyear-2019-landing.8d7f42c0.chunk.js", "newyear-2019-landing.js": "/mrstatic/js/newyear-2019-landing.8d7f42c0.chunk.js",
"newyear-2019-landing.js.map": "/mrstatic/js/newyear-2019-landing.8d7f42c0.chunk.js.map", "newyear-2019-landing.js.map": "/mrstatic/js/newyear-2019-landing.8d7f42c0.chunk.js.map",
"newyear-yearIndex.css": "/mrstatic/css/newyear-yearIndex.3f3799ce.chunk.css", "newyear-yearIndex.css": "/mrstatic/css/newyear-yearIndex.c95a4c79.chunk.css",
"newyear-yearIndex.js": "/mrstatic/js/newyear-yearIndex.f49a1017.chunk.js", "newyear-yearIndex.js": "/mrstatic/js/newyear-yearIndex.f5475c6c.chunk.js",
"newyear-yearIndex.js.map": "/mrstatic/js/newyear-yearIndex.f49a1017.chunk.js.map", "newyear-yearIndex.js.map": "/mrstatic/js/newyear-yearIndex.f5475c6c.chunk.js.map",
"prize-winner-list.css": "/mrstatic/css/prize-winner-list.3eee90af.chunk.css", "prize-winner-list.css": "/mrstatic/css/prize-winner-list.3eee90af.chunk.css",
"prize-winner-list.js": "/mrstatic/js/prize-winner-list.7d121478.chunk.js", "prize-winner-list.js": "/mrstatic/js/prize-winner-list.7d121478.chunk.js",
"prize-winner-list.js.map": "/mrstatic/js/prize-winner-list.7d121478.chunk.js.map", "prize-winner-list.js.map": "/mrstatic/js/prize-winner-list.7d121478.chunk.js.map",
...@@ -103,8 +103,8 @@ ...@@ -103,8 +103,8 @@
"python-class.css": "/mrstatic/css/python-class.49baf51f.chunk.css", "python-class.css": "/mrstatic/css/python-class.49baf51f.chunk.css",
"python-class.js": "/mrstatic/js/python-class.1e8ab05e.chunk.js", "python-class.js": "/mrstatic/js/python-class.1e8ab05e.chunk.js",
"python-class.js.map": "/mrstatic/js/python-class.1e8ab05e.chunk.js.map", "python-class.js.map": "/mrstatic/js/python-class.1e8ab05e.chunk.js.map",
"runtime~main.js": "/mrstatic/js/runtime~main.5ded5577.js", "runtime~main.js": "/mrstatic/js/runtime~main.e2fe9b29.js",
"runtime~main.js.map": "/mrstatic/js/runtime~main.5ded5577.js.map", "runtime~main.js.map": "/mrstatic/js/runtime~main.e2fe9b29.js.map",
"search.css": "/mrstatic/css/search.5716d9b3.chunk.css", "search.css": "/mrstatic/css/search.5716d9b3.chunk.css",
"search.js": "/mrstatic/js/search.f250c6e7.chunk.js", "search.js": "/mrstatic/js/search.f250c6e7.chunk.js",
"search.js.map": "/mrstatic/js/search.f250c6e7.chunk.js.map", "search.js.map": "/mrstatic/js/search.f250c6e7.chunk.js.map",
...@@ -186,7 +186,7 @@ ...@@ -186,7 +186,7 @@
"mrstatic/css/main.532b6b06.chunk.css.map": "/mrstatic/css/main.532b6b06.chunk.css.map", "mrstatic/css/main.532b6b06.chunk.css.map": "/mrstatic/css/main.532b6b06.chunk.css.map",
"mrstatic/css/myorders.179a42fc.chunk.css.map": "/mrstatic/css/myorders.179a42fc.chunk.css.map", "mrstatic/css/myorders.179a42fc.chunk.css.map": "/mrstatic/css/myorders.179a42fc.chunk.css.map",
"mrstatic/css/newyear-2019-landing.6cf08b5e.chunk.css.map": "/mrstatic/css/newyear-2019-landing.6cf08b5e.chunk.css.map", "mrstatic/css/newyear-2019-landing.6cf08b5e.chunk.css.map": "/mrstatic/css/newyear-2019-landing.6cf08b5e.chunk.css.map",
"mrstatic/css/newyear-yearIndex.3f3799ce.chunk.css.map": "/mrstatic/css/newyear-yearIndex.3f3799ce.chunk.css.map", "mrstatic/css/newyear-yearIndex.c95a4c79.chunk.css.map": "/mrstatic/css/newyear-yearIndex.c95a4c79.chunk.css.map",
"mrstatic/css/prize-winner-list.3eee90af.chunk.css.map": "/mrstatic/css/prize-winner-list.3eee90af.chunk.css.map", "mrstatic/css/prize-winner-list.3eee90af.chunk.css.map": "/mrstatic/css/prize-winner-list.3eee90af.chunk.css.map",
"mrstatic/css/purchased.bb758677.chunk.css.map": "/mrstatic/css/purchased.bb758677.chunk.css.map", "mrstatic/css/purchased.bb758677.chunk.css.map": "/mrstatic/css/purchased.bb758677.chunk.css.map",
"mrstatic/css/python-class.49baf51f.chunk.css.map": "/mrstatic/css/python-class.49baf51f.chunk.css.map", "mrstatic/css/python-class.49baf51f.chunk.css.map": "/mrstatic/css/python-class.49baf51f.chunk.css.map",
...@@ -200,6 +200,6 @@ ...@@ -200,6 +200,6 @@
"mrstatic/media/iconfont.css": "/mrstatic/media/iconfont.e0655d4d.woff", "mrstatic/media/iconfont.css": "/mrstatic/media/iconfont.e0655d4d.woff",
"mrstatic/media/kanjia_cg_icon.png": "/mrstatic/media/kanjia_cg_icon.81a489ac.png", "mrstatic/media/kanjia_cg_icon.png": "/mrstatic/media/kanjia_cg_icon.81a489ac.png",
"mrstatic/media/video.scss": "/mrstatic/media/progress-share-bg.80011994.png", "mrstatic/media/video.scss": "/mrstatic/media/progress-share-bg.80011994.png",
"precache-manifest.0ca4aa4bdef7871e465741691162e962.js": "/precache-manifest.0ca4aa4bdef7871e465741691162e962.js", "precache-manifest.62a28e8f2ba15387c29044b8008070f2.js": "/precache-manifest.62a28e8f2ba15387c29044b8008070f2.js",
"service-worker.js": "/service-worker.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.
...@@ -12,8 +12,8 @@ self.__precacheManifest = [ ...@@ -12,8 +12,8 @@ self.__precacheManifest = [
"url": "/mrstatic/media/redb_chai_bj@2x.8edaf2ff.png" "url": "/mrstatic/media/redb_chai_bj@2x.8edaf2ff.png"
}, },
{ {
"revision": "85af7816c5eb5f30e7d5", "revision": "93b7a6edd926a4b6c892",
"url": "/mrstatic/js/2.d2b0d28a.chunk.js" "url": "/mrstatic/js/2.4f662d87.chunk.js"
}, },
{ {
"revision": "6902434f8f18a23319d57d0ac8aaea8c", "revision": "6902434f8f18a23319d57d0ac8aaea8c",
...@@ -80,16 +80,16 @@ self.__precacheManifest = [ ...@@ -80,16 +80,16 @@ self.__precacheManifest = [
"url": "/mrstatic/js/DrawDocument.c4b2272d.chunk.js" "url": "/mrstatic/js/DrawDocument.c4b2272d.chunk.js"
}, },
{ {
"revision": "7aa984cefad739ea18edb76c541aa1fd", "revision": "258b4b114d3d9be3018cd113b2470a13",
"url": "/mrstatic/media/iconfont.7aa984ce.eot" "url": "/mrstatic/media/iconfont.258b4b11.ttf"
}, },
{ {
"revision": "04e49bc7bb67ee64f72f", "revision": "04e49bc7bb67ee64f72f",
"url": "/mrstatic/js/Examination.2faca438.chunk.js" "url": "/mrstatic/js/Examination.2faca438.chunk.js"
}, },
{ {
"revision": "258b4b114d3d9be3018cd113b2470a13", "revision": "7aa984cefad739ea18edb76c541aa1fd",
"url": "/mrstatic/media/iconfont.258b4b11.ttf" "url": "/mrstatic/media/iconfont.7aa984ce.eot"
}, },
{ {
"revision": "da145daddd1676bb4acc", "revision": "da145daddd1676bb4acc",
...@@ -232,8 +232,8 @@ self.__precacheManifest = [ ...@@ -232,8 +232,8 @@ self.__precacheManifest = [
"url": "/mrstatic/js/myorders.f62839f5.chunk.js" "url": "/mrstatic/js/myorders.f62839f5.chunk.js"
}, },
{ {
"revision": "d1e4d9b1203838f80374", "revision": "982649dcc8070a3926f8",
"url": "/mrstatic/js/runtime~main.5ded5577.js" "url": "/mrstatic/js/runtime~main.e2fe9b29.js"
}, },
{ {
"revision": "dbbf205fa67bddfa43d4", "revision": "dbbf205fa67bddfa43d4",
...@@ -244,8 +244,8 @@ self.__precacheManifest = [ ...@@ -244,8 +244,8 @@ self.__precacheManifest = [
"url": "/mrstatic/js/python-class.1e8ab05e.chunk.js" "url": "/mrstatic/js/python-class.1e8ab05e.chunk.js"
}, },
{ {
"revision": "49f833a82b6032dbbb59", "revision": "b06a5fcb5cfc4dc9f1cb",
"url": "/mrstatic/js/newyear-yearIndex.f49a1017.chunk.js" "url": "/mrstatic/js/newyear-yearIndex.f5475c6c.chunk.js"
}, },
{ {
"revision": "66d0e13b76f15b9ac666", "revision": "66d0e13b76f15b9ac666",
...@@ -312,8 +312,8 @@ self.__precacheManifest = [ ...@@ -312,8 +312,8 @@ self.__precacheManifest = [
"url": "/mrstatic/css/newyear-2019-landing.6cf08b5e.chunk.css" "url": "/mrstatic/css/newyear-2019-landing.6cf08b5e.chunk.css"
}, },
{ {
"revision": "49f833a82b6032dbbb59", "revision": "b06a5fcb5cfc4dc9f1cb",
"url": "/mrstatic/css/newyear-yearIndex.3f3799ce.chunk.css" "url": "/mrstatic/css/newyear-yearIndex.c95a4c79.chunk.css"
}, },
{ {
"revision": "347b68e4678c1f58cf1d", "revision": "347b68e4678c1f58cf1d",
...@@ -436,11 +436,11 @@ self.__precacheManifest = [ ...@@ -436,11 +436,11 @@ self.__precacheManifest = [
"url": "/mrstatic/css/3.bf839917.chunk.css" "url": "/mrstatic/css/3.bf839917.chunk.css"
}, },
{ {
"revision": "85af7816c5eb5f30e7d5", "revision": "93b7a6edd926a4b6c892",
"url": "/mrstatic/css/2.628f7f46.chunk.css" "url": "/mrstatic/css/2.628f7f46.chunk.css"
}, },
{ {
"revision": "e9aeca842f8b8a7d952fe6e5d617caf2", "revision": "b2b10d2e85dda030e90536370d3987e2",
"url": "/index.html" "url": "/index.html"
} }
]; ];
\ No newline at end of file
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
importScripts("https://storage.googleapis.com/workbox-cdn/releases/3.6.3/workbox-sw.js"); importScripts("https://storage.googleapis.com/workbox-cdn/releases/3.6.3/workbox-sw.js");
importScripts( importScripts(
"/precache-manifest.0ca4aa4bdef7871e465741691162e962.js" "/precache-manifest.62a28e8f2ba15387c29044b8008070f2.js"
); );
workbox.clientsClaim(); workbox.clientsClaim();
......
...@@ -67,17 +67,18 @@ class YearCourse extends Component { ...@@ -67,17 +67,18 @@ class YearCourse extends Component {
} }
componentDidMount() { componentDidMount() {
this.getLength()
this.fetchBigCourse() this.fetchBigCourse()
this.fetchFreeCourse() this.fetchFreeCourse()
this.fetchGroupCourse() this.fetchGroupCourse()
// AI之路-基础 // AI之路-基础
this.fetchAICourse('one',false) this.fetchAICourse('one', false)
// AI之路-进阶 // AI之路-进阶
this.fetchAICourse('two',false) this.fetchAICourse('two', false)
// AI之路-高阶 // AI之路-高阶
this.fetchAICourse('three',false) this.fetchAICourse('three', false)
// AI之路-拓展 // AI之路-拓展
this.fetchAICourse('four',false) this.fetchAICourse('four', false)
} }
shouldComponentUpdate(nextProps, nextState, nextContext) { shouldComponentUpdate(nextProps, nextState, nextContext) {
...@@ -98,6 +99,19 @@ class YearCourse extends Component { ...@@ -98,6 +99,19 @@ class YearCourse extends Component {
return true return true
} }
getLength = () => {
let _this = this
http.get(`${API.home}/activity/wish_sum`).then(res => {
const {code, data} = res.data
if (code == 200) {
_this.setState({
sum: data.sum
})
this.props.getSum(_this.state.sum)
}
})
}
fetchBigCourse = () => { fetchBigCourse = () => {
const {bigcourse} = this.state const {bigcourse} = this.state
http.get(`${API.home}/activity/preheat_data`).then(res => { http.get(`${API.home}/activity/preheat_data`).then(res => {
...@@ -144,11 +158,11 @@ class YearCourse extends Component { ...@@ -144,11 +158,11 @@ class YearCourse extends Component {
}) })
} }
fetchAICourse = (key,addshowMore) => { fetchAICourse = (key, addshowMore) => {
http.get(`${API.home}/activity/four_stage/${key}`).then(res => { http.get(`${API.home}/activity/four_stage/${key}`).then(res => {
const {code, data} = res.data const {code, data} = res.data
if (code === 200) { if (code === 200) {
this.getList(key, data,addshowMore) this.getList(key, data, addshowMore)
} }
}) })
} }
...@@ -189,7 +203,7 @@ class YearCourse extends Component { ...@@ -189,7 +203,7 @@ class YearCourse extends Component {
this.setState({ this.setState({
expand: Object.assign({}, expand, { expand: Object.assign({}, expand, {
isMore: data.length > 4 && !addshowMore ? true : false, isMore: data.length > 4 && !addshowMore ? true : false,
course: data.length > 4&& !addshowMore ? data.filter((item, index) => index < 4) : data, course: data.length > 4 && !addshowMore ? data.filter((item, index) => index < 4) : data,
courseList: data, courseList: data,
addshowMore: addshowMore, addshowMore: addshowMore,
}) })
...@@ -338,17 +352,18 @@ class YearCourse extends Component { ...@@ -338,17 +352,18 @@ class YearCourse extends Component {
const {code, msg} = res.data const {code, msg} = res.data
if (code == 200) { if (code == 200) {
Toast.success('已成功加入心愿单', 3) Toast.success('已成功加入心愿单', 3)
_this.getLength()
if (key === '1') { if (key === '1') {
_this.fetchAICourse('one',_this.state.basic.addshowMore) _this.fetchAICourse('one', _this.state.basic.addshowMore)
} }
if (key === '2') { if (key === '2') {
_this.fetchAICourse('two',_this.state.advanced.addshowMore) _this.fetchAICourse('two', _this.state.advanced.addshowMore)
} }
if (key === '3') { if (key === '3') {
_this.fetchAICourse('three',_this.state.higher.addshowMore) _this.fetchAICourse('three', _this.state.higher.addshowMore)
} }
if (key === '4') { if (key === '4') {
_this.fetchAICourse('four',_this.state.expand.addshowMore) _this.fetchAICourse('four', _this.state.expand.addshowMore)
} }
if (key === 'group') { if (key === 'group') {
_this.fetchGroupCourse() _this.fetchGroupCourse()
......
...@@ -7,7 +7,13 @@ import TreasureNav from './nav' ...@@ -7,7 +7,13 @@ import TreasureNav from './nav'
import CommonPopup from './../common/commonPopup/index' import CommonPopup from './../common/commonPopup/index'
import cookie from "js-cookie" import cookie from "js-cookie"
import {setCurrentUser, startFetchUser} from "@/store/userAction" import {setCurrentUser, startFetchUser} from "@/store/userAction"
import {SendMessageToApp, getParam} from '@/utils'
import {addDays} from "date-fns" import {addDays} from "date-fns"
import {connect} from "react-redux"
@connect(state => ({
user: state.user
}))
export default class index extends Component { export default class index extends Component {
state = { state = {
...@@ -84,6 +90,26 @@ export default class index extends Component { ...@@ -84,6 +90,26 @@ export default class index extends Component {
}) })
} }
toYearWish = () => {
const isLogin = !this.props.user.hasError
if (isLogin) {
this.props.history.push('/year/yearWish')
} else {
if (!getParam('version')) {
this.props.history.push('/passport/login')
} else {
SendMessageToApp("toLogin")
}
}
}
sonToPar(e){
this.setState({
txt1:e
})
}
render() { render() {
const {banner} = this.state const {banner} = this.state
return ( return (
...@@ -96,12 +122,25 @@ export default class index extends Component { ...@@ -96,12 +122,25 @@ export default class index extends Component {
</div> </div>
<div className="banner-treasure__decorate"></div> <div className="banner-treasure__decorate"></div>
</div> </div>
{/*浮框*/}
<div className='nav-right'>
<a href="" className='nav-right__link'>
未拆宝箱
<i className="nav-right__number">2</i>
</a>
<a onClick={() => this.toYearWish()} className='nav-right__link'>
心愿单
<i className="nav-right__number">{this.state.txt1}</i>
</a>
</div>
{/* 大咖直播 */} {/* 大咖直播 */}
<LiveRoom/> <LiveRoom/>
{/* 组队开宝箱 */} {/* 组队开宝箱 */}
<TreasureBox/> <TreasureBox/>
<YearCourse isAppUpdate={this.state.isAppUpdate}/>
{/*课程*/}
<YearCourse isAppUpdate={this.state.isAppUpdate} getSum={this.sonToPar.bind(this)}/>
{/*好友加入队伍提醒;获得宝箱提醒;开售提醒弹窗,需要自取,注意修改文案*/} {/*好友加入队伍提醒;获得宝箱提醒;开售提醒弹窗,需要自取,注意修改文案*/}
{ {
......
...@@ -42,6 +42,7 @@ ...@@ -42,6 +42,7 @@
color: #666; color: #666;
margin: 13px 0; margin: 13px 0;
letter-spacing: 1px; letter-spacing: 1px;
i { i {
font-style: normal; font-style: normal;
color: #FF0000; color: #FF0000;
...@@ -57,8 +58,45 @@ ...@@ -57,8 +58,45 @@
margin-bottom: 5px; margin-bottom: 5px;
} }
} }
.nav-right {
width: 100px;
height: 125px;
background-image: url("https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/newyear20/H5/sd_fc_bj.png");
background-repeat: no-repeat;
background-size: cover;
position: fixed;
top: 50%;
right: 0;
margin-top: -57px;
z-index: 22;
.nav-right__link {
display: block;
position: relative;
font-size: 12px;
font-weight: 500;
color: #fff;
text-align: center;
top: 47px;
line-height: 25px;
}
.nav-right__number {
position: absolute;
top: -5px;
right: 5px;
padding: 0 5px;
border: 1px solid #F7D067;
border-radius: 7px 7px 7px 0px;
font-size: 12px;
font-style: normal;
color: #FEE41D;
background-color: #FF4F24;
height: 16px;
line-height: 14px;
}
}
} }
.year-index + .year19-index{ .year-index + .year19-index {
display: none; display: none;
} }
\ No newline at end of file
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