Commit cc3fd630 by FE

build conflict

parents 4e879b33 ef91ba3d
......@@ -5,7 +5,7 @@ import { connect } from "react-redux";
import { setCurrentUser, startFetchUser } from "@/store/userAction";
import { withRouter } from 'react-router-dom'
import { compose } from 'redux'
import { getParam, http } from "@/utils";
import { getParam, http, browser } from "@/utils";
import { Toast } from "antd-mobile";
import { addDays } from 'date-fns'
......@@ -41,6 +41,10 @@ class App extends Component {
//平台信息
cookie.set('plat', '5', {domain: '.julyedu.com'})
if (browser.isWeixin && browser.isIOS) {
sessionStorage.setItem('enter_url', window.location.href)
}
this.props.startFetchUser()
http.get(`${API.home}/m/user_info`).then(res => {
this.props.setCurrentUser(this.transformUser(res))
......@@ -51,7 +55,7 @@ class App extends Component {
history.listen(location => {
const {pathname} = location
if (pathname.startsWith('/passport')) {
if(routeMatchRule.test(pathname)){
if (routeMatchRule.test(pathname)) {
return
}
location.state = {from: this.previousLocation};
......
......@@ -46,12 +46,14 @@ class Detail extends Component {
}
componentDidMount() {
if(browser.isWeixin){
wxShare({
title: `课程详情页`,
desc: `课程详情页`,
link: encodeURI(location.origin + '/detail?id=' + getParam('id')),
imgUrl: ''
});
link: location.href,
imgUrl: `${location.origin}/favicon.ico`
})
}
this.fetchCourseInfo();
const { location: { state = {} } } = this.props;
......@@ -472,7 +474,6 @@ class Detail extends Component {
title='课程详情'
arrow={true}
cart={true}
toHref={href}
/>
<CallApp className='toapp' />
......
......@@ -35,6 +35,7 @@ class CampResolve extends Component {
this.body = document.getElementsByTagName('body')[0];
this.body.style.position = 'static';
} else {
<<<<<<< HEAD
const { history, location: { state={} } } = this.props;
let to = '';
if(state.from && state.from.indexOf('video') !== -1) {
......@@ -50,6 +51,9 @@ class CampResolve extends Component {
to
}
);
=======
this.props.history.push(`${this.props.location.state.from}`,{href: '/purchased'})
>>>>>>> ef91ba3d8a0a94933546e5e626e4683a35469b0d
}
};
componentDidMount() {
......
......@@ -71,6 +71,7 @@ class CampTest extends Component {
this.body = document.getElementsByTagName('body')[0];
this.body.style.position = 'static';
} else {
<<<<<<< HEAD
const { history, location: { state={} } } = this.props;
let to = '';
if(state.from && state.from.indexOf('video') !== -1) {
......@@ -86,6 +87,9 @@ class CampTest extends Component {
to
}
);
=======
this.props.history.push(`${this.props.location.state.from}`,{href: '/classify'})
>>>>>>> ef91ba3d8a0a94933546e5e626e4683a35469b0d
}
};
// 选择答案
......
......@@ -35,6 +35,7 @@ class VideoCatalog extends Component {
</div>
{
(item.practice && item.practice.qid)
<<<<<<< HEAD
? <Link
to={{
pathname: item.practice.is_tested ? '/campResolve' : '/campTest',
......@@ -44,6 +45,13 @@ class VideoCatalog extends Component {
}
}}
>
=======
? <Link to={{
pathname: item.practice.is_tested ? '/campResolve' : '/campTest',
search: `?keshi_id=${item.id}&qid=${item.practice.qid}`,
state: {from: `/play/video${window.location.search}`}
}}>
>>>>>>> ef91ba3d8a0a94933546e5e626e4683a35469b0d
<div className="exercise">
课后练习:{item.practice.title}
<i className={classnames('iconfont',!item.video_auth ? 'iconiconfront-74' : item.practice.is_tested ? 'iconiconfront-3' : '')}/>
......
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