Commit 9e6683ea by FE

share add utm

parent e0942347
import React, { Component } from 'react'; import React, { Component } from 'react';
import { connect } from 'react-redux'; import { connect } from 'react-redux';
import { Link } from 'react-router-dom'; import { Link } from 'react-router-dom';
import { http } from '@/utils'; import { http, getParam } from '@/utils';
import { Toast } from "antd-mobile"; import { Toast } from "antd-mobile";
import ListFrame from './../listFrame/index'; import ListFrame from './../listFrame/index';
import ListHeader from './../listHeader'; import ListHeader from './../listHeader';
...@@ -60,7 +60,7 @@ class CollectBlessing extends Component { ...@@ -60,7 +60,7 @@ class CollectBlessing extends Component {
if(!uid) { if(!uid) {
history.push('/passport'); history.push('/passport');
}else { }else {
history.push('/blessingPreheat?utm_source=1&utm_medium=1&utm_campaign=11&utm_content=1&utm_term=1'); history.push('/blessingPreheat?utm_source=qq&utm_medium=11&utm_campaign=QQ11&utm_content=11&utm_term=11')
this.fetchUserBlessing(3, () => { this.fetchUserBlessing(3, () => {
this.handleToAddBlessing(3); this.handleToAddBlessing(3);
}); });
...@@ -72,13 +72,25 @@ class CollectBlessing extends Component { ...@@ -72,13 +72,25 @@ class CollectBlessing extends Component {
if(!uid) { if(!uid) {
history.push('/passport'); history.push('/passport');
}else { }else {
history.push('/blessingPreheat?utm_source=q&utm_medium=11&utm_campaign=qq11&utm_content=11&utm_term=11'); history.push('/blessingPreheat?utm_source=1&utm_medium=1&utm_campaign=11&utm_content=1&utm_term=1');
this.fetchUserBlessing(1, () => { this.fetchUserBlessing(1, () => {
this.handleToAddBlessing(1); this.handleToAddBlessing(1);
}); });
} }
} }
weiboToShare = () => {
const { uid, history } = this.props;
if(!uid) {
history.push('/passport');
}else {
history.push('/blessingPreheat?utm_source=sina&utm_medium=11&utm_campaign=sina11&utm_content=1&utm_term=11');
this.fetchUserBlessing(2, () => {
this.handleToAddBlessing(2);
});
}
}
fetchUserBlessing(key, cb) { fetchUserBlessing(key, cb) {
const { handleToShowShare, handleToHideShare } = this.props; const { handleToShowShare, handleToHideShare } = this.props;
let { seconds } = this.state; let { seconds } = this.state;
...@@ -209,6 +221,11 @@ class CollectBlessing extends Component { ...@@ -209,6 +221,11 @@ class CollectBlessing extends Component {
data-type="wechat" data-type="wechat"
onClick={this.wechatToShare} onClick={this.wechatToShare}
></a> ></a>
<a
className="collect-blessing__share-button"
data-type="weibo"
onClick={this.weiboToShare}
></a>
</div> </div>
</div> </div>
} }
......
...@@ -72,10 +72,9 @@ ...@@ -72,10 +72,9 @@
} }
.collect-blessing__share-button { .collect-blessing__share-button {
display: inline-block; display: block;
width: 14px; width: 20px;
height: 11px; height: 11px;
margin: 0 4px;
background-size: auto 100%; background-size: auto 100%;
background-repeat: no-repeat; background-repeat: no-repeat;
background-position: center; background-position: center;
...@@ -87,6 +86,10 @@ ...@@ -87,6 +86,10 @@
&[data-type="wechat"] { &[data-type="wechat"] {
background-image: url('https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/active19_1111/m/wechat-icon.png'); background-image: url('https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/active19_1111/m/wechat-icon.png');
} }
&[data-type="weibo"] {
background-image: url('https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/active19_1111/icon-weibo.png');
}
} }
.activity__over { .activity__over {
......
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