ping.vue 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163
  1. <template>
  2. <view class="center">
  3. <image class="logo-img" src="../../static/img/img01.png"></image>
  4. <view class="goods-list">
  5. <view v-for="(item, index) in producList" :key="index" class="guess-item">
  6. <image :src="item.background_image"></image>
  7. <view class="guess-box">
  8. <view class="title clamp2">
  9. <view class="tuanF">
  10. <view class="tuan">
  11. <image class="tuan-image" src="../../static/img/fire.png" mode=""></image>
  12. <view class="tuan-font">11人团1人中</view>
  13. </view>
  14. </view>
  15. {{ item.name }}
  16. </view>
  17. <view class="price-box flex">
  18. <view class="jiang">门票费:{{item.ticket}} {{item.ticket_money_type}}</view>
  19. </view>
  20. <view class="price">{{ item.cost_money_type === item.cost_2_money_type? item.cost*1+item.cost_money_type : item.cost*1+item.cost_money_type + '/' +item.cost_2*1 + item.cost_2_money_type}}</view>
  21. <view class="btn" @click="navToDetailPage(item)">马上拼</view>
  22. </view>
  23. </view>
  24. </view>
  25. </view>
  26. </template>
  27. <script>
  28. import { lala, lalaDetial } from '@/api/product.js';
  29. export default {
  30. data() {
  31. return {
  32. producList: []
  33. };
  34. },
  35. onLoad() {
  36. this.loadData();
  37. },
  38. methods: {
  39. navToDetailPage(item) {
  40. uni.navigateTo({
  41. url: '/pages/product/pingDetails?id=' + item.id
  42. });
  43. },
  44. loadData() {
  45. lala({}).then(({data}) => {
  46. console.log(data,'123456');
  47. this.producList = data.list.data
  48. });
  49. }
  50. }
  51. };
  52. </script>
  53. <style lang="scss">
  54. .center,
  55. page {
  56. height: 100%;
  57. background: #f8f6f6;
  58. }
  59. .logo-img {
  60. margin: 20rpx;
  61. width: 710rpx;
  62. height: 268rpx;
  63. }
  64. /* 商品列表 */
  65. .goods-list {
  66. display: flex;
  67. flex-wrap: wrap;
  68. padding: 0 30rpx;
  69. background: #fff;
  70. .guess-item {
  71. display: flex;
  72. width: 710rpx;
  73. height: 290rpx;
  74. background: #ffffff;
  75. box-shadow: 0px 0px 20rpx 0px rgba(50, 50, 52, 0.06);
  76. border-radius: 10rpx;
  77. padding: 15rpx;
  78. margin: 20rpx auto 0;
  79. position: relative;
  80. image {
  81. background: #000000;
  82. width: 260rpx;
  83. height: 260rpx;
  84. border-radius: 10rpx;
  85. }
  86. .guess-box {
  87. padding: 12rpx 0 0 24rpx;
  88. width: 436rpx;
  89. .title {
  90. font-size: 30rpx;
  91. padding-left: 4rpx;
  92. font-family: PingFang SC;
  93. font-weight: 500;
  94. color: #333333;
  95. width: 368rpx;
  96. line-height: 36rpx;
  97. .tuanF {
  98. display: inline-block;
  99. margin-right: 4rpx;
  100. position: relative;
  101. top: -6rpx;
  102. line-height: 1;
  103. .tuan {
  104. display: flex;
  105. align-items: center;
  106. padding: 10rpx;
  107. height: 36rpx;
  108. background: #ffebe9;
  109. border-radius: 18rpx;
  110. .tuan-image {
  111. width: 18rpx;
  112. height: 18rpx;
  113. }
  114. .tuan-font {
  115. display: inline;
  116. font-size: 20rpx;
  117. font-family: PingFang SC;
  118. font-weight: 500;
  119. color: #ff1135;
  120. margin-left: 2rpx;
  121. }
  122. }
  123. }
  124. }
  125. .price-box {
  126. margin-top: 70rpx;
  127. justify-content: flex-start;
  128. .jiang {
  129. padding-left: 2rpx;
  130. font-size: 24rpx;
  131. font-family: PingFang SC;
  132. font-weight: bold;
  133. color: #b59467;
  134. }
  135. }
  136. .price {
  137. font-size: 36rpx;
  138. font-family: PingFang SC;
  139. font-weight: bold;
  140. color: #ff1135;
  141. }
  142. .btn {
  143. width: 137rpx;
  144. height: 56rpx;
  145. background: linear-gradient(0deg, #2e58ff, #32c6ff);
  146. border-radius: 28rpx;
  147. font-size: 28rpx;
  148. font-family: PingFang SC;
  149. font-weight: 500;
  150. color: #ffffff;
  151. line-height: 56rpx;
  152. text-align: center;
  153. position: absolute;
  154. bottom: 25rpx;
  155. right: 25rpx;
  156. }
  157. }
  158. }
  159. }
  160. </style>