index.vue 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185
  1. <template>
  2. <view class="container">
  3. <image class="headImg" mode="aspectFill" src="https://mall.rongtongh.cn/storage/img/homeHead.jpeg"></image>
  4. <view class="tabs">
  5. <view class="tab">
  6. <image src="https://mall.rongtongh.cn/storage/img/Frame3.png" alt="">
  7. <span>全部</span>
  8. </view>
  9. <view class="tab" @click="$navigateTo('/pages/excellentValue/excellentValue')">
  10. <image src="https://mall.rongtongh.cn/storage/img/Frame4.png" alt="">
  11. <span>超值挑战</span>
  12. </view>
  13. <view class="tab">
  14. <image src="https://mall.rongtongh.cn/storage/img/Frame2.png" alt="">
  15. <span>拍卖专区</span>
  16. </view>
  17. <view class="tab">
  18. <image src="https://mall.rongtongh.cn/storage/img/Frame1.png" alt="">
  19. <span>VIP福利</span>
  20. </view>
  21. </view>
  22. <view class="buttons">
  23. <view class="left">
  24. <image src="https://mall.rongtongh.cn/storage/img/button3.png" @click="toInvite"></image>
  25. </view>
  26. <view class="right">
  27. <image src="https://mall.rongtongh.cn/storage/img/button1.png"></image>
  28. <image src="https://mall.rongtongh.cn/storage/img/button2.png"></image>
  29. </view>
  30. </view>
  31. <view class="list-title">
  32. - 热门推荐 -
  33. </view>
  34. <view class="list">
  35. <view class="ka" v-for="(item, index) in kaList">
  36. <view class="top">
  37. <image mode="aspectFit" src="https://mall.rongtongh.cn/storage/img/ka.jpeg"></image>
  38. </view>
  39. <view class="ka-info">
  40. <view class="ka-name">
  41. 宝可梦简中原盒拆拆乐
  42. </view>
  43. <view class="row">
  44. <uni-tag text="创意热销" inverted type="default"></uni-tag>
  45. <view class="money">
  46. ¥9.9
  47. </view>
  48. </view>
  49. </view>
  50. </view>
  51. </view>
  52. </view>
  53. </template>
  54. <script>
  55. export default {
  56. data() {
  57. return {
  58. kaList: 6,
  59. }
  60. },
  61. onLoad(query) {
  62. if (query.inviteId) {
  63. getApp().globalData.inviteId = query.inviteId;
  64. } else {
  65. const scene = decodeURIComponent(query.scene)
  66. let inviteId = scene.split("=")[1]
  67. console.log(inviteId, 'inviteId')
  68. getApp().globalData.inviteId = inviteId;
  69. }
  70. },
  71. methods: {
  72. toInvite() {
  73. wx.navigateTo({url: '/pages/invite/invite'})
  74. }
  75. }
  76. }
  77. </script>
  78. <style scoped lang="scss">
  79. .container {
  80. /* padding: 20px; */
  81. font-size: 14px;
  82. line-height: 24px;
  83. }
  84. .headImg {
  85. height: 180px;
  86. width: 100%;
  87. }
  88. .tabs {
  89. display: flex;
  90. justify-content: space-around;
  91. margin-top: 10px;
  92. > .tab {
  93. width: 20%;
  94. display: flex;
  95. flex-direction: column;
  96. justify-content: center;
  97. align-items: center;
  98. > image {
  99. width: 40px;
  100. height: 40px;
  101. }
  102. }
  103. }
  104. .buttons {
  105. margin-top: 5px;
  106. padding: 10px;
  107. display: flex;
  108. justify-content: space-between;
  109. > .left {
  110. width: calc(50vw - 15px);
  111. height: 40vw;
  112. image {
  113. width: 100%;
  114. height: 100%;
  115. }
  116. }
  117. > .right {
  118. width: calc(50vw - 15px);
  119. height: 40vw;
  120. display: flex;
  121. flex-direction: column;
  122. justify-content: space-between;
  123. align-items: center;
  124. image {
  125. width: 100%;
  126. height: calc(50% - 5px);
  127. }
  128. }
  129. }
  130. .list-title {
  131. font-size: 16px;
  132. font-weight: 600;
  133. text-align: center;
  134. padding: 10px;
  135. }
  136. .list {
  137. display: grid;
  138. grid-template-columns: 1fr 1fr;
  139. grid-gap: 10px;
  140. padding: 10px;
  141. .ka {
  142. width: calc(50vw - 15px);
  143. box-shadow: 0px 2px 8px 2px rgba(0,0,0,0.1);
  144. border-radius: 10px;
  145. // height: 60vw;
  146. .top {
  147. // height: 60vw;
  148. background: linear-gradient(180deg, #FAF1A7 0%, #FFE456 100%);
  149. text-align: center;
  150. display: flex;
  151. justify-content: center;
  152. image {
  153. width: 35vw;
  154. height: 50vw;
  155. }
  156. }
  157. .ka-info {
  158. padding: 10px;
  159. .ka-name {
  160. font-size: 15px;
  161. font-weight: 600;
  162. }
  163. .row {
  164. margin-top: 5px;
  165. display: flex;
  166. justify-content: space-between;
  167. .money {
  168. font-size: 16px;
  169. font-weight: 600;
  170. color: #FF2C43;
  171. }
  172. }
  173. }
  174. }
  175. }
  176. </style>