Feat(页面):监听页面打开次数和页面停留时长逻辑初步实现

This commit is contained in:
lifizer
2024-05-16 17:23:07 +08:00
parent 2b3c0e4355
commit 84c5ede725
7 changed files with 167 additions and 79 deletions
+7 -4
View File
@@ -250,6 +250,8 @@ import {getProducts} from "@/api/store";
import {sharpBannar} from "@/api/goods";
import NP from "number-precision";
import { pageListenMixins } from '@/mixins/pageListenMixins'
var that;
export default {
name: 'Index',
@@ -260,8 +262,7 @@ export default {
CountDown,
hxNavbar
},
computed: mapGetters(["userInfo", 'isLogin']),
props: {},
mixins: [pageListenMixins],
data: function () {
return {
currentIndex: 0,
@@ -378,9 +379,11 @@ export default {
contentHomestay: {},
contentFestival: {},
countyFamous: {},
seasonalFood: {}
};
seasonalFood: {},
pageKeyId: Object.freeze('home_index')
}
},
computed: mapGetters(["userInfo", 'isLogin']),
onLoad: function (options) {
that = this;
this.init();