Feat(页面):页面埋点配置
This commit is contained in:
@@ -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
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user