1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980 |
- <template>
- <view class="center">
- <view class="top">
- <image class="top-bg" src="../../static/img/top-bg.png" mode=""></image>
- <view class="title">
- 新品
- </view>
- </view>
- <swiper class="carousel" autoplay="true" duration="400" interval="5000" @change="swiperChange">
- <swiper-item class="carousel-item" @click="bannerNavToUrl(item)"><image src="../../static/img/new.png" /></swiper-item>
- </swiper>
- <view class="hotgoods" v-if="firstList.length != 0">
- <view class="hotgoods-item" v-for="item in firstList" :key="item.id" @click="navToDetailPage(item)">
- <view class="image-wrapper"><image :src="item.image" mode="scaleToFill"></image></view>
- <view class="title clamp margin-c-20">{{ item.store_name }}</view>
- <view class="hot-price">
- <view class="price">
- <text class="font-size-sm">¥</text>
- {{ item.price }}
- </view>
- </view>
- </view>
- </view>
- <u-tabbar activeColor="#f42b4e" v-model="current" :list="tabbar" ></u-tabbar>
- </view>
- </template>
- <script>
- import { tabbar1 } from '@/utils/tabbar.js';
- export default {
- data() {
- return {
- current: 3,
- tabbar: tabbar1,
- firstList:[],
- }
- }
- }
- </script>
- <style lang="less">
- page,
- .center {
- min-height: 100%;
- height: auto;
- background: #FFFFFF;
- }
- .top {
- position: relative;
- width: 100%;
- height: 400rpx;
- .top-bg {
- position: absolute;
- top: 0;
- left: 0;
- right: 0;
- width: 100%;
- height: 100%;
- }
- .title {
- position: relative;
- z-index: 2;
- padding: 30rpx 0;
- font-size: 34rpx;
- font-family: PingFang SC;
- font-weight: bold;
- color: #FFFFFF;
- text-align: center;
- }
- }
- .carousel {
- width: 700rpx;
- height: 300rpx;
- margin: -280rpx auto 0;
- image {
- width: 700rpx;
- height: 300rpx;
- }
- }
- </style>
|