Commit d669b678 by wangshuo

合并master

parents e18d5e04 1670e3e8
...@@ -14,7 +14,11 @@ ...@@ -14,7 +14,11 @@
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(
<<<<<<< HEAD
"/precache-manifest.24de3a7f1901319e314914a540e9db15.js" "/precache-manifest.24de3a7f1901319e314914a540e9db15.js"
=======
"/precache-manifest.abe621760f8f2b29b2d7a83410923ff7.js"
>>>>>>> master
); );
workbox.clientsClaim(); workbox.clientsClaim();
......
...@@ -633,3 +633,8 @@ ...@@ -633,3 +633,8 @@
height: 8px; height: 8px;
background-color: #F3F4F8; background-color: #F3F4F8;
} }
.index-box ~ .year19-index {
display: none;
}
\ No newline at end of file
...@@ -221,7 +221,7 @@ class YearCourse extends Component { ...@@ -221,7 +221,7 @@ class YearCourse extends Component {
toQQque = () => { toQQque = () => {
if (!getParam('version')) { if (!getParam('version')) {
qimoChatClick() location.href = 'http://q.url.cn/s/Vbkup6m?_type=wpa'
} else { } else {
SendMessageToApp("toQQ", 'https://q.url.cn/AB8aue?_type=wpa&qidian=true') SendMessageToApp("toQQ", 'https://q.url.cn/AB8aue?_type=wpa&qidian=true')
} }
......
...@@ -43,7 +43,7 @@ class Landing extends Component { ...@@ -43,7 +43,7 @@ class Landing extends Component {
this.fetchPageData() this.fetchPageData()
this.getIndexData() this.getIndexData()
window.showFollowAlert = this.remind.bind(this, 'create') window.showFollowAlert = this.remind.bind(this, 'create')
document.title = 'AI充电季,开宝箱免费学AI爆款好课,300本程序员必备纸质书免费送,AI进阶宝典来就送!-七月在线' document.title = 'AI就业季,开宝箱免费拿VIP年会员,200本程序员必备纸质书免费包邮送!- 七月在线'
const landing = document.querySelector('#landing') const landing = document.querySelector('#landing')
const boxContainer = document.querySelector('.box-container') const boxContainer = document.querySelector('.box-container')
if (boxContainer.offsetHeight < window.innerHeight) { if (boxContainer.offsetHeight < window.innerHeight) {
...@@ -89,7 +89,7 @@ class Landing extends Component { ...@@ -89,7 +89,7 @@ class Landing extends Component {
http.get(`${API.home}/activity/stage`).then(res => { http.get(`${API.home}/activity/stage`).then(res => {
const {code, data, msg} = res.data const {code, data, msg} = res.data
if (code === 200) { if (code === 200) {
if (Number(data.activity_stage) === 0) { if (Number(data.treasure_stage) === 0) {
this.props.history.push('/'); this.props.history.push('/');
return; return;
} }
......
...@@ -43,7 +43,7 @@ class MyTreasure extends Component { ...@@ -43,7 +43,7 @@ class MyTreasure extends Component {
componentDidMount() { componentDidMount() {
this.fetchMyTreasure() this.fetchMyTreasure()
this.fetchActivityStatus() this.fetchActivityStatus()
document.title = 'AI充电季,开宝箱免费学AI爆款好课,300本程序员必备纸质书免费送,AI进阶宝典来就送!-七月在线'; document.title = 'AI就业季,开宝箱免费拿VIP年会员,200本程序员必备纸质书免费包邮送!- 七月在线';
} }
componentWillReceiveProps(nextProp) { componentWillReceiveProps(nextProp) {
...@@ -309,7 +309,7 @@ class MyTreasure extends Component { ...@@ -309,7 +309,7 @@ class MyTreasure extends Component {
http.get(`${API.home}/activity/stage`).then(res => { http.get(`${API.home}/activity/stage`).then(res => {
const {code, data} = res.data const {code, data} = res.data
if (code === 200) { if (code === 200) {
if(Number(data.activity_stage) === 0) { if(Number(data.treasure_stage) === 0) {
this.props.history.push('/'); this.props.history.push('/');
return; return;
} }
......
...@@ -221,7 +221,7 @@ class YearCourse extends Component { ...@@ -221,7 +221,7 @@ class YearCourse extends Component {
toQQque = () => { toQQque = () => {
if (!getParam('version')) { if (!getParam('version')) {
qimoChatClick() location.href = 'http://q.url.cn/s/Vbkup6m?_type=wpa'
} else { } else {
SendMessageToApp("toQQ", 'https://q.url.cn/AB8aue?_type=wpa&qidian=true') SendMessageToApp("toQQ", 'https://q.url.cn/AB8aue?_type=wpa&qidian=true')
} }
......
...@@ -39,7 +39,7 @@ export default class index extends Component { ...@@ -39,7 +39,7 @@ export default class index extends Component {
_this.loginInfo(result) _this.loginInfo(result)
} }
_this.getStage() _this.getStage()
document.title = 'AI充电季,开宝箱免费学AI爆款好课,300本程序员必备纸质书免费送,AI进阶宝典来就送!-七月在线'; document.title = 'AI就业季,开宝箱免费拿VIP年会员,200本程序员必备纸质书免费包邮送!- 七月在线';
} }
// 获取app登录数据 // 获取app登录数据
...@@ -110,7 +110,7 @@ export default class index extends Component { ...@@ -110,7 +110,7 @@ export default class index extends Component {
http.get(`${API.home}/activity/stage`).then(res => { http.get(`${API.home}/activity/stage`).then(res => {
const {code, data, msg} = res.data const {code, data, msg} = res.data
if (code === 200) { if (code === 200) {
if(Number(data.activity_stage) === 0) { if(Number(data.treasure_stage) === 0) {
this.props.history.push('/'); this.props.history.push('/');
return; return;
} }
......
...@@ -23,9 +23,9 @@ class YarnWish extends Component { ...@@ -23,9 +23,9 @@ class YarnWish extends Component {
componentWillUpdate() { componentWillUpdate() {
const {activityStage} = this.state const {activityStage} = this.state
if (activityStage == 1) { if (activityStage == 1) {
document.title = `七月在线年终大回馈,人气好课免费学,精品课程1分抢!` document.title = `AI就业季,开宝箱免费拿VIP年会员,200本程序员必备纸质书免费包邮送!- 七月在线`
} else { } else {
document.title = `七月在线年终大回馈,人气好课免费学,精品课程1分抢!` document.title = `AI就业季,开宝箱免费拿VIP年会员,200本程序员必备纸质书免费包邮送!- 七月在线`
} }
} }
......
...@@ -313,10 +313,6 @@ class BtnStatus extends Component { ...@@ -313,10 +313,6 @@ class BtnStatus extends Component {
}); });
} }
qimoChatClick = () => {
qimoChatClick()
}
render() { render() {
// data 课程信息;barInfo 砍价信息 // data 课程信息;barInfo 砍价信息
const {user = {}, toCart, country} = this.props; const {user = {}, toCart, country} = this.props;
...@@ -355,7 +351,7 @@ class BtnStatus extends Component { ...@@ -355,7 +351,7 @@ class BtnStatus extends Component {
{ {
info.is_baoming === 0 && info.group_status !== 3 && info.is_baoming === 0 && info.group_status !== 3 &&
<div className='btns-box'> <div className='btns-box'>
<a className='consult consult-s' onClick={() => this.qimoChatClick()}> <a className='consult consult-s' href='http://q.url.cn/s/Vbkup6m?_type=wpa'>
<i className='iconfont iconerji'></i> <i className='iconfont iconerji'></i>
<span>课程咨询</span> <span>课程咨询</span>
</a> </a>
...@@ -376,7 +372,7 @@ class BtnStatus extends Component { ...@@ -376,7 +372,7 @@ class BtnStatus extends Component {
{ {
info.is_baoming === 0 && info.is_deposit != 0 && info.is_baoming === 0 && info.is_deposit != 0 &&
<div className='btns-box'> <div className='btns-box'>
<a className='consult consult-m' onClick={() => this.qimoChatClick()}> <a className='consult consult-m' href='http://q.url.cn/s/Vbkup6m?_type=wpa'>
<i className='iconfont iconerji'/> <i className='iconfont iconerji'/>
<span>课程咨询</span> <span>课程咨询</span>
</a> </a>
...@@ -390,7 +386,7 @@ class BtnStatus extends Component { ...@@ -390,7 +386,7 @@ class BtnStatus extends Component {
{ {
info.is_baoming === 1 && info.is_baoming === 1 &&
<div className='btns-box'> <div className='btns-box'>
<a className='consult consult-m' onClick={() => this.qimoChatClick()}> <a className='consult consult-m' href='http://q.url.cn/s/Vbkup6m?_type=wpa'>
<i className='iconfont iconerji'/> <i className='iconfont iconerji'/>
<span>课程咨询</span> <span>课程咨询</span>
</a> </a>
...@@ -403,7 +399,7 @@ class BtnStatus extends Component { ...@@ -403,7 +399,7 @@ class BtnStatus extends Component {
{ {
info.is_baoming === 0 && info.group_status === 3 && info.is_baoming === 0 && info.group_status === 3 &&
<div className='btns-box'> <div className='btns-box'>
<a className='consult consult-s' onClick={() => this.qimoChatClick()}> <a className='consult consult-s' href='http://q.url.cn/s/Vbkup6m?_type=wpa'>
<i className='iconfont iconerji'></i> <i className='iconfont iconerji'></i>
<span>课程咨询</span> <span>课程咨询</span>
</a> </a>
...@@ -424,7 +420,7 @@ class BtnStatus extends Component { ...@@ -424,7 +420,7 @@ class BtnStatus extends Component {
{ {
info.is_baoming === 0 && info.group_status === 4 && info.is_baoming === 0 && info.group_status === 4 &&
<div className='btns-box'> <div className='btns-box'>
<a className='consult consult-s' onClick={() => this.qimoChatClick()}> <a className='consult consult-s' href='http://q.url.cn/s/Vbkup6m?_type=wpa'>
<i className='iconfont iconerji'></i> <i className='iconfont iconerji'></i>
<span>课程咨询</span> <span>课程咨询</span>
</a> </a>
...@@ -438,7 +434,7 @@ class BtnStatus extends Component { ...@@ -438,7 +434,7 @@ class BtnStatus extends Component {
{ {
info.is_baoming === 0 && this.props.data && this.props.data.is_bargain && info.is_baoming === 0 && this.props.data && this.props.data.is_bargain &&
<div className='btns-box'> <div className='btns-box'>
<a className='consult consult-s' onClick={() => this.qimoChatClick()}> <a className='consult consult-s' href='http://q.url.cn/s/Vbkup6m?_type=wpa'>
<i className='iconfont iconerji'></i> <i className='iconfont iconerji'></i>
<span>课程咨询</span> <span>课程咨询</span>
</a> </a>
...@@ -466,7 +462,7 @@ class BtnStatus extends Component { ...@@ -466,7 +462,7 @@ class BtnStatus extends Component {
{ {
this.state.isbuy === 20 && this.state.isbuy === 20 &&
<div className='btns-box'> <div className='btns-box'>
<a className='consult-l' onClick={() => this.qimoChatClick()}> <a className='consult-l' href='http://q.url.cn/s/Vbkup6m?_type=wpa'>
<i className='iconfont iconerji'></i> <i className='iconfont iconerji'></i>
<span>课程咨询</span> <span>课程咨询</span>
</a> </a>
...@@ -477,7 +473,7 @@ class BtnStatus extends Component { ...@@ -477,7 +473,7 @@ class BtnStatus extends Component {
{ {
(info.is_aist && (this.props.user.hasError || info.is_baoming === 0)) && (info.is_aist && (this.props.user.hasError || info.is_baoming === 0)) &&
<div className='btns-box'> <div className='btns-box'>
<a className='consult consult-m' onClick={() => this.qimoChatClick()}> <a className='consult consult-m' href='http://q.url.cn/s/Vbkup6m?_type=wpa'>
<i className='iconfont iconerji'></i> <i className='iconfont iconerji'></i>
<span>课程咨询</span> <span>课程咨询</span>
</a> </a>
...@@ -491,7 +487,7 @@ class BtnStatus extends Component { ...@@ -491,7 +487,7 @@ class BtnStatus extends Component {
{ {
info.is_aist && !this.props.user.hasError && info.is_baoming === 1 && info.is_aist && !this.props.user.hasError && info.is_baoming === 1 &&
<div className='btns-box'> <div className='btns-box'>
<a className='consult consult-m' onClick={() => this.qimoChatClick()}> <a className='consult consult-m' href='http://q.url.cn/s/Vbkup6m?_type=wpa'>
<i className='iconfont iconerji'></i> <i className='iconfont iconerji'></i>
<span>课程咨询</span> <span>课程咨询</span>
</a> </a>
...@@ -531,7 +527,7 @@ class BtnStatus extends Component { ...@@ -531,7 +527,7 @@ class BtnStatus extends Component {
* limit_free_status: 0 未领取 1已领取未过期 2已过期 * limit_free_status: 0 未领取 1已领取未过期 2已过期
* */ * */
info.is_baoming === 0 && info.is_limit_free && info.limit_free_status == 0 && <div className='btns-box'> info.is_baoming === 0 && info.is_limit_free && info.limit_free_status == 0 && <div className='btns-box'>
<a className='consult consult-m' onClick={() => this.qimoChatClick()}> <a className='consult consult-m' href='http://q.url.cn/s/Vbkup6m?_type=wpa'>
<i className='iconfont iconerji'></i> <i className='iconfont iconerji'></i>
<span>课程咨询</span> <span>课程咨询</span>
</a> </a>
......
...@@ -50,6 +50,7 @@ class Detail extends Component { ...@@ -50,6 +50,7 @@ class Detail extends Component {
isRedPacket: true, isRedPacket: true,
countDownTime: '20s', countDownTime: '20s',
isShowChannel: window.sessionStorage.getItem('isShowSiteWindowByChannel')
} }
} }
...@@ -78,7 +79,6 @@ class Detail extends Component { ...@@ -78,7 +79,6 @@ class Detail extends Component {
if (getParam('ac') && Number(getParam('ac')) === 11) { if (getParam('ac') && Number(getParam('ac')) === 11) {
this.getBorwerCourse(); this.getBorwerCourse();
} }
} }
getBorwerCourse = () => { getBorwerCourse = () => {
...@@ -575,7 +575,11 @@ class Detail extends Component { ...@@ -575,7 +575,11 @@ class Detail extends Component {
<ExpandActiveToast/> <ExpandActiveToast/>
<CallApp className='toapp' path={`/detail/id=${getParam('id')}`}/> {
this.state.isShowChannel == 1 &&
<CallApp className='toapp' path={`/detail/id=${getParam('id')}`}/>
}
{/*弹幕*/} {/*弹幕*/}
<Barrage isShow={course_info.is_show}/> <Barrage isShow={course_info.is_show}/>
......
...@@ -28,7 +28,8 @@ class PythonDes extends Component { ...@@ -28,7 +28,8 @@ class PythonDes extends Component {
toApp: false, toApp: false,
payMoney: 0, payMoney: 0,
isOnline: true, //课程是否上架 isOnline: true, //课程是否上架
courseInfo: {} courseInfo: {},
isShowChannel: window.sessionStorage.getItem('isShowSiteWindowByChannel')
} }
} }
...@@ -219,9 +220,10 @@ class PythonDes extends Component { ...@@ -219,9 +220,10 @@ class PythonDes extends Component {
) )
} }
<CallApp className='toapp'/> {
this.state.isShowChannel == 1 &&
<CallApp className='toapp'/>
}
{/* 课程介绍 */} {/* 课程介绍 */}
<Description/> <Description/>
......
...@@ -14,7 +14,9 @@ class PythonStudy extends Component { ...@@ -14,7 +14,9 @@ class PythonStudy extends Component {
toApp: false, toApp: false,
courseInfo: '', courseInfo: '',
syllabus: '', syllabus: '',
learning: '' learning: '',
isShowChannel: window.sessionStorage.getItem('isShowSiteWindowByChannel')
}; };
} }
...@@ -112,7 +114,10 @@ class PythonStudy extends Component { ...@@ -112,7 +114,10 @@ class PythonStudy extends Component {
</div> </div>
} }
<CallApp className='toapp'/> {
this.state.isShowChannel == 1 &&
<CallApp className='toapp'/>
}
</div> </div>
{ {
......
...@@ -71,6 +71,21 @@ class Login extends Component { ...@@ -71,6 +71,21 @@ class Login extends Component {
history.push('/passport/student-login') history.push('/passport/student-login')
} }
componentDidMount() {
const {location} = this.props
const {action} = this.props.history
let pathname = location.state && location.state.from && location.state.from.pathname
let search = location.state && location.state.from && location.state.from.search
console.log(action,pathname,search);
if(action !== 'POP'){
let historyUrl = `${pathname}${search}`
window.localStorage.setItem('HistoryUrl',historyUrl)
}
}
render() { render() {
const { const {
loginWays, loginWays,
...@@ -122,7 +137,7 @@ class Login extends Component { ...@@ -122,7 +137,7 @@ class Login extends Component {
onVerify={this.onVerify} onVerify={this.onVerify}
/> />
<LoginButton active={values.tel && values.veriCode && isEmpty(errors)}/> <LoginButton active={values.tel && values.veriCode && isEmpty(errors)}/>
{/* 助学计划 */} {/* 助学计划 */}
<div className="student-root"> <div className="student-root">
<a className="student-root__button" onClick={this.toStudentRegister}>助学计划</a> <a className="student-root__button" onClick={this.toStudentRegister}>助学计划</a>
......
...@@ -15,6 +15,35 @@ import { connect } from "react-redux" ...@@ -15,6 +15,35 @@ import { connect } from "react-redux"
import { setCurrentUser } from '@/store/userAction' import { setCurrentUser } from '@/store/userAction'
class SetPassword extends Component { class SetPassword extends Component {
toFrom = () => {
let historyUrl = window.localStorage.getItem('HistoryUrl')
const {history} = this.props
history.push(historyUrl)
// window.localStorage.removeItem('HistoryUrl')
return
}
//
// componentDidMount() {
// const {location} = this.props
// const {action} = this.props.history
// let pathname = location.state && location.state.from && location.state.from.pathname
// let search = location.state && location.state.from && location.state.from.search
//
// console.log(location);
// console.log(location.state);
// console.log(action,pathname,search);
//
// // if(action !== 'PUSH'){
// // let historyUrl = `${pathname}${search}`
// // window.localStorage.setItem('HistoryUrl',historyUrl)
// // }
//
// }
render() { render() {
let {values, errors, location} = this.props let {values, errors, location} = this.props
let {from} = location.state || {from: {pathname: '/'}} let {from} = location.state || {from: {pathname: '/'}}
...@@ -52,7 +81,7 @@ class SetPassword extends Component { ...@@ -52,7 +81,7 @@ class SetPassword extends Component {
</Form> </Form>
<div className="skip" <div className="skip"
style={{display: from && from.pathname.includes('forgot-password') ? 'none' : 'block'}}> style={{display: from && from.pathname.includes('forgot-password') ? 'none' : 'block'}}>
<Link replace to='/passport/account-login'>跳过</Link> <span onClick={this.toFrom}>跳过</span>
</div> </div>
</div> </div>
</> </>
...@@ -68,7 +97,6 @@ const formikConfig = { ...@@ -68,7 +97,6 @@ const formikConfig = {
} }
}, },
handleSubmit: (values, {props}) => { handleSubmit: (values, {props}) => {
const {location} = props const {location} = props
let from = location.state && location.state.records && location.state.records[location.state.records.length - 2] || {pathname: '/'} let from = location.state && location.state.records && location.state.records[location.state.records.length - 2] || {pathname: '/'}
...@@ -108,7 +136,7 @@ function forgotPasswordReset(values, props) { ...@@ -108,7 +136,7 @@ function forgotPasswordReset(values, props) {
if (res.data.errno == 200) { if (res.data.errno == 200) {
Toast.info('密码设置成功') Toast.info('密码设置成功')
setTimeout(function () { setTimeout(function () {
props.history.replace('/passport/account-login') props.history.replace('/passport/account-login')
}, 1000) }, 1000)
} else { } else {
Toast.info(res.data.msg, 2, null, false) Toast.info(res.data.msg, 2, null, false)
...@@ -117,7 +145,6 @@ function forgotPasswordReset(values, props) { ...@@ -117,7 +145,6 @@ function forgotPasswordReset(values, props) {
} }
function bindMobileSetPassword(values, props) { function bindMobileSetPassword(values, props) {
http.post(`${API['passport-api']}/bind_mobile/set_pwd_new`, { http.post(`${API['passport-api']}/bind_mobile/set_pwd_new`, {
uid: props.user.data.uid, uid: props.user.data.uid,
password: encrypt(values.password) password: encrypt(values.password)
...@@ -128,10 +155,21 @@ function bindMobileSetPassword(values, props) { ...@@ -128,10 +155,21 @@ function bindMobileSetPassword(values, props) {
Toast.info('密码设置成功') Toast.info('密码设置成功')
let from = location.state && location.state.from || {pathname: '/'} let from = location.state && location.state.from || {pathname: '/'}
let local_redirect_url = JSON.parse(window.localStorage.getItem('binding_redirect')) let local_redirect_url = JSON.parse(window.localStorage.getItem('binding_redirect'))
setTimeout(function () {
if (local_redirect_url) { // setTimeout(function () {
const {pathname, search, hash} = local_redirect_url // if (local_redirect_url) {
history.replace(pathname + search + hash) // const {pathname, search, hash} = local_redirect_url
// history.replace(pathname + search + hash)
// } else {
// history.replace(from.pathname)
// }
// }, 1000)
let HistoryUrl = window.localStorage.getItem('HistoryUrl')
setTimeout(()=> {
if (HistoryUrl) {
let historyUrl = window.localStorage.getItem('HistoryUrl')
props.history.push(historyUrl)
} else { } else {
history.replace(from.pathname) history.replace(from.pathname)
} }
......
...@@ -15,7 +15,8 @@ class PythonStudy extends Component { ...@@ -15,7 +15,8 @@ class PythonStudy extends Component {
toApp: false, toApp: false,
courseInfo: '', courseInfo: '',
syllabus: '', syllabus: '',
learning: '' learning: '',
isShowChannel: window.sessionStorage.getItem('isShowSiteWindowByChannel')
}; };
} }
...@@ -115,7 +116,10 @@ class PythonStudy extends Component { ...@@ -115,7 +116,10 @@ class PythonStudy extends Component {
</div> </div>
} }
<CallApp className={'toapp'}/> {
this.state.isShowChannel == 1 &&
<CallApp className='toapp'/>
}
<Accordion <Accordion
defaultActiveKey="0" defaultActiveKey="0"
......
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