Commit 11465701 by FE

Merge branch '00' into pre

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