Commit d669b678 by wangshuo

合并master

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