detail.vue 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215
  1. <template>
  2. <view class="container">
  3. <!-- 搜索框区域 -->
  4. <view class="search">
  5. <u-icon name="search" size="42" color="#888888"></u-icon>
  6. <input v-model="searchValue" class="search_input" type="text" placeholder="搜索可用商家名称" />
  7. <view class="btn">搜索</view>
  8. </view>
  9. <!-- 列表区域 -->
  10. <view class="body">
  11. <view class="body_header">
  12. <view class="header_left">全部可用商家</view>
  13. <view class="header_right">
  14. <text class="text">6</text>
  15. </view>
  16. </view>
  17. <view class="body_list">
  18. <!-- 每一个商家区域 -->
  19. <view class="list_item" v-for="item in 6" :key="item">
  20. <image class="item_img" src="/running/static/hb_bg.png" mode="aspectFill"></image>
  21. <view class="item_right">
  22. <view class="right_name">妈妈菜套餐饭(二食堂)</view>
  23. <view class="right_info">
  24. <view class="info_score">4.97分</view>
  25. <view class="info_sale">月售1000+</view>
  26. <view class="info_way">平台配送</view>
  27. </view>
  28. <view class="right_msg">
  29. <view class="msg_1">起送¥7</view>
  30. <view class="msg_2">配送¥1</view>
  31. <view class="msg_3">45分钟 816m</view>
  32. </view>
  33. <view class="right_time">营业时间:9:00 - 19:20</view>
  34. <view class="right_tags">
  35. <view class="tag">全场85折</view>
  36. </view>
  37. </view>
  38. </view>
  39. </view>
  40. </view>
  41. </view>
  42. </template>
  43. <script>
  44. export default {
  45. data() {
  46. return {
  47. searchValue: ''
  48. }
  49. },
  50. onReachBottom() {
  51. console.log(1)
  52. },
  53. methods: {}
  54. }
  55. </script>
  56. <style lang="scss" scoped>
  57. .container {
  58. padding: 10rpx 20rpx;
  59. height: 100vh;
  60. background-color: #fff9ef;
  61. .search {
  62. display: flex;
  63. justify-content: space-between;
  64. align-items: center;
  65. margin: auto;
  66. padding-left: 20rpx;
  67. width: 625rpx;
  68. height: 60rpx;
  69. border-radius: 60rpx;
  70. border: 2rpx solid #5b9188;
  71. .search_input {
  72. padding: 0 10rpx;
  73. flex: 1;
  74. }
  75. .btn {
  76. display: flex;
  77. justify-content: center;
  78. align-items: center;
  79. width: 120rpx;
  80. height: 60rpx;
  81. font-size: 24rpx;
  82. color: #fff;
  83. border-radius: 60rpx;
  84. background: linear-gradient(90deg, #74a498 0%, #5a8f86 100%);
  85. }
  86. }
  87. .body {
  88. margin-top: 40rpx;
  89. .body_header {
  90. display: flex;
  91. align-items: center;
  92. justify-content: space-between;
  93. margin-bottom: 25rpx;
  94. font-weight: bold;
  95. font-size: 32rpx;
  96. .header_left {
  97. }
  98. .header_right {
  99. .text {
  100. margin: 0 10rpx;
  101. color: #5a9087;
  102. font-size: 28rpx;
  103. }
  104. }
  105. }
  106. .body_list {
  107. .list_item {
  108. display: flex;
  109. margin-bottom: 20rpx;
  110. padding: 15rpx;
  111. width: 710rpx;
  112. border-radius: 24rpx;
  113. background-color: #fff;
  114. .item_img {
  115. width: 220rpx;
  116. height: 220rpx;
  117. }
  118. .item_right {
  119. flex: 1;
  120. padding-left: 15rpx;
  121. .right_name {
  122. margin-bottom: 8rpx;
  123. font-size: 32rpx;
  124. font-weight: bold;
  125. }
  126. .right_info {
  127. display: flex;
  128. align-items: center;
  129. margin-bottom: 8rpx;
  130. .info_score {
  131. font-size: 26rpx;
  132. color: #efa443;
  133. }
  134. .info_sale {
  135. margin-left: 10rpx;
  136. font-size: 22rpx;
  137. }
  138. .info_way {
  139. margin-left: 150rpx;
  140. padding: 2rpx;
  141. height: 30rpx;
  142. font-size: 16rpx;
  143. color: #999999;
  144. border-radius: 6rpx;
  145. border: 2rpx solid #999999;
  146. }
  147. }
  148. .right_msg {
  149. display: flex;
  150. align-items: center;
  151. margin-bottom: 8rpx;
  152. color: #808080;
  153. font-size: 24rpx;
  154. .msg_2 {
  155. margin-left: 10rpx;
  156. }
  157. .msg_3 {
  158. margin-left: 100rpx;
  159. }
  160. }
  161. .right_time {
  162. margin-bottom: 8rpx;
  163. width: 300rpx;
  164. height: 40rpx;
  165. font-size: 24rpx;
  166. color: #efa443;
  167. border-radius: 6rpx;
  168. background-color: #fdf7e9;
  169. }
  170. .right_tags {
  171. display: flex;
  172. flex-wrap: wrap;
  173. align-items: center;
  174. .tag {
  175. margin-right: 8rpx;
  176. padding: 0 4rpx;
  177. height: 34rpx;
  178. color: #d43030;
  179. font-size: 22rpx;
  180. border-radius: 6rpx;
  181. border: 2rpx solid #d43030;
  182. }
  183. }
  184. }
  185. }
  186. }
  187. }
  188. }
  189. </style>