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
+9 -6
View File
@@ -1,31 +1,34 @@
<script>
import {seasonHomeData} from "@/api/product";
import {seasonHomeData} from '@/api/product'
import { pageListenMixins } from '@/mixins/pageListenMixins'
export default {
mixins: [pageListenMixins],
data() {
return {
webUrl: this.$VUE_APP_RESOURCES_URL,
typeList: ["时令果蔬", "水产海鲜", "肉禽蛋白", "全部分类"],
typeList: ['时令果蔬', '水产海鲜', '肉禽蛋白', '全部分类'],
list: [],
typeIndex: 0
typeIndex: 0,
pageKeyId: Object.freeze('seasonalFoodIndex')
}
},
onLoad() {
this.init();
this.init()
},
methods: {
changeType(index){
this.typeIndex=index
},
init() {
seasonHomeData().then(({data}) => this.list = data.seasonalFoodType || []);
seasonHomeData().then(({data}) => this.list = data.seasonalFoodType || [])
},
goDetail() {
uni.navigateTo({
url: "/pkg_product/views/season?id=" + this.list[this.typeIndex].contents[0].id
})
}
},
}
}
</script>