绿满眶商城微信小程序-uniapp
zxl
4 天以前 4c990c71b78a4dc817db706067aed2369dbe6ac3
页面
2个文件已修改
15 ■■■■ 已修改文件
components/TopBar.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/kitchen/KitchenCustomize.vue 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
components/TopBar.vue
@@ -50,7 +50,7 @@
                    {
                        index: 'kitchenCustomize',
                        pagePath: '/pages/kitchen/KitchenCustomize',
                        title: '厨房定制'
                        title: '私厨定制'
                    },
                    {
                        index: 'shop',
pages/kitchen/KitchenCustomize.vue
@@ -1,6 +1,7 @@
<template>
    <view class="page">
        <top-bar selectedTitleIndex="kitchenCustomize" textColor="black" bgColor="#ffffff" @changeTab="topBarChange"></top-bar>
        <top-bar selectedTitleIndex="kitchenCustomize" textColor="black" bgColor="#ffffff"
            @changeTab="topBarChange"></top-bar>
        <view class="banner">
            <image class="banner-img" :src="banner" mode="aspectFill"></image>
        </view>
@@ -100,8 +101,10 @@
        async initData() {
            await getKitchenBanner().then(res => {
                if (res.statusCode === 200) {
                    if (res.data.data.length > 0) {
                    this.banner = res.data.data[0].coverUrl;
                    console.log(res)
                    }
                }
            });
            await getKitchenTag().then(res => {
@@ -117,8 +120,13 @@
                    }
                }
            });
            if (this.tags.length > 0) {
            this.queryParams.tagId = this.tags[0].value;
            this.getProductList();
            } else {
                console.warn('标签数据为空,不请求商品列表');
                this.products = []; // 清空商品列表,避免旧数据残留
            }
        },
        getProductList() {
@@ -357,6 +365,7 @@
    color: #999;
    font-size: 24rpx;
}
.topBar {
    position: fixed;
    top: 20rpx;