Ver Fonte

feat(sell): 更新商品展示组件以适配新API数据结构

ylong há 1 dia atrás
pai
commit
6901629ff0

+ 0 - 15
pages-car/pages/index.vue

@@ -190,21 +190,6 @@
                         item.quantity = num;
                         // 通过 computed 重新计算总额
                     }).catch(() => {
-                        // 如果是乐观更新,出错时需要回滚,但这里我们还没有更新?
-                        // 实际上数字输入框更新了 v-model。如果在子组件中使用 v-model,它会更新父组件。
-                        // 但我们触发了 changeNum。
-                        // 在子组件中:v-model="item.quantity" -> 直接更新 prop(Vue 2 会警告,但对象属性变更有效)。
-                        // 如果子组件更新了 prop,除了调用 API 我们不需要做任何事。
-                        // 但良好的实践是子组件触发事件,父组件更新。
-                        // cart-item 使用 v-model 绑定 props.item.quantity。这直接修改了 cartList 中的对象。
-                        // 所以 item.quantity 已经是 `num` 了。
-                        // 我们只需要调用 API。
-
-                        // 注意:cart-item.vue 使用 v-model="item.quantity"。
-                        // 这会直接修改对象。
-                        // 所以 API 调用应该使用新值。
-                        // 如果 API 失败,我们应该回滚。
-                        // 但让我们假设成功,或者通过重新加载列表来处理错误。
                     });
                 }
             },

+ 4 - 4
pages-sell/components/hot-recommend-item/index.vue

@@ -3,16 +3,16 @@
 		<image :src="item.cover" class="book-cover" mode="aspectFill"></image>
 		<view class="info-right">
 			<view class="info-top">
-				<text class="title">{{ item.title }}</text>
+				<text class="title">{{ item.name || '-' }}</text>
 				<view class="price-row">
 					<text class="currency">¥</text>
-					<text class="price">{{ item.price }}</text>
+					<text class="price">{{ item.productPrice }}</text>
 				</view>
 
 				<view class="flex space-between">
 					<view class="discount-tag" v-if="item.discountDesc">
-						<text class="discount">{{ item.discount }}</text>
-						<text class="discount-desc">{{ item.discountDesc }}</text>
+						<text class="discount">{{ item.discountDesc }}</text>
+						<text class="discount-desc">省{{ item.discountPrice }}元</text>
 					</view>
 
 					<view class="btn-cart" @click.stop="handleAddToCart">

+ 3 - 3
pages-sell/components/hot-sell-item/index.vue

@@ -13,14 +13,14 @@
 			<image :src="item.cover" class="book-cover" mode="aspectFill"></image>
 			
 			<view class="info-right">
-				<text class="title">{{ item.title }}</text>
+				<text class="title">{{ item.name || '-' }}</text>
 				<text class="author">{{ item.author }}</text>
 				
 				<view class="bottom-row">
 					<view class="price-box">
 						<text class="currency">¥</text>
-						<text class="price">{{ item.price }}</text>
-						<text class="original">¥{{ item.originalPrice }}</text>
+						<text class="price">{{ item.productPrice }}</text>
+						<text class="original">¥{{ item.price }}</text>
 					</view>
 					
 					<view class="cart-btn">

+ 5 - 1
pages-sell/components/select-good-popup/index.vue

@@ -45,7 +45,7 @@
 					<image v-if="currentQuality === opt.conditionType" src="/pages-sell/static/select-good/selected.png"
 						class="bg-image"></image>
 					<view class="left">
-						<text class="opt-name">{{ qualityNames[index - 1] || '未知' }}</text>
+						<text class="opt-name">{{ qualityNames[opt.conditionType - 1] || '未知' }}</text>
 						<view class="opt-discount" :class="{ active: currentQuality === opt.conditionType }">
 							<text>{{ opt.discount }}折</text>
 						</view>
@@ -195,6 +195,10 @@
                     }
 				});
 			},
