Feat(页面):页面埋点配置

This commit is contained in:
lifizer
2024-06-17 23:13:22 +08:00
parent 19914b5b0d
commit cef0177716
55 changed files with 552 additions and 377 deletions
+10 -7
View File
@@ -6,39 +6,42 @@
<script>
import {getStoryList} from "@/api/product";
import { pageListenMixins } from '@/mixins/pageListenMixins'
export default {
name: "famousStory",
mixins: [pageListenMixins],
data() {
return {
page: 1, // 当前页
pages: 1, // 总页数
list: []
list: [],
pageKeyId: Object.freeze('countyFamousContentList')
}
},
onLoad() {
this.fetchData();
this.fetchData()
},
onReachBottom() {
if (this.page < this.pages) {
this.page++;
this.fetchData();
this.page++
this.fetchData()
}
},
methods: {
fetchData() {
getStoryList(this.page).then(({data}) => {
this.pages = data.pages;
this.pages = data.pages
if (data.records.length > 0) {
for (let i = 0; i < data.records.length; i++) {
this.list.push(data.records[i]);
this.list.push(data.records[i])
}
}
})
},
goHot(item) {
uni.navigateTo({
url: "/pkg_product/views/famousHot?id=" + item.id
url: '/pkg_product/views/famousHot?id=' + item.id
})
}
}