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

添加部分埋点

上级 961e855b
...@@ -49,6 +49,9 @@ export default { ...@@ -49,6 +49,9 @@ export default {
// 上一页 // 有可能要触发上分页(前端的个数只有一条) // 上一页 // 有可能要触发上分页(前端的个数只有一条)
previous() { previous() {
if(!this.canRun()) return; if(!this.canRun()) return;
this.$sendBuriedData({
component_tag: `886#88601`
});
if (this.currentQuestion.titleNo == 1) { if (this.currentQuestion.titleNo == 1) {
Toast("已是第一题"); Toast("已是第一题");
} else { } else {
...@@ -68,6 +71,9 @@ export default { ...@@ -68,6 +71,9 @@ export default {
// TODO // TODO
next() { next() {
if(!this.canRun()) return; if(!this.canRun()) return;
this.$sendBuriedData({
component_tag: `886#88602`
});
if (this.currentQuestion.titleNo == this.totalCount if (this.currentQuestion.titleNo == this.totalCount
// if (this.currentQuestion.titleNo == this.questionList.length // if (this.currentQuestion.titleNo == this.questionList.length
|| this.currentQuestion.titleNo == this.questionList[this.questionList.length - 1].titleNo) { || this.currentQuestion.titleNo == this.questionList[this.questionList.length - 1].titleNo) {
...@@ -82,7 +88,6 @@ export default { ...@@ -82,7 +88,6 @@ export default {
if((cIndex == this.questionList.length - 2) && (this.questionList.length < this.totalCount)) { if((cIndex == this.questionList.length - 2) && (this.questionList.length < this.totalCount)) {
this.$emit("pageQuestion", 1, this.questionList[this.questionList.length - 1].titleNo); this.$emit("pageQuestion", 1, this.questionList[this.questionList.length - 1].titleNo);
} }
} }
}, },
...@@ -96,7 +101,9 @@ export default { ...@@ -96,7 +101,9 @@ export default {
this.$emit("scrollTop"); this.$emit("scrollTop");
}, 200); }, 200);
} }
// this.$store.commit('SET_CURRENT_QUESTION', this.currentQuestion); this.$sendBuriedData({
component_tag: `886#88603`
});
}, },
// 收藏/不收藏 // 收藏/不收藏
...@@ -109,6 +116,10 @@ export default { ...@@ -109,6 +116,10 @@ export default {
favor() { favor() {
if(!this.canRun()) return; if(!this.canRun()) return;
let favorFlag = this.currentQuestion.favorFlag; let favorFlag = this.currentQuestion.favorFlag;
let sPoint = favorFlag == 1 ? "88605" : "88604";
this.$sendBuriedData({
component_tag: `886#${sPoint}`
});
let param = { let param = {
dataType: 2, dataType: 2,
directoryId: this.currentQuestion.directoryId, directoryId: this.currentQuestion.directoryId,
......
...@@ -29,10 +29,10 @@ ...@@ -29,10 +29,10 @@
</div> </div>
</div> </div>
<div class="right-btn"> <div class="right-btn">
<span v-if="!bindStatus && (item.freeFlag == 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> <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"> <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> </div>
</div> </div>
...@@ -429,7 +429,7 @@ export default { ...@@ -429,7 +429,7 @@ export default {
this.showChangeCard = false; this.showChangeCard = false;
}, },
//各种练习 //各种练习
goStudy(obj) { goStudy(obj, btnText) {
this.checkTokenForNative(() => { this.checkTokenForNative(() => {
this.$router.push({ this.$router.push({
path: '/question-detail', path: '/question-detail',
...@@ -446,6 +446,20 @@ export default { ...@@ -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() { unlockHand() {
......
...@@ -9,14 +9,14 @@ ...@@ -9,14 +9,14 @@
<question-content ref="questionContentRef" v-show="questionList.length"></question-content> <question-content ref="questionContentRef" v-show="questionList.length"></question-content>
<no-content v-show="!questionList.length" :listType="commitKind"></no-content> <no-content v-show="!questionList.length" :listType="commitKind"></no-content>
</article> </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> <question-footer v-show="questionList.length" @statistics="statistics" @scrollTop="scrollTop" @pageQuestion="pageQuestion"></question-footer>
<ExperienceDialog <ExperienceDialog
:showDialog="experienceDialog" :showDialog="experienceDialog"
:statisConfig="statisConfig" :statisConfig="statisConfig"
@activeCard="activeCard" @activeCard="activeCard"
@buyCard="buyCard" @buyCard="buyCard(1)"
@close="experienceDialog = false" @close="closeExpDialog"
></ExperienceDialog> ></ExperienceDialog>
<!-- 去激活 --> <!-- 去激活 -->
...@@ -168,6 +168,7 @@ export default { ...@@ -168,6 +168,7 @@ export default {
}, },
methods: { methods: {
...mapActions(["setUserInfo", "handlerQuestionList"]), ...mapActions(["setUserInfo", "handlerQuestionList"]),
init() { init() {
this.currentTitle = titleArray[this.commitKind] || "习题集"; this.currentTitle = titleArray[this.commitKind] || "习题集";
this.$store.commit("SET_COMMON_CONIFG", { this.$store.commit("SET_COMMON_CONIFG", {
...@@ -230,20 +231,35 @@ export default { ...@@ -230,20 +231,35 @@ export default {
}); });
}, },
// 打开激活弹框 // 去激活(体验完弹窗-打开激活弹框)
activeCard() { activeCard() {
this.$sendBuriedData({
component_tag: `886#88606`
});
this.checkTokenForNative(() => { this.checkTokenForNative(() => {
this.experienceDialog = false; this.experienceDialog = false;
this.showChangeCard = true; this.showChangeCard = true;
}); });
}, },
buyCard() { // 去购买(体验完弹窗-跳转到购买页面)
buyCard(type) {
console.log("in buyCard", type);
this.checkTokenForNative(() => { this.checkTokenForNative(() => {
this.confirmGoBuy(); this.confirmGoBuy();
}); });
if(type == 1) {
this.$sendBuriedData({
component_tag: `886#88607`
});
} else if(type == 2) {
this.$sendBuriedData({
component_tag: `886#88609`
});
}
}, },
// 跳转到(原生)购买页面
confirmGoBuy() { confirmGoBuy() {
let appVersion = this.userInfo.appVersion || ""; let appVersion = this.userInfo.appVersion || "";
let appVersionNum = appVersion.split(".").join(""); let appVersionNum = appVersion.split(".").join("");
...@@ -284,45 +300,13 @@ export default { ...@@ -284,45 +300,13 @@ export default {
}); });
}, },
// 跳转到原生的购买页面 // 关闭体验完弹窗
// confirm() { closeExpDialog() {
// let appVersion = this.userInfo.appVersion || ""; this.experienceDialog = false;
// let appVersionNum = appVersion.split(".").join(""); this.$sendBuriedData({
// if (appVersionNum < 344) { component_tag: `886#88608`
// 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
// });
// },
// 关闭激活弹框 // 关闭激活弹框
cancleChangeCard() { cancleChangeCard() {
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册