提交 5b913971 编写于 作者: guangjun.yang's avatar guangjun.yang

添加部分埋点

上级 961e855b
......@@ -49,6 +49,9 @@ export default {
// 上一页 // 有可能要触发上分页(前端的个数只有一条)
previous() {
if(!this.canRun()) return;
this.$sendBuriedData({
component_tag: `886#88601`
});
if (this.currentQuestion.titleNo == 1) {
Toast("已是第一题");
} else {
......@@ -68,6 +71,9 @@ export default {
// TODO
next() {
if(!this.canRun()) return;
this.$sendBuriedData({
component_tag: `886#88602`
});
if (this.currentQuestion.titleNo == this.totalCount
// if (this.currentQuestion.titleNo == this.questionList.length
|| this.currentQuestion.titleNo == this.questionList[this.questionList.length - 1].titleNo) {
......@@ -82,7 +88,6 @@ export default {
if((cIndex == this.questionList.length - 2) && (this.questionList.length < this.totalCount)) {
this.$emit("pageQuestion", 1, this.questionList[this.questionList.length - 1].titleNo);
}
}
},
......@@ -96,7 +101,9 @@ export default {
this.$emit("scrollTop");
}, 200);
}
// this.$store.commit('SET_CURRENT_QUESTION', this.currentQuestion);
this.$sendBuriedData({
component_tag: `886#88603`
});
},
// 收藏/不收藏
......@@ -109,6 +116,10 @@ export default {
favor() {
if(!this.canRun()) return;
let favorFlag = this.currentQuestion.favorFlag;
let sPoint = favorFlag == 1 ? "88605" : "88604";
this.$sendBuriedData({
component_tag: `886#${sPoint}`
});
let param = {
dataType: 2,
directoryId: this.currentQuestion.directoryId,
......
......@@ -29,10 +29,10 @@
</div>
</div>
<div class="right-btn">
<span v-if="!bindStatus && (item.freeFlag == 0)" @click="goStudy(item)">开始练习</span>
<span v-if="!bindStatus && (item.freeFlag == 1) && (item.freePractice > 0)" @click="goStudy(item)">免费练习</span>
<span v-if="!bindStatus && (item.freeFlag == 0)" @click="goStudy(item, '开始练习')">开始练习</span>
<span v-if="!bindStatus && (item.freeFlag == 1) && (item.freePractice > 0)" @click="goStudy(item, '免费练习')">免费练习</span>
<img v-if="!bindStatus && (item.freeFlag == 1) && (item.freePractice == 0)" src="../images/question/lock.png" @click="unlockHand">
<span v-if="bindStatus == 1" @click="goStudy(item)">{{setTxt(item.finishedRatio)}}</span>
<span v-if="bindStatus == 1" @click="goStudy(item, setTxt(item.finishedRatio))">{{setTxt(item.finishedRatio)}}</span>
</div>
</div>
</div>
......@@ -429,7 +429,7 @@ export default {
this.showChangeCard = false;
},
//各种练习
goStudy(obj) {
goStudy(obj, btnText) {
this.checkTokenForNative(() => {
this.$router.push({
path: '/question-detail',
......@@ -446,6 +446,20 @@ export default {
}
})
});
let sPoint = ""
if(btnText === "免费练习" || btnText === "开始练习") {
sPoint = "88503";
} else if(btnText === "继续练习") {
sPoint = "88504";
} else if(btnText === "重新练习") {
sPoint = "88505";
}
if(sPoint) {
this.$sendBuriedData({
component_tag: `885#${sPoint}#${obj.directoryId}#${obj.directoryName}`
});
}
},
//解锁
unlockHand() {
......
......@@ -9,14 +9,14 @@
<question-content ref="questionContentRef" v-show="questionList.length"></question-content>
<no-content v-show="!questionList.length" :listType="commitKind"></no-content>
</article>
<free-tips v-show="showFreeTips" :total="titleConfig.totalCount" @buyCard="buyCard"></free-tips>
<free-tips v-show="showFreeTips" :total="titleConfig.totalCount" @buyCard="buyCard(2)"></free-tips>
<question-footer v-show="questionList.length" @statistics="statistics" @scrollTop="scrollTop" @pageQuestion="pageQuestion"></question-footer>
<ExperienceDialog
:showDialog="experienceDialog"
:statisConfig="statisConfig"
@activeCard="activeCard"
@buyCard="buyCard"
@close="experienceDialog = false"
@buyCard="buyCard(1)"
@close="closeExpDialog"
></ExperienceDialog>
<!-- 去激活 -->
......@@ -168,6 +168,7 @@ export default {
},
methods: {
...mapActions(["setUserInfo", "handlerQuestionList"]),
init() {
this.currentTitle = titleArray[this.commitKind] || "习题集";
this.$store.commit("SET_COMMON_CONIFG", {
......@@ -230,20 +231,35 @@ export default {
});
},
// 打开激活弹框
// 去激活(体验完弹窗-打开激活弹框)
activeCard() {
this.$sendBuriedData({
component_tag: `886#88606`
});
this.checkTokenForNative(() => {
this.experienceDialog = false;
this.showChangeCard = true;
});
},
buyCard() {
// 去购买(体验完弹窗-跳转到购买页面)
buyCard(type) {
console.log("in buyCard", type);
this.checkTokenForNative(() => {
this.confirmGoBuy();
});
if(type == 1) {
this.$sendBuriedData({
component_tag: `886#88607`
});
} else if(type == 2) {
this.$sendBuriedData({
component_tag: `886#88609`
});
}
},
// 跳转到(原生)购买页面
confirmGoBuy() {
let appVersion = this.userInfo.appVersion || "";
let appVersionNum = appVersion.split(".").join("");
......@@ -284,45 +300,13 @@ export default {
});
},
// 跳转到原生的购买页面
// confirm() {
// let appVersion = this.userInfo.appVersion || "";
// let appVersionNum = appVersion.split(".").join("");
// if (appVersionNum < 344) {
// Toast("请您下载新版本App");
// return;
// }
// // 直接传入学科ID(secondSubjectId)
// let pageUrl = getWebPageUrl(
// `/profexam/#/question-bank?id=${this.secondSubjectId}&secondSubjectId=${this.secondSubjectId}`
// );
// let paramList = [
// {
// key: "className",
// value:
// "com.picahealth.yunque.activitys.studycard.StudyCardDetailActivity###PicaDo.LearningCardVC",
// type: 4,
// seqNo: 1
// },
// {
// key: "goodId",
// value: this.cardInfo.id,
// type: 4,
// seqNo: 1
// },
// {
// key: "courseUrl",
// value: encodeURIComponent(pageUrl),
// type: 4,
// seqNo: 1
// }
// ];
// rocNative.dispatchEventByModuleCode({
// modeCode: "M200",
// jsonString: paramList
// });
// },
// 关闭体验完弹窗
closeExpDialog() {
this.experienceDialog = false;
this.$sendBuriedData({
component_tag: `886#88608`
});
},
// 关闭激活弹框
cancleChangeCard() {
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册