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