| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175 |
- <template>
- <view class="hot-sell-page">
- <!-- Header Background -->
- <image class="header-bg" src="/pages-sell/static/hot/top-bg.png" mode="widthFix"></image>
-
- <!-- Custom Navbar -->
- <Navbar></Navbar>
- <!-- Header Content -->
- <view class="header-content">
- <view class="title-area">
- <text class="main-title">热销榜单</text>
- <text class="sub-title">Best Sellers</text>
- </view>
- </view>
- <!-- List Content -->
- <view class="list-container">
- <hot-sell-item
- v-for="(item, index) in bookList"
- :key="index"
- :rank="index + 1"
- :item="item"
- ></hot-sell-item>
- </view>
- </view>
- </template>
- <script>
- import HotSellItem from '../components/hot-sell-item/index.vue'
- import Navbar from '@/components/navbar/navbar.vue'
- export default {
- components: {
- HotSellItem,
- Navbar
- },
- data() {
- return {
- statusBarHeight: 20,
- bookList: [
- {
- title: '山河岁月',
- author: '本书编写组',
- price: '6.80',
- originalPrice: '36.80',
- cover: 'https://img.yzcdn.cn/vant/cat.jpeg'
- },
- {
- title: '山河岁月',
- author: '本书编写组',
- price: '6.80',
- originalPrice: '36.80',
- cover: 'https://img.yzcdn.cn/vant/cat.jpeg'
- },
- {
- title: '山河岁月',
- author: '本书编写组',
- price: '6.80',
- originalPrice: '36.80',
- cover: 'https://img.yzcdn.cn/vant/cat.jpeg'
- },
- {
- title: '山河岁月',
- author: '本书编写组',
- price: '6.80',
- originalPrice: '36.80',
- cover: 'https://img.yzcdn.cn/vant/cat.jpeg'
- },
- {
- title: '山河岁月',
- author: '本书编写组',
- price: '6.80',
- originalPrice: '36.80',
- cover: 'https://img.yzcdn.cn/vant/cat.jpeg'
- },
- {
- title: '山河岁月',
- author: '本书编写组',
- price: '6.80',
- originalPrice: '36.80',
- cover: 'https://img.yzcdn.cn/vant/cat.jpeg'
- },
- {
- title: '山河岁月',
- author: '本书编写组',
- price: '6.80',
- originalPrice: '36.80',
- cover: 'https://img.yzcdn.cn/vant/cat.jpeg'
- }
- ]
- }
- },
- created() {
- const systemInfo = uni.getSystemInfoSync();
- this.statusBarHeight = systemInfo.statusBarHeight || 20;
- },
- methods: {
- goBack() {
- uni.navigateBack();
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- .hot-sell-page {
- min-height: 100vh;
- background-color: #fff;
- position: relative;
- }
- .header-bg {
- position: fixed;
- top: 0;
- left: 0;
- width: 100%;
- height: 458rpx;
- z-index: 0;
- }
- .custom-navbar {
- position: fixed;
- top: 0;
- left: 0;
- width: 100%;
- z-index: 100;
-
- .navbar-content {
- height: 44px;
- display: flex;
- align-items: center;
- padding-left: 40rpx;
-
- .back-icon {
- width: 16rpx;
- height: 26rpx;
- }
- }
- }
- .header-content {
- position: relative;
- z-index: 1;
- padding: 0 40rpx;
- height: 200rpx; /* Adjust based on bg image height */
- display: flex;
- flex-direction: column;
- justify-content: center;
- margin-top: -20rpx;
- .title-area {
- .main-title {
- font-size: 60rpx;
- font-weight: bold;
- color: #0B2E16;
- display: block;
- }
- .sub-title {
- font-size: 36rpx;
- color: #72967D;
- }
- }
- }
- .list-container {
- position: relative;
- z-index: 1;
- background-color: #fff;
- border-radius: 40rpx 40rpx 0 0; /* Rounded top corners for list area */
- padding: 30rpx 40rpx;
- min-height: 500rpx;
- }
- </style>
|