套餐,新增融云im

This commit is contained in:
唐明明
2022-01-11 15:50:44 +08:00
parent a27ffc0a7f
commit 61c9f096ca
7 changed files with 97 additions and 24 deletions

View File

@@ -2,8 +2,12 @@
<view class="content">
<!-- banner -->
<view class="banner">
<image v-if="banner.length > 0" class="banner-cover" :src="banner[0].cover || ''" mode="aspectFill"></image>
<image v-if="banner != ''" class="banner-cover" :src="banner" mode="aspectFill"></image>
</view>
<!-- 分类 -->
<u-sticky bgColor="#fff" zIndex="99">
<u-tabs :list="classify" lineColor="#34CE98" @click="onTabs"></u-tabs>
</u-sticky>
<!-- 套餐列表 -->
<oct-goods
:lists="goodsArr"
@@ -18,8 +22,10 @@
export default {
data() {
return {
banner : [],
goodsArr: []
banner : "",
goodsArr : [],
classify : [],
categoryId : ""
};
},
mounted(){
@@ -27,18 +33,19 @@
},
methods:{
getMeals(){
meals(this.$Route.query.id).then(res => {
meals(this.$Route.query.id, this.categoryId).then(res => {
uni.setNavigationBarTitle({
title: res.meal.subtitle
})
console.log(res)
this.banner = res.banners
this.goodsArr = res.meal.goods
this.banner = res.meal.banner
this.goodsArr = res.goods
this.classify = [{ name: "全部", category_id: "" }].concat(res.categories)
uni.stopPullDownRefresh()
})
},
click(){
console.log('筛选')
onTabs(e){
this.categoryId = e.category_id
this.getMeals()
}
},
onPullDownRefresh() {