Commit f0a0d703 by zhanghaozhe

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

parents c1c3550f 207a67c8
......@@ -2,12 +2,13 @@ import React, { Component } from 'react'
import './togroup.scss'
import { HeaderBar, VList } from '../../../common'
import { api, getParam, http, browser} from "@/utils";
import { getParam, http, browser} from "@/utils";
import { connect } from "react-redux"
import { Link } from "react-router-dom"
import { WingBlank, WhiteSpace, Flex, Toast } from 'antd-mobile'
import {getCourses} from './../../detail/actions';
@connect()
class ToGroup extends Component {
constructor(props) {
super(props)
......
......@@ -38,7 +38,8 @@ class Detail extends Component {
this.props.getCourses();
}
const { courseInfo } = this.props;
if(courseInfo.is_bargain) {
console.log(this.props);
if(courseInfo.course_info.is_bargain) {
this.getBargainInfo();
}
}
......
......@@ -7,10 +7,14 @@ import {WithTab} from '@/HOCs'
import {Link} from "react-router-dom"
import {connect} from "react-redux"
import {HeaderBar} from "@/common"
import {getCourses} from './../detail/actions';
const Item = List.Item;
const Brief = Item.Brief;
@connect(state => ({
user: state.user
}))
class My extends PureComponent {
constructor(props) {
super(props)
......@@ -24,6 +28,14 @@ class My extends PureComponent {
this.props.history.push('/passport')
}
toCourseDetail = (id) => {
const { dispatch, history } = this.props;
dispatch(getCourses(id, () => {
history.push(`/detail?id=${id}`);
return false;
}));
}
render() {
const {user} = this.props
const uid = user && user.data && user.data.uid
......@@ -64,7 +76,8 @@ class My extends PureComponent {
</Link>
{
(isVIP === 0 || !isVIP) &&
<Link className="my-isvip" to={`/detail?id=139`}></Link>
<a href="javascript:;" className="my-isvip" onClick={() => this.toCourseDetail(139)}></a>
// <Link className="my-isvip" to={`/detail?id=139`}></Link>
}
</List>
}
......@@ -127,7 +140,4 @@ class My extends PureComponent {
}
export default connect(
state => ({user: state.user}),
null
)(WithTab(My))
export default WithTab(My);
......@@ -127,7 +127,7 @@ class Order extends Component {
if(res.data.errno === 200) {
sessionStorage.removeItem('orderUseCacheObj');
if (res.data.data.pay_jump === 1) {
this.props.history.push(`/togroup?id=${res.data.data.order_id}`);
this.props.history.push(`/togroup?id=${res.data.data.oid}`);
return;
}
this.props.history.replace(`/payorder?oid=${res.data.data.oid}`);
......
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