first commit

This commit is contained in:
编码猿
2024-09-27 02:06:13 +08:00
commit 852d94fbb9
36760 changed files with 3274413 additions and 0 deletions

View File

@@ -0,0 +1,80 @@
<template>
<view class="food_list">
<view class="food" v-for="(v,i) in content" :key="i" @click="InfoVideoInfo(v)">
<view class="food_img">
<image :src="v.bd_photo" mode="aspectFill"></image>
<i class="content_img_play"></i>
</view>
<view class="food_text">
<p>{{v.seo_title}}</p>
<view class="food_icon">
<view class="food_icon_lift">
<image src="../../static/img/user.jpg"></image>
<span>美食杰</span>
</view>
<view class="food_icon_right">
<i></i>
<span>{{v.click_num}}</span>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
total_page: 0,
page: 1,
content: []
}
},
onLoad() {
this.getvideo()
},
onReachBottom() {
this.page = this.page + 1
if (this.page < this.total_page) {
this.getvideo()
}
}, //触底判断请求
onNavigationBarButtonTap(e) {
console.log(e)
if(e.index == 0||e.index == 1){
uni.switchTab({
url: '/pages/index/index'
})
}else {
uni.navigateTo({
url: '/pages/search/search'
})
}
},
methods: {
async getvideo() {
let res = await this.$http.index.video({
page: this.page
});
this.total_page = res.total_page
this.content = [
...this.content,
...res.items
]
console.log(this.content);
},
InfoVideoInfo(VInfoData) {
var sti =JSON.stringify(VInfoData)
uni.navigateTo({
url: "/pages/videoinfo/videoinfo?str="+sti
})
}
}
}
</script>
<style scoped lang="less">
@import "../../common/less/page/video.less";
</style>