new.vue 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. <template>
  2. <view class="center">
  3. <view class="top">
  4. <image class="top-bg" src="../../static/img/top-bg.png" mode=""></image>
  5. <view class="title">
  6. 新品
  7. </view>
  8. </view>
  9. <swiper class="carousel" autoplay="true" duration="400" interval="5000" @change="swiperChange">
  10. <swiper-item class="carousel-item" @click="bannerNavToUrl(item)"><image src="../../static/img/new.png" /></swiper-item>
  11. </swiper>
  12. <view class="hotgoods" v-if="firstList.length != 0">
  13. <view class="hotgoods-item" v-for="item in firstList" :key="item.id" @click="navToDetailPage(item)">
  14. <view class="image-wrapper"><image :src="item.image" mode="scaleToFill"></image></view>
  15. <view class="title clamp margin-c-20">{{ item.store_name }}</view>
  16. <view class="hot-price">
  17. <view class="price">
  18. <text class="font-size-sm">¥</text>
  19. {{ item.price }}
  20. </view>
  21. </view>
  22. </view>
  23. </view>
  24. <u-tabbar activeColor="#f42b4e" v-model="current" :list="tabbar" ></u-tabbar>
  25. </view>
  26. </template>
  27. <script>
  28. import { tabbar1 } from '@/utils/tabbar.js';
  29. export default {
  30. data() {
  31. return {
  32. current: 3,
  33. tabbar: tabbar1,
  34. firstList:[],
  35. }
  36. }
  37. }
  38. </script>
  39. <style lang="less">
  40. page,
  41. .center {
  42. min-height: 100%;
  43. height: auto;
  44. background: #FFFFFF;
  45. }
  46. .top {
  47. position: relative;
  48. width: 100%;
  49. height: 400rpx;
  50. .top-bg {
  51. position: absolute;
  52. top: 0;
  53. left: 0;
  54. right: 0;
  55. width: 100%;
  56. height: 100%;
  57. }
  58. .title {
  59. position: relative;
  60. z-index: 2;
  61. padding: 30rpx 0;
  62. font-size: 34rpx;
  63. font-family: PingFang SC;
  64. font-weight: bold;
  65. color: #FFFFFF;
  66. text-align: center;
  67. }
  68. }
  69. .carousel {
  70. width: 700rpx;
  71. height: 300rpx;
  72. margin: -280rpx auto 0;
  73. image {
  74. width: 700rpx;
  75. height: 300rpx;
  76. }
  77. }
  78. </style>