Commit 11465701 by FE

Merge branch '00' into pre

parents 9ab6492a 1601c3e8
......@@ -8,10 +8,9 @@ import CreateSuccess from './../common/createSuccess/index';
import TreasureTeam from './team';
import PrizeStatus from './prize';
import SplitSuccess from './../common/splitSuccess/index';
import { http, getParam } from '@/utils';
import { http, getParam, SendMessageToApp } from '@/utils';
import Mask from './mask';
import './index.scss';
import { split } from 'react-ace';
@connect(({country, user}) => ({
country,
......@@ -357,25 +356,41 @@ class MyTreasure extends Component {
// 奖品,代金券碎片--合成
toComposeCoupon = () => {
const { history } = this.props;
history.push('/coupons/my-patch');
if(getParam('version')) {
SendMessageToApp("toCoupon")
}else {
history.push('/coupons/my-patch');
}
}
// 奖品,指定课程代金券--使用
toUseCoupon = (id) => {
const { history } = this.props;
history.push(`/detail?id=${id}`);
if(getParam('version')) {
SendMessageToApp("toCourse", id)
}else {
history.push(`/detail?id=${id}`);
}
}
// 第三:奖品,通用课程代金券--使用
toCourseList = () => {
const { history } = this.props;
history.push('/classify');
if(getParam('version')) {
SendMessageToApp('toQualityCourse')
}else {
history.push('/classify');
}
}
// 第三:奖品,现金红包--提现
toFecthMoney = () => {
const { history } = this.props;
history.push('/scholarship');
if(getParam('version')) {
SendMessageToApp('toAccount')
}else {
history.push('/scholarship');
}
}
// 弹窗--隐藏
......
......@@ -87,6 +87,8 @@ class YearCourse extends Component {
shouldComponentUpdate(nextProps, nextState, nextContext) {
if (this.props.isAppUpdate !== nextProps.isAppUpdate) {
this.getTeamInfo()
this.getLength()
this.fetchBigCourse()
this.fetchFreeCourse()
this.fetchGroupCourse()
......@@ -414,7 +416,11 @@ class YearCourse extends Component {
search = `?id=${currentId}`
}
if (isLogin) {
this.props.history.push(`/year/yearTreasure${search}`)
if (!getParam('version')) {
this.props.history.push(`/year/yearTreasure${search}`)
} else {
this.props.history.push(`/year/yearTreasure${search}?version=${getParam('version')}`)
}
} else {
this.toLogin()
}
......
......@@ -64,9 +64,12 @@ class TeamInfo extends Component {
search = `?id=${current.id}`;
}
}
this.props.history.push(`/year/yearTreasure${search}`);
if (!getParam('version')) {
this.props.history.push(`/year/yearTreasure${search}`);
} else {
this.props.history.push(`/year/yearTreasure${search}?version=${getParam('version')}`);
}
}
}
// 去登录
......
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