Commit 0d89d717 by xuzhenghua

埋点

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