CheckoutStore.vue 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186
  1. <template>
  2. <view class="div container">
  3. <view class="div">
  4. <view class="div cart-item">
  5. <view class="div buy-item" v-for="(goods,index) in storeCartList" :key="index">
  6. <view class="div goods-pic"><image mode="aspectFit" class="img" :src="goods.pgoods_image"/></view>
  7. <view class="div goods-info">
  8. <view class="dl">
  9. <view class="dt goods-name">{{goods.pgoods_name}}</view>
  10. <view class="dd goods-subtotal">
  11. <text class="span goods-price">{{goods.pgoods_points}}积分</text>
  12. <text class="span goods-count">×{{goods.quantity}}</text>
  13. </view>
  14. </view>
  15. </view>
  16. </view>
  17. </view>
  18. <view class="div cart-subtotal">
  19. <view class="div message">
  20. <view class="div field-line-right"><textarea class="order-message field-input" v-model="message" placeholder="订单留言:"></textarea></view>
  21. </view>
  22. <checkout-desc class="desc-item" title="本店合计" :subtitle="totalAmount"></checkout-desc>
  23. </view>
  24. </view>
  25. </view>
  26. </template>
  27. <script>
  28. import CheckoutDesc from './CheckoutDesc'
  29. import flexLine from '../../../flexLine'
  30. export default {
  31. name: 'CheckoutStore',
  32. data () {
  33. return {
  34. message: ''
  35. }
  36. },
  37. components: {
  38. CheckoutDesc,
  39. flexLine
  40. },
  41. props: ['storeCartList', 'totalAmount'],
  42. created: function () {
  43. },
  44. methods: {
  45. changeMessage (store_id) {
  46. this.$emit('changeMessage', this.message)
  47. }
  48. }
  49. }
  50. </script>
  51. <style scoped lang="scss">
  52. .container{background: #fff;padding:0 $pageSpace}
  53. .store{ position: relative;
  54. z-index: 1;
  55. display: block;
  56. height: 0.9rem;
  57. padding: 0.5rem;
  58. font-size:$subFontSize;
  59. line-height: 0.9rem;
  60. border-bottom: solid 0.05rem #EEE;
  61. }
  62. .store .i{
  63. display: inline-block;
  64. width: 0.8rem;
  65. height: 0.9rem;
  66. margin-right: 0.2rem;
  67. vertical-align: middle;
  68. }
  69. .cart-item{background-color: #FFF;}
  70. .buy-item{ display: block;
  71. position: relative;
  72. z-index: 1;
  73. margin:.5rem 0;
  74. box-shadow: 0px 4px 4px #f7f7f7;}
  75. .buy-item .goods-pic{display: block;
  76. width: 3rem;
  77. height: 3rem;
  78. position: absolute;
  79. z-index: 1;
  80. top: 0;
  81. left: 0rem;}
  82. .buy-item .goods-pic .img{width:100%;
  83. height:100%;border-radius: 0.2rem;}
  84. .buy-item .goods-info{ display: block;
  85. vertical-align: top;
  86. height: 3.1rem;
  87. margin-left:4rem;position: relative;z-index: 1;}
  88. .buy-item .goods-info .goods-name {
  89. height:1.6rem;
  90. font-size:$subFontSize;
  91. line-height: .8rem;
  92. overflow: hidden;
  93. display: -webkit-box;
  94. -webkit-line-clamp: 2;
  95. -webkit-box-orient: vertical;
  96. line-clamp: 2;
  97. box-orient: vertical;
  98. margin-bottom:.5rem;
  99. font-weight: normal;
  100. .tag-icon{vertical-align: top}
  101. }
  102. .buy-item .goods-info .goods-type {
  103. overflow: hidden;
  104. white-space: nowrap;
  105. width: 70%;
  106. height: 0.9rem;
  107. font-size:$h6;
  108. line-height: 0.9rem;
  109. color: #999;
  110. text-overflow: ellipsis;
  111. }
  112. .buy-item .goods-info .goods-subtotal {
  113. display: block;
  114. height: 1rem;
  115. margin: 0 0.5rem 0 0rem;
  116. line-height: 1rem;
  117. font-size:$subFontSize;
  118. position: relative;
  119. z-index: 1;
  120. }
  121. .buy-item .goods-info .goods-subtotal .goods-price {
  122. color: #DB4453;
  123. font-size:$subFontSize;
  124. font-weight: 600;
  125. }
  126. .buy-item .goods-info .goods-subtotal .goods-count {
  127. font-size:$subFontSize;
  128. line-height: 1rem;
  129. position: absolute;
  130. z-index: 1;
  131. top: 0rem;
  132. right: 0rem;
  133. font-weight: normal;
  134. color:$descTextColor
  135. }
  136. .cart-subtotal{}
  137. .cart-subtotal .dl {
  138. position: relative;
  139. z-index: 1;
  140. height: 1rem;
  141. padding: 0.4rem 0 0;
  142. font-size: 0;
  143. }
  144. .cart-subtotal .dt {
  145. position: absolute;
  146. z-index: 1;
  147. top: 0.4rem;
  148. left: 0.4rem;
  149. display: block;
  150. width: 50%;
  151. height: 1rem;
  152. font-size:$fontSize;
  153. line-height: 1rem;
  154. }
  155. .cart-subtotal .dd {
  156. height: 1rem;
  157. margin: 0 0.5rem 0 50%;
  158. text-align: right;
  159. font-size:$fontSize;
  160. line-height: 1rem;
  161. }
  162. .cart-subtotal .message {
  163. position: relative;
  164. z-index: 1;
  165. display: block;
  166. border-bottom: 1px dashed #eee;
  167. .order-message{background: #FBFBFB;margin:.5rem 0;font-size:$fontSize;padding:.5rem;height: 4rem;border: 0;box-sizing: border-box;width: 100%;}
  168. }
  169. .desc-item {
  170. height:1.5rem;
  171. }
  172. .common-voucher{margin:0.5rem auto}
  173. .field-line-right{
  174. .field-input{
  175. text-align: left !important;
  176. }
  177. }
  178. </style>