cart.vue 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220
  1. <template>
  2. <view class="container">
  3. <view class="swiper">
  4. <view class="swiper-text">共{{13}}件商品</view>
  5. </view>
  6. <view class="sort-right-box">
  7. <scroll-view :show-scrollbar="0" show-scrollbar="true" scroll-y="true" class="goods-box">
  8. <view class="goods-row" v-for="item in goodsList" @click="">
  9. <view class="goods-top">
  10. <view class="iconfont iconqueding select" @click=""></view>
  11. <view class="iconfont icondianpu magr5"></view>
  12. <view class="seller-label magr5">{{item.sellerName}}</view>
  13. <view class="iconfont iconfangxiang magr5"></view>
  14. </view>
  15. <view class="split-line"></view>
  16. <view class="goods-middle">
  17. <view class="iconfont iconqueding select-goods" @click=""></view>
  18. <cover-image class="goods-img" @click="" :src="item.url"></cover-image>
  19. <view>
  20. <view class="goods-details">{{item.details}}</view>
  21. <uni-tag text="类型:普通商品" size="small" type="default"></uni-tag>
  22. <view class="goods-spec">
  23. <text>{{item.spec}}</text>
  24. </view>
  25. </view>
  26. </view>
  27. <view class="split-line"></view>
  28. <view class="goods-bottom">
  29. <text class="magr5">合计</text>
  30. <view class="goods-spec magr5">
  31. <text>{{item.spec}}</text>
  32. </view>
  33. <view class="settle-btn"><text>结算(3)</text></view>
  34. </view>
  35. <!-- <cover-image class="goods-img" @click="" :src="item.url"></cover-image>
  36. <view class="goods-info">
  37. <view class="goods-name">{{item.name}}</view>
  38. <view class="goods-details">{{item.details}}</view>
  39. <view class="goods-number">
  40. <text class="goods-spec">{{item.spec}}</text>
  41. <text class="goods-sales">{{item.sales}}人付款</text>
  42. </view>
  43. </view>
  44. <view class="goods-cart"></view> -->
  45. </view>
  46. </scroll-view>
  47. </view>
  48. </view>
  49. </template>
  50. <script>
  51. import uniTag from "@/components/uni-tag/uni-tag.vue"
  52. export default {
  53. components: {'uni-tag': uniTag},
  54. data() {
  55. return {
  56. goodsList: [
  57. {name: '优质白菜', sellerName: '商家1', details: '优质白菜优质白菜优质白菜', spec: '¥80.00/kg', sales: 10},
  58. {name: '优质白菜', sellerName: '商家2', details: '优质白菜优质白菜优质白菜', spec: '¥80.00/kg', sales: 10},
  59. {name: '优质白菜', sellerName: '商家3', details: '优质白菜优质白菜优质白菜', spec: '¥80.00/kg', sales: 10},
  60. {name: '优质白菜', sellerName: '商家4', details: '优质白菜优质白菜优质白菜', spec: '¥80.00/kg', sales: 10},
  61. {name: '优质白菜', sellerName: '商家5', details: '优质白菜优质白菜优质白菜', spec: '¥80.00/kg', sales: 10},
  62. {name: '优质白菜', sellerName: '商家6', details: '优质白菜优质白菜优质白菜', spec: '¥80.00/kg', sales: 10}
  63. ],
  64. }
  65. },
  66. onLoad(){
  67. },
  68. methods: {
  69. }
  70. }
  71. </script>
  72. <style lang="less" scoped>
  73. page{
  74. width: 100%;
  75. height: 100%;
  76. }
  77. .magr5{
  78. margin-right: 5px;
  79. }
  80. .container{
  81. width: 100%;
  82. height: 100%;
  83. background-color: #F3F3F3;
  84. .swiper{
  85. height: 150px;
  86. background-color: #52A63A;
  87. border-radius: 0 0 40px 40px;
  88. .swiper-text{
  89. color: #FFFFFF;
  90. padding-left: 10px;
  91. padding-top: 15px;
  92. }
  93. }
  94. .sort-right-box{
  95. height: calc(100% - 58px);
  96. .goods-box{
  97. width: 100%;
  98. height: calc(100% - 44px);
  99. box-sizing: border-box;
  100. .goods-row{
  101. width: calc(100% - 24px);
  102. height: 185px;
  103. box-sizing: border-box;
  104. margin: 4px 0 12px 12px;
  105. background: #FFFFFF;
  106. border-radius: 15px;
  107. .goods-top{
  108. display: flex;
  109. align-items: center;
  110. .select {
  111. color: #52A63A;
  112. font-size: 35px;
  113. }
  114. }
  115. .select-goods {
  116. color: #52A63A;
  117. font-size: 35px;
  118. float: left;
  119. text-align: center;
  120. }
  121. .split-line{
  122. height: 1px;
  123. background: #EEEEEE;
  124. margin-top: 5px;
  125. margin-bottom: 5px;
  126. }
  127. .goods-middle {
  128. display: flex;
  129. }
  130. .goods-img{
  131. width: 84px;
  132. height: 84px;
  133. }
  134. .goods-details{
  135. height: 28px;
  136. font-size: 12px;
  137. font-family: PingFang SC;
  138. color: #999999;
  139. line-height: 14px;
  140. overflow: hidden;
  141. text-overflow: ellipsis;
  142. display: -webkit-box;
  143. -webkit-line-clamp: 2;
  144. -webkit-box-orient: vertical;
  145. word-wrap: break-word;
  146. margin-top: 10px;
  147. }
  148. .goods-spec{
  149. height: 16px;
  150. font-family: PingFang SC;
  151. line-height: 16px;
  152. font-size: 15px;
  153. color: #52A63A;
  154. margin-top: 10px;
  155. }
  156. .goods-bottom{
  157. position: relative;
  158. left: 130px;
  159. margin-top: 10px;
  160. margin-bottom: 10px;
  161. display: flex;
  162. align-items: baseline;
  163. }
  164. .settle-btn{
  165. color: #FFFFFF;
  166. background: #52A63A;
  167. border-radius: 40px;
  168. height: 30px;
  169. width: 80px;
  170. display: flex;
  171. align-items: center;
  172. justify-content: center;
  173. }
  174. .goods-number{
  175. height: 16px;
  176. font-family: PingFang SC;
  177. line-height: 16px;
  178. .goods-icon{
  179. font-size: 12px;
  180. color: #52A63A;
  181. }
  182. .goods-spec{
  183. font-size: 15px;
  184. color: #52A63A;
  185. margin-right: 15px;
  186. }
  187. .goods-sales{
  188. font-size: 12px;
  189. color: #999999;
  190. }
  191. }
  192. .goods-info{
  193. width: calc(100% - 104px);
  194. height: 84px;
  195. float: left;
  196. .goods-name{
  197. height: 18px;
  198. font-size: 15px;
  199. font-family: PingFang SC;
  200. color: #333333;
  201. line-height: 18px;
  202. white-space: nowrap;
  203. text-overflow: ellipsis;
  204. overflow: hidden;
  205. }
  206. }
  207. .goods-cart{
  208. width: 20px;
  209. height: 84px;
  210. float: left;
  211. }
  212. }
  213. }
  214. }
  215. }
  216. </style>