+			formatPrice(price) {
+				if (price === undefined || price === null) return '0.00';
+				return Number(price).toFixed(2);
+			},
 			toNumber(value) {
 				const num = Number(value);
 				return Number.isFinite(num) ? num : 0;

+ 36 - 18
pages-sell/components/sell-container/index.vue

@@ -74,21 +74,29 @@
 
 			<!-- 健康与成长双卡片 -->
 			<view class="info-dual-card">
-				<view class="info-card bg-orange">
-					<view class="info-text-group">
-						<text class="info-title text-orange">健康与身材</text>
-						<text class="info-desc text-orange-light">和身体和解科学管理状态</text>
-					</view>
-					<image src="/pages-sell/static/shape-19.png" class="info-icon" mode="aspectFit"
-						style="width: 125rpx;height: 111rpx;"></image>
-				</view>
-				<view class="info-card bg-green">
-					<view class="info-text-group">
-						<text class="info-title text-green">成长与心态</text>
-						<text class="info-desc text-green-light">拥有持续进步的动力和抗挫力</text>
-					</view>
-					<image src="/pages-sell/static/shape-20.png" class="info-icon" mode="aspectFit"></image>
-				</view>
+				<swiper class="info-card-swiper" :autoplay="true" :interval="3000" :circular="true" >
+					<swiper-item v-for="(item, index) in leftBookList" :key="index">
+						<view class="info-card bg-orange" @click="navigateTo(item.jumpUrl)">
+							<view class="info-text-group">
+								<text class="info-title text-orange">{{ item.showCateName }}</text>
+								<text class="info-desc text-orange-light">{{ item.remark }}</text>
+							</view>
+							<image :src="item.imgUrl" class="info-icon" mode="aspectFit"
+								style="width: 125rpx;height: 111rpx;"></image>
+						</view>
+					</swiper-item>
+				</swiper>
+				<swiper class="info-card-swiper" :autoplay="true" :interval="3500" :circular="true">
+					<swiper-item v-for="(item, index) in rightBookList" :key="index">
+						<view class="info-card bg-green" @click="navigateTo(item.jumpUrl)">
+							<view class="info-text-group">
+								<text class="info-title text-green">{{ item.showCateName }}</text>
+								<text class="info-desc text-green-light">{{ item.remark }}</text>
+							</view>
+							<image :src="item.imgUrl" class="info-icon" mode="aspectFit"></image>
+						</view>
+					</swiper-item>
+				</swiper>
 			</view>
 
 			<!-- 公众号横幅 -->
@@ -172,6 +180,8 @@
 					{ title: '山河岁月', price: '6.80', original: '36.80', cover: 'https://img.yzcdn.cn/vant/cat.jpeg' }
 				],
 				topicList:[], //专题推荐 
+				leftBookList:[], // 左侧推荐书籍
+				rightBookList:[] // 右侧推荐书籍
 			}
 		},
 		created() {
@@ -217,7 +227,8 @@
 						this.categoryList = res.data.find(item => item.position == 'diamond_area')?.shopIndexCateVo || []
 						this.swiperList = res.data.find(item => item.position == 'left_banner')?.shopIndexCateVo || []
 						this.bookList = res.data.find(item => item.position == 'right_banner')?.shopIndexCateVo || []
-				
+						this.leftBookList = res.data.find(item => item.position == 'left_book_list')?.shopIndexCateVo || []
+						this.rightBookList = res.data.find(item => item.position == 'right_book_list')?.shopIndexCateVo || []
 						//获取专题推荐
 						this.topicList = res.data.find(item => item.position == 'topic')?.shopIndexCateVo || []
 					}
