ticket.vue 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174
  1. <template>
  2. <view class="ticket-box iPhone-bottom flex-common-css box-border-box">
  3. <view class="nav-box">
  4. <image class="head-bg" src="@/static/img/buy/ticket-bg.png" mode="scaleToFill"></image>
  5. <Nav :leftShow='false' :customNav='true' bgckgroundBox='transparent'>
  6. <template>
  7. <view slot="custom" class="align-items-center">
  8. <uni-icons type="left" size="20" @click="toBack()" color="#fff"></uni-icons>
  9. <view class="w-390 text-overflow-ellipsis-one fs-36 fw-400 fc-f">票务</view>
  10. </view>
  11. </template>
  12. </Nav>
  13. <view class="box-border-box plr-24 mb-32">
  14. <view class="head-search">
  15. <uni-icons class="s-icon" type="search" size="19"></uni-icons>
  16. <input type="text" placeholder="搜一搜带你玩周边">
  17. <view class="head-search-buttom text-align-center fs-28 fw-500 fc-f">搜索</view>
  18. </view>
  19. </view>
  20. <view class="display-flex box-border-box plr-24 nav-list">
  21. <view class="text-align-center nav-item" v-for="(item,i) in navList" :key="i">
  22. <image class="nav-img" :src="item.img" mode="scaleToFill"></image>
  23. <view class="fs-24 w-96" :class="type == item.id?'fw-600 fc-41ABF5':'fw-400'">{{item.name}}</view>
  24. </view>
  25. </view>
  26. </view>
  27. <scroll-view class="scroll-view-css box-border-box plr-24" scroll-y="true" @scrolltolower="scrolltolower">
  28. <view class="list-item display-flex" v-for="(item,i) in 10" :key="i" @click="toDet(item)">
  29. <image src="@/static/img/my/lqzx-bg.png" mode="scaleToFill"></image>
  30. <view class="flex-1">
  31. <view class="w-470 text-overflow-ellipsis fw-600 fs-32 mb-48">大耳朵游乐场大耳朵游乐场11大耳朵游v乐场v</view>
  32. <view class=" flex-justify-space align-items-flex-end">
  33. <view class="">
  34. <span class="fs-24 fw-400 fc-FB3D03">¥</span>
  35. <span class="fw-b fs-40 fc-FB3D03">3.9</span>
  36. <span class="text-line-through fs-24 fc-9 fw-400">¥3.9</span>
  37. </view>
  38. <view class="to-box fs-28 fw-400 fc-f text-align-center">马上抢</view>
  39. </view>
  40. </view>
  41. </view>
  42. </scroll-view>
  43. </view>
  44. </template>
  45. <script>
  46. import tools from "@/service/tools";
  47. export default {
  48. data(){
  49. return{
  50. type:0,
  51. navList:[
  52. {name:"全部",id:0,img:require('@/static/img/buy/t-all.png')},
  53. {name:"动植物园",id:1,img:require('@/static/img/buy/t-all.png')},
  54. {name:"动植物园",id:1,img:require('@/static/img/buy/t-all.png')},
  55. {name:"动植物园",id:1,img:require('@/static/img/buy/t-all.png')},
  56. {name:"动植物园",id:1,img:require('@/static/img/buy/t-all.png')},
  57. {name:"动植物园",id:1,img:require('@/static/img/buy/t-all.png')},
  58. {name:"动植物园",id:1,img:require('@/static/img/buy/t-all.png')},
  59. ]
  60. }
  61. },
  62. onShow() {
  63. },
  64. methods:{
  65. toBack(){
  66. tools.leftClick()
  67. },
  68. scrolltolower(){
  69. console.log('触底');
  70. },
  71. toDet(item){
  72. uni.navigateTo({
  73. url:"/pages-buy/ticket-det"
  74. })
  75. },
  76. },
  77. }
  78. </script>
  79. <style>
  80. body{
  81. background-color: #fff;
  82. }
  83. </style>
  84. <style scoped lang="scss">
  85. .w-470{
  86. width: 470rpx;
  87. }
  88. .ticket-box{
  89. .list-item{
  90. width: 100%;
  91. min-height: 200rpx;
  92. margin-bottom: 40rpx;
  93. background-color: #fff;
  94. image{
  95. width: 200rpx;
  96. height: 200rpx;
  97. border-radius: 20rpx;
  98. margin-right: 20rpx;
  99. }
  100. .to-box{
  101. width: 132rpx;
  102. height: 52rpx;
  103. line-height: 52rpx;
  104. background: linear-gradient( 225deg, #41ABF5 0%, #5BD8FB 100%);
  105. border-radius: 200rpx;
  106. }
  107. }
  108. .nav-box{
  109. width: 100%;
  110. height: 452rpx;
  111. position: relative;
  112. .head-bg{
  113. position: absolute;
  114. top: 0;
  115. left: 0;
  116. width: 100%;
  117. height: 452rpx;
  118. z-index: -1;
  119. }
  120. .head-search{
  121. width: 100%;
  122. position: relative;
  123. .s-icon{
  124. position: absolute;
  125. left: 24rpx;
  126. top: 20rpx;
  127. }
  128. input{
  129. width:100%;
  130. height: 72rpx;
  131. background: #FFFFFF;
  132. border-radius: 200rpx;
  133. box-sizing: border-box;
  134. padding: 0 130rpx 0 68rpx;
  135. font-size: 32rpx;
  136. }
  137. .head-search-buttom{
  138. width: 120rpx;
  139. height: 60rpx;
  140. background: linear-gradient( 90deg, #2CE6F8 0%, #41ABF5 100%);
  141. border-radius: 200rpx;
  142. line-height: 60rpx;
  143. position: absolute;
  144. right: 6rpx;
  145. top: 6rpx;
  146. }
  147. }
  148. .nav-list{
  149. overflow-x: scroll;
  150. .nav-item{
  151. width: 96rpx !important;
  152. height: 126rpx;
  153. margin-right: 48rpx;
  154. .nav-img{
  155. width: 80rpx;
  156. height: 80rpx;
  157. margin: 0 auto 12rpx auto;
  158. z-index: 10;
  159. }
  160. .w-96{
  161. width: 96rpx;
  162. }
  163. }
  164. }
  165. }
  166. }
  167. </style>