Commit 0d89d717 by xuzhenghua

埋点

parent 2cde975e
...@@ -247,6 +247,10 @@ class CourseList extends Component { ...@@ -247,6 +247,10 @@ class CourseList extends Component {
if(isLogin) { if(isLogin) {
var _czc = _czc || [];
var name = '课程id=' + id;
_czc.push(["_trackEvent", name, 'm端双十一立即领券']);
http.post(`${API.home}/sys/activity/coupon/receive`, { http.post(`${API.home}/sys/activity/coupon/receive`, {
course_id: id course_id: id
}).then(res => { }).then(res => {
...@@ -305,6 +309,21 @@ class CourseList extends Component { ...@@ -305,6 +309,21 @@ class CourseList extends Component {
} }
} }
// 开始使用
toCourse2 = (courseId) => {
const { history } = this.props;
var _czc = _czc || [];
var name = '课程id=' + courseId;
_czc.push(["_trackEvent", name, 'm端双十一开始使用优惠券']);
if (!getParam('version')) {
history.push(`/detail?id=${courseId}`);
} else {
SendMessageToApp("toCourse", courseId);
}
}
render() { render() {
const { isFormal } = this.props; const { isFormal } = this.props;
const { basic, advanced, higher, expand, group, training } = this.state; const { basic, advanced, higher, expand, group, training } = this.state;
...@@ -372,7 +391,7 @@ class CourseList extends Component { ...@@ -372,7 +391,7 @@ class CourseList extends Component {
{ {
(isFormal === 1 && item.course_status === 2) && (isFormal === 1 && item.course_status === 2) &&
<a <a
onClick={() => this.toCourse(item.course_id)} onClick={() => this.toCourse2(item.course_id)}
className="coupon-course__button"> className="coupon-course__button">
<span className="coupon-course__button-price"> <span className="coupon-course__button-price">
<em>¥{item.coupon}</em> <em>¥{item.coupon}</em>
...@@ -441,7 +460,7 @@ class CourseList extends Component { ...@@ -441,7 +460,7 @@ class CourseList extends Component {
} }
{ {
(isFormal === 1 && item.course_status === 2) && (isFormal === 1 && item.course_status === 2) &&
<a onClick={() => this.toCourse(item.course_id)} className="coupon-course__button"> <a onClick={() => this.toCourse2(item.course_id)} className="coupon-course__button">
<span className="coupon-course__button-price"> <span className="coupon-course__button-price">
<em>¥{item.coupon}</em> <em>¥{item.coupon}</em>
<i>代金券</i> <i>代金券</i>
...@@ -521,7 +540,7 @@ class CourseList extends Component { ...@@ -521,7 +540,7 @@ class CourseList extends Component {
} }
{ {
(isFormal === 1 && item.course_status === 2) && (isFormal === 1 && item.course_status === 2) &&
<a onClick={() => this.toCourse(item.course_id)} className="coupon-course__button"> <a onClick={() => this.toCourse2(item.course_id)} className="coupon-course__button">
<span className="coupon-course__button-price"> <span className="coupon-course__button-price">
<em>¥{item.coupon}</em> <em>¥{item.coupon}</em>
<i>代金券</i> <i>代金券</i>
...@@ -601,7 +620,7 @@ class CourseList extends Component { ...@@ -601,7 +620,7 @@ class CourseList extends Component {
} }
{ {
(isFormal === 1 && item.course_status === 2) && (isFormal === 1 && item.course_status === 2) &&
<a onClick={() => this.toCourse(item.course_id)} className="coupon-course__button"> <a onClick={() => this.toCourse2(item.course_id)} className="coupon-course__button">
<span className="coupon-course__button-price"> <span className="coupon-course__button-price">
<em>¥{item.coupon}</em> <em>¥{item.coupon}</em>
<i>代金券</i> <i>代金券</i>
...@@ -682,7 +701,7 @@ class CourseList extends Component { ...@@ -682,7 +701,7 @@ class CourseList extends Component {
} }
{ {
(isFormal === 1 && item.course_status === 2) && (isFormal === 1 && item.course_status === 2) &&
<a onClick={() => this.toCourse(item.course_id)} className="coupon-course__button"> <a onClick={() => this.toCourse2(item.course_id)} className="coupon-course__button">
<span className="coupon-course__button-price"> <span className="coupon-course__button-price">
<em>¥{item.coupon}</em> <em>¥{item.coupon}</em>
<i>代金券</i> <i>代金券</i>
......
...@@ -52,6 +52,10 @@ class LevelTest extends Component { ...@@ -52,6 +52,10 @@ class LevelTest extends Component {
startTest = () => { startTest = () => {
const {history, isLogin, toLogin} = this.props; const {history, isLogin, toLogin} = this.props;
if(isLogin) { if(isLogin) {
var _czc = _czc || [];
_czc.push(["_trackEvent", 'AI水平测试', 'm端双十一AI水平测试-点击测试']);
// history.push('/levelTest/test'); // history.push('/levelTest/test');
// if(getParam('version')) { // if(getParam('version')) {
window.location.href = `${API.m}/levelTest/test`; window.location.href = `${API.m}/levelTest/test`;
......
...@@ -73,6 +73,9 @@ class Live extends Component { ...@@ -73,6 +73,9 @@ class Live extends Component {
toLiveRoom = id => { toLiveRoom = id => {
const {history, isLogin} = this.props const {history, isLogin} = this.props
var _czc = _czc || [];
var name = '直播间id=' + id;
_czc.push(["_trackEvent", name, 'm端双十一大咖直播-正在直播']);
if (this.state.isApp) { if (this.state.isApp) {
if (isLogin) { if (isLogin) {
SendMessageToApp('toLiveRoom', id) SendMessageToApp('toLiveRoom', id)
...@@ -104,6 +107,10 @@ class Live extends Component { ...@@ -104,6 +107,10 @@ class Live extends Component {
if (user.hasError) { if (user.hasError) {
history.push('/passport/login') history.push('/passport/login')
} }
var name = '直播间id=' + id;
_czc.push(["_trackEvent", name, 'm端双十一大咖直播-立即预约']);
http.get(`${API['base-api']}/sys/createLiveQrcode/${id}`) http.get(`${API['base-api']}/sys/createLiveQrcode/${id}`)
.then(res => { .then(res => {
const {data} = res const {data} = res
......
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