Commit 848b2bb2 by FE

hot val in invite

parent b2acdcdc
......@@ -12,7 +12,7 @@ class Activity extends Component {
componentWillMount() {
jsCookie.set('blessing_invite_uid', getParam('shareuid'));
jsCookie.set('blessing_invite_code', getParam('code'));
jsCookie.set('blessing_invite_code', getParam('inviteCode'));
}
getGift = () => {
......
......@@ -24,7 +24,7 @@ class Invite extends Component {
if(uid === shareuid) {
} else {
if(getParam('new')) {
this.props.history.push(`/activity?shareuid=${shareuid}&code=${inviteCode}`);
this.props.history.push(`/activity?shareuid=${shareuid}&inviteCode=${inviteCode}`);
}
}
}
......@@ -90,14 +90,14 @@ class Invite extends Component {
history.push('/passport');
}else {
http.get(`${API.home}/sys/user/invite/link`).then(res => {
let {code, data, msg} = res;
let {code, data, msg} = res.data;
if(code === 200) {
let inviteCode = data.blessing_invite_code;
if(is_weixin()) {
wxShare({
title: 'AI充电节,积福气享1折秒课,超10万元奖品来就送!!',
desc: '把这门超5万人报名的【Python基础入门 升级版】课程送给你,附200元红包,请笑纳!--七月在线',
link: encodeURI(location.origin + `/invite?shareuid=${jsCookie.get('uid')}&new=1&code=${inviteCode}`),
link: encodeURI(location.origin + `/invite?shareuid=${jsCookie.get('uid')}&new=1&inviteCode=${inviteCode}`),
imgUrl: 'https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/active19_1111/m/index-share-img.png',
});
this.setState({
......@@ -105,11 +105,13 @@ class Invite extends Component {
isWeiXin: true,
});
}else{
history.replaceState(null,null,`invite?shareuid=${jsCookie.get('uid')}&new=1&code=${inviteCode}`)
history.push(`/invite?shareuid=${jsCookie.get('uid')}&new=1&inviteCode=${inviteCode}`)
this.setState({
showTip: true,
});
}
}else if(code === 4030 || code === 4040) {
history.push('/passport');
}else{
Toast.info(msg, 2);
}
......
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