@@ -226,7 +237,7 @@
 			getDisplayBooks(item) {
 				if (!item.bookInfoList) return []
 				let limit = 3
-				if (item.positionType === 'double_row_topic') {
+				if (item.topicType === 2) {
 					limit = 6
 				}
 				return item.bookInfoList.slice(0, limit)
@@ -445,8 +456,15 @@
 		justify-content: space-between;
 		margin-bottom: 24rpx;
 
-		.info-card {
+		.info-card-swiper {
 			width: 48%;
+			height: 140rpx;
+			border-radius: 12px;
+			overflow: hidden;
+		}
+
+		.info-card {
+			width: 100%;
 			padding: 24rpx;
 			border-radius: 12px;
 			/* Updated radius */

+ 337 - 180
pages-sell/pages/search-result.vue

@@ -2,12 +2,13 @@
     <view class="search-result-page">
         <image class="top-bg-image" src="/pages-sell/static/top-bg.png" mode="widthFix"></image>
 
-        <Navbar title="书嗨" :titleSize="36" :title-color="navbarTitleColor" :back-icon-color="navbarIconColor" :background="navbarBackground"></Navbar>
+        <Navbar title="书嗨" :titleSize="36" :title-color="navbarTitleColor" :back-icon-color="navbarIconColor"
+            :background="navbarBackground"></Navbar>
 
         <!-- Custom Header -->
         <view class="search-bar-wrapper">
-            <u-search style="width: 100%;" v-model="keyword" placeholder="书名/作者/ISBN" :show-action="true" action-text="反馈"
-                :action-style="{ color: '#fff' }" bg-color="#fff" shape="round" :clearabled="true"
+            <u-search style="width: 100%;" v-model="keyword" placeholder="书名/作者/ISBN" :show-action="true"
+                action-text="反馈" :action-style="{ color: '#fff' }" bg-color="#fff" shape="round" :clearabled="true"
                 search-icon="/pages-sell/static/search-icon.png" @custom="toFeedback" @search="onSearch"></u-search>
         </view>
 
@@ -19,28 +20,34 @@
         <!-- Content Area -->
         <view class="content-area">
             <!-- Everyone is watching -->
-            <view class="section-block">
+            <view class="section-block" v-if="hotBook && hotBook.isbn">
                 <text class="section-title">大家都在看</text>
                 <HotRecommendItem :item="hotBook" @add-cart="addToCart"></HotRecommendItem>
             </view>
 
             <!-- Filter Bar -->
             <view class="filter-bar">
-                <view class="filter-item active">
+                <view class="filter-item" :class="{ active: sort === 1 }" @click="handleSort(1)">
                     <text>综合</text>
-                    <view class="triangle-icon"></view>
+                    <view class="sort-icons">
+                        <u-icon name="arrow-down-fill" :color="sort === 1 ? '#38C148' : '#cccccc'" size="14"></u-icon>
+                    </view>
                 </view>
-                <view class="filter-item">
+                <view class="filter-item" :class="{ active: sort === 4 || sort === 5 }" @click="handleSort('sales')">
                     <text>销量</text>
+                    <view class="sort-icons">
+                        <u-icon name="arrow-up-fill" :color="sort === 4 ? '#38C148' : '#cccccc'" size="14"></u-icon>
+                        <u-icon name="arrow-down-fill" :color="sort === 5 ? '#38C148' : '#cccccc'" size="14"></u-icon>
+                    </view>
                 </view>
-                <view class="filter-item">
+                <view class="filter-item" :class="{ active: sort === 2 || sort === 3 }" @click="handleSort('price')">
                     <text>价格</text>
                     <view class="sort-icons">
-                        <image src="/pages-sell/static/search-result/icon-top.png" class="icon-sort"></image>
-                        <image src="/pages-sell/static/search-result/icon-bottom.png" class="icon-sort"></image>
+                        <u-icon name="arrow-up-fill" :color="sort === 2 ? '#38C148' : '#cccccc'" size="14"></u-icon>
+                        <u-icon name="arrow-down-fill" :color="sort === 3 ? '#38C148' : '#cccccc'" size="14"></u-icon>
                     </view>
                 </view>
-                <view class="filter-item">
+                <view class="filter-item" @click="showFilter = true">
                     <text>筛选</text>
                     <image src="/pages-sell/static/search-result/icon-filter.png" class="icon-filter"></image>
                 </view>
@@ -48,216 +55,366 @@
 
             <!-- Book List -->
             <view class="book-list">
-                <RecommendItem v-for="(item, index) in bookList" :key="index" :item="item" @add-cart="addToCart" :show-desc="false">
+                <RecommendItem v-for="(item, index) in bookList" :key="index" :item="item" @add-cart="addToCart"
+                    :show-desc="false">
                 </RecommendItem>
+                <u-loadmore :status="loadStatus" margin-top="30" margin-bottom="30"></u-loadmore>
             </view>
         </view>
+
+        <!-- Filter Popup -->
+        <u-popup v-model="showFilter" mode="bottom">
+            <view class="filter-popup">
+                <view class="filter-content">
+                    <view class="filter-title">价格区间</view>
+                    <view class="price-inputs">
+                        <u-input v-model="tempMinPrice" type="number" placeholder="最低价" border="surround"></u-input>
+                        <view class="divider">-</view>
+                        <u-input v-model="tempMaxPrice" type="number" placeholder="最高价" border="surround"></u-input>
+                    </view>
+                </view>
+                <view class="filter-footer">
+                    <view class="btn reset" @click="resetFilter">重置</view>
+                    <view class="btn confirm" @click="confirmFilter">确定</view>
+                </view>
+            </view>
+        </u-popup>
     </view>
 </template>
 
 <script>
-import RecommendItem from '../components/recommend-item/index.vue';
-import HotRecommendItem from '../components/hot-recommend-item/index.vue';
-import Navbar from '@/components/navbar/navbar.vue';
-
-export default {
-    components: {
-        RecommendItem,
-        HotRecommendItem,
-        Navbar,
-    },
-    data() {
-        return {
-            keyword: '',
-            pageNum: 1,
-            pageSize: 10,
-            hotBook: {
-                id: 1,
-                title: '山河岁月',
-                cover: '/static/img/1.png', // Assuming a placeholder or from static
-                price: '6.80',
-                discount: '5.3折',
-                discountDesc: '省9.8元'
-            },
-            bookList: [],
-            navbarBackground: 'transparent',
-            navbarTitleColor: '#ffffff',
-            navbarIconColor: '#ffffff'
-        }
-    },
-    onPageScroll(e) {
-        if (e.scrollTop > 50) {
-            this.navbarBackground = '#ffffff';
-            this.navbarTitleColor = '#000000';
-            this.navbarIconColor = '#000000';
-        } else {
-            this.navbarBackground = 'transparent';
-            this.navbarTitleColor = '#ffffff';
-            this.navbarIconColor = '#ffffff';
-        }
-    },
-    onLoad(options) {
-        this.keyword = options.keyword ? decodeURIComponent(options.keyword) : '';
-        this.loadData();
-    },
-    methods: {
-        loadData() {
-            this.$u.api.getSearchKeywordAjax({
-                keyword: this.keyword,
-                pageNum: this.pageNum,
-                pageSize: this.pageSize
-            }).then(res => {
-                const rows = res.data.rows || [];
-                if (this.pageNum === 1) {
-                    this.bookList = rows;
-                } else {
-                    this.bookList = [...this.bookList, ...rows];
-                }
-            })
+    import RecommendItem from '../components/recommend-item/index.vue';
+    import HotRecommendItem from '../components/hot-recommend-item/index.vue';
+    import Navbar from '@/components/navbar/navbar.vue';
+
+    export default {
+        components: {
+            RecommendItem,
+            HotRecommendItem,
+            Navbar,
         },
-        goBack() {
-            uni.navigateBack();
+        data() {
+            return {
+                keyword: '',
+                pageNum: 1,
+                pageSize: 10,
+                hotBook: {},
+                bookList: [],
+                loadStatus: 'loadmore',
+                navbarBackground: 'transparent',
+                navbarTitleColor: '#ffffff',
+                navbarIconColor: '#ffffff',
+                sort: 1, // 1-综合 2-价格升序 3-价格降序 4-销量升序 5-销量降序
+                showFilter: false,
+                tempMinPrice: '',
+                tempMaxPrice: '',
+                minPrice: '',
+                maxPrice: ''
+            }
+        },
+        onPullDownRefresh() {
+            this.pageNum = 1;
+            this.loadStatus = 'loading';
+            this.loadData();
         },
-        toFeedback() {
-            uni.navigateTo({
-                url: '/pages-sell/pages/feedback'
-            });
+        onReachBottom() {
+            if (this.loadStatus === 'nomore') return;
+            this.pageNum++;
+            this.loadStatus = 'loading';
+            this.loadData();
         },
-        onSearch(val) {
-            console.log('Search:', val);
+        onPageScroll(e) {
+            if (e.scrollTop > 50) {
+                this.navbarBackground = '#ffffff';
+                this.navbarTitleColor = '#000000';
+                this.navbarIconColor = '#000000';
+            } else {
+                this.navbarBackground = 'transparent';
+                this.navbarTitleColor = '#ffffff';
+                this.navbarIconColor = '#ffffff';
+            }
         },
-        addToCart(data) {
-            // data now contains { product, quality, quantity } from the popup
-            console.log('Added to cart:', data);
-            uni.showToast({
-                title: '已加入购物车',
-                icon: 'success'
-            });
+        onLoad(options) {
+            this.keyword = options.keyword ? decodeURIComponent(options.keyword) : '';
+            this.loadData();
+        },
+        methods: {
+            loadData() {
+                const params = {
+                    keyword: this.keyword,
+                    pageNum: this.pageNum,
+                    pageSize: this.pageSize,
+                    sort: this.sort
+                };
+                if (this.minPrice) params.minPrice = this.minPrice;
+                if (this.maxPrice) params.maxPrice = this.maxPrice;
+
+                this.$u.api.getSearchKeywordAjax(params).then(res => {
+                    uni.stopPullDownRefresh();
+                    const rows = res.data.rows || [];
+                    if (this.pageNum === 1) {
+                        this.bookList = rows;
+                    } else {
+                        this.bookList = [...this.bookList, ...rows];
+                    }
+
+                    if (rows.length < this.pageSize) {
+                        this.loadStatus = 'nomore';
+                    } else {
+                        this.loadStatus = 'loadmore';
+                    }
+                }).catch(() => {
+                    uni.stopPullDownRefresh();
+                    this.loadStatus = 'loadmore';
+                });
+
+                if (this.pageNum === 1) {
+                    this.$u.api.getSearchRecommendAjax().then(res => {
+                        if (res.code == 200) {
+                            res.data.discountDesc = res.data.productPrice ? (res.data.productPrice / res.data.price) + '折' : '';
+                            res.data.discountPrice = res.data.productPrice ? res.data.price - res.data.productPrice : '';
+                            this.hotBook = res.data;
+                        }
+                    });
+                }
+            },
+            handleSort(type) {
+                if (type === 1) {
+                    if (this.sort === 1) return;
+                    this.sort = 1;
+                } else if (type === 'price') {
+                    if (this.sort === 2) {
+                        this.sort = 3;
+                    } else {
+                        this.sort = 2;
+                    }
+                } else if (type === 'sales') {
+                    if (this.sort === 5) {
+                        this.sort = 4;
+                    } else {
+                        this.sort = 5;
+                    }
+                }
+                this.pageNum = 1;
+                this.loadStatus = 'loading';
+                this.loadData();
+            },
+            resetFilter() {
+                this.tempMinPrice = '';
+                this.tempMaxPrice = '';
+            },
+            confirmFilter() {
+                this.minPrice = this.tempMinPrice;
+                this.maxPrice = this.tempMaxPrice;
+                this.showFilter = false;
+                this.pageNum = 1;
+                this.loadStatus = 'loading';
+                this.loadData();
+            },
+            goBack() {
+                uni.navigateBack();
+            },
+            toFeedback() {
+                uni.navigateTo({
+                    url: '/pages-sell/pages/feedback'
+                });
+            },
+            onSearch(val) {
+                console.log('Search:', val);
+                this.keyword = val;
+                this.pageNum = 1;
+                this.loadData();
+            },
+            addToCart(data) {
+                // data now contains { product, quality, quantity } from the popup
+                console.log('Added to cart:', data);
+                uni.showToast({
+                    title: '已加入购物车',
+                    icon: 'success'
+                });
+            }
         }
     }
-}
 </script>
 
 <style lang="scss" scoped>
-.search-result-page {
-    min-height: 100vh;
-    background-color: #F6F6F6;
-    font-family: 'Source Han Sans SC', sans-serif;
-    position: relative;
-}
-
-/* 顶部大背景图 */
-.top-bg-image {
-    position: fixed;
-    top: 0;
-    left: 0;
-    width: 100%;
-    z-index: 0;
-    display: block;
-}
-
-.search-bar-wrapper {
-    position: relative;
-    z-index: 2;
-    display: flex;
-    align-items: center;
-    padding: 0 30rpx;
-    height: 88rpx;
-    width: 100%;
-}
-
-.banner-section {
-    position: relative;
-    width: 100%;
-    z-index: 1;
-    padding: 10rpx 30rpx;
-
-    .top-banner {
+    .search-result-page {
+        min-height: 100vh;
+        background-color: #F6F6F6;
+        font-family: 'Source Han Sans SC', sans-serif;
+        position: relative;
+    }
+
+    /* 顶部大背景图 */
+    .top-bg-image {
+        position: fixed;
+        top: 0;
+        left: 0;
         width: 100%;
+        z-index: 0;
         display: block;
     }
-}
 
-.content-area {
-    position: relative;
-    z-index: 2;
-    padding: 30rpx 30rpx;
-    border-radius: 30rpx 30rpx 0 0;
-    min-height: 500rpx;
+    .search-bar-wrapper {
+        position: relative;
+        z-index: 2;
+        display: flex;
+        align-items: center;
+        padding: 0 30rpx;
+        height: 88rpx;
+        width: 100%;
+    }
 
-    .section-block {
-        margin-bottom: 30rpx;
-        background-color: #fff;
-        padding: 30rpx 24rpx;
-        border-radius: 20rpx;
+    .banner-section {
+        position: relative;
+        width: 100%;
+        z-index: 1;
+        padding: 10rpx 30rpx;
 
-        .section-title {
-            font-size: 32rpx;
-            font-weight: bold;
-            color: #333;
-            margin-bottom: 20rpx;
+        .top-banner {
+            width: 100%;
             display: block;
         }
     }
-}
 
-.filter-bar {
-    display: flex;
-    justify-content: space-between;
-    align-items: center;
-    margin-bottom: 20rpx;
+    .content-area {
+        position: relative;
+        z-index: 2;
+        padding: 30rpx 30rpx;
+        border-radius: 30rpx 30rpx 0 0;
+        min-height: 500rpx;
+
+        .section-block {
+            margin-bottom: 30rpx;
+            background-color: #fff;
+            padding: 30rpx 24rpx;
+            border-radius: 20rpx;
+
+            .section-title {
+                font-size: 32rpx;
+                font-weight: bold;
+                color: #333;
+                margin-bottom: 20rpx;
+                display: block;
+            }
+        }
+    }
 
-    .filter-item {
+    .filter-bar {
         display: flex;
+        justify-content: space-between;
         align-items: center;
-        font-size: 28rpx;
-        color: #666;
+        margin-bottom: 20rpx;
+
+        .filter-item {
+            display: flex;
+            align-items: center;
+            font-size: 28rpx;
+            color: #666;
+
+            &.active {
+                color: #333;
+                font-weight: bold;
 
-        &.active {
-            color: #333;
-            font-weight: bold;
+                .triangle-icon {
+                    border-top-color: #333;
+                }
+            }
+
+            text {
+                margin-right: 6rpx;
+            }
 
             .triangle-icon {
-                border-top-color: #333;
+                width: 0;
+                height: 0;
+                border-left: 8rpx solid transparent;
+                border-right: 8rpx solid transparent;
+                border-top: 10rpx solid #666;
             }
-        }
 
-        text {
-            margin-right: 6rpx;
-        }
+            .sort-icons {
+                display: flex;
+                flex-direction: column;
+                margin-left: 4rpx;
+                justify-content: center;
+                gap: 4rpx;
+                
+                u-icon {
+                    margin: -2rpx 0;
+                }
+            }
 
-        .triangle-icon {
-            width: 0;
-            height: 0;
-            border-left: 8rpx solid transparent;
-            border-right: 8rpx solid transparent;
-            border-top: 10rpx solid #666;
+            .icon-filter {
+                width: 24rpx;
+                height: 24rpx;
+                margin-left: 4rpx;
+            }
         }
+    }
 
-        .sort-icons {
-            display: flex;
-            flex-direction: column;
-            margin-left: 4rpx;
+    .book-list {
+        background: #fff;
+        border-radius: 20rpx;
+        padding: 0 24rpx;
+        padding-bottom: 40rpx;
+    }
+
+    .filter-popup {
+        background-color: #fff;
+        height: 100%;
+        display: flex;
+        flex-direction: column;
+
+        .filter-content {
+            flex: 1;
+            padding: 30rpx;
+
+            .filter-title {
+                font-size: 30rpx;
+                font-weight: bold;
+                color: #333;
+                margin-bottom: 30rpx;
+            }
+
+            .price-inputs {
+                display: flex;
+                align-items: center;
+                justify-content: space-between;
 
-            .icon-sort {
-                width: 12rpx;
-                height: 8rpx;
-                margin: 2rpx 0;
+                u-input {
+                    flex: 1;
+                }
+
+                .divider {
+                    margin: 0 20rpx;
+                    color: #999;
+                }
             }
         }
 
-        .icon-filter {
-            width: 24rpx;
-            height: 24rpx;
-            margin-left: 4rpx;
+        .filter-footer {
+            display: flex;
+            height: 100rpx;
+
+            .btn {
+                flex: 1;
+                display: flex;
+                align-items: center;
+                justify-content: center;
+                font-size: 32rpx;
+
+                &.reset {
+                    background-color: #fff;
+                    color: #666;
+                    border-top: 1rpx solid #eee;
+                }
+
+                &.confirm {
+                    background-color: #38C148;
+                    color: #fff;
+                }
+            }
         }
     }
-}
-
-.book-list {
-    padding-bottom: 40rpx;
-    background: #fff;
-    border-radius: 20rpx;
-    padding: 0 24rpx;
-}
 </style>