index.vue 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203
  1. <template>
  2. <view class="cart-pages">
  3. <view class="cart-bar">
  4. <view>
  5. <u-image height="40rpx" width="40rpx" src="/static/position.png"></u-image>
  6. </view>
  7. <view class="position">
  8. <view class="address">陕西省西安市未央区华帝金座A座6楼</view>
  9. <view>王明 1456465455</view>
  10. </view>
  11. <view>
  12. <u-image height="40rpx" width="40rpx" src="/static/edit.png"></u-image>
  13. </view>
  14. </view>
  15. <view class="goods-list">
  16. <!-- 商品列表 -->
  17. <view class="goods-item" v-for="(item,index) in 6" :key="index">
  18. <view class="goods-imgs">
  19. <u-image border-radius="12" width="158rpx" height="140rpx" src="/static/goods.png"></u-image>
  20. </view>
  21. <view class="goods-info">
  22. <view class="good-name">拉就是两地分居拉进来就是两地分居拉进来就是两地分居拉进来进来</view>
  23. <view class="goods-price">
  24. <view>
  25. <text>50</text>
  26. <u-image mode="scaleToFill" width="35rpx" height="35rpx" src="/static/ledou.png"></u-image>
  27. </view>
  28. <view>×2</view>
  29. </view>
  30. </view>
  31. </view>
  32. <!-- 总计 -->
  33. <view class="goods-heji">
  34. <view>
  35. <view>商品合计:</view>
  36. <view class="heji">
  37. <text>250</text>
  38. <u-image mode="scaleToFill" width="35rpx" height="35rpx" src="/static/ledou.png"></u-image>
  39. </view>
  40. </view>
  41. <view>
  42. <view>运费:</view>
  43. <view>免运费</view>
  44. </view>
  45. </view>
  46. </view>
  47. <view class="cart-submit">
  48. <view>
  49. <view>总计:<text>450</text></view>
  50. <u-image mode="scaleToFill" width="40rpx" height="40rpx" src="/static/ledou.png"></u-image>
  51. </view>
  52. <view>
  53. <u-button size="mini" :custom-style="toOrderButton" type="error" @click="toPay">确认支付</u-button>
  54. </view>
  55. </view>
  56. </view>
  57. </template>
  58. <script>
  59. export default {
  60. data() {
  61. return {
  62. toOrderButton: {
  63. borderRadius:'100rpx',
  64. fontSize:'30rpx',
  65. width: '180rpx',
  66. height: '60rpx'
  67. }
  68. };
  69. },
  70. methods: {
  71. //立即下单
  72. toPay(){
  73. }
  74. },
  75. }
  76. </script>
  77. <style lang="scss">
  78. page{
  79. height: 100%;
  80. }
  81. .cart-pages{
  82. width: 100%;
  83. height: 100%;
  84. display: flex;
  85. flex-direction: column;
  86. .cart-bar{
  87. background: #FFFFFF;
  88. box-shadow: 1px 1px 3px #eee;
  89. border-bottom: 1px solid #eee;
  90. border-top: 10upx solid #F8F8F8;
  91. display: flex;
  92. align-items: center;
  93. padding:15upx 20upx;
  94. .position{
  95. flex-grow: 1;
  96. }
  97. > view{
  98. padding: 10upx;
  99. .address{
  100. padding: 5upx 0;
  101. }
  102. &:last-child{
  103. padding: 0 20upx;
  104. }
  105. }
  106. }
  107. .goods-list{
  108. padding: 20upx 0;
  109. flex-grow: 1;
  110. overflow: auto;
  111. .goods-class-box{
  112. background: #FFFFFF;
  113. box-shadow: 1px 1px 3px #eee;
  114. margin-bottom: 20upx;
  115. }
  116. .goods-item{
  117. padding: 20upx 40upx;
  118. display: flex;
  119. align-items: center;
  120. justify-content: space-between;
  121. border-bottom: 1px solid #F8F8F8;
  122. background: #fff;
  123. &:last-child{
  124. border: 0;
  125. }
  126. .goods-imgs{
  127. position: relative;
  128. }
  129. .goods-info{
  130. padding-left: 20upx;
  131. .good-name{
  132. font-weight: bold;
  133. }
  134. }
  135. .goods-price{
  136. display: flex;
  137. align-items: center;
  138. justify-content: space-between;
  139. padding-top: 20upx;
  140. >view{
  141. &:first-child{
  142. display: flex;
  143. align-items: center;
  144. text{
  145. color: red;
  146. font-size: 35upx;
  147. margin-right: 6upx;
  148. font-weight: bold;
  149. }
  150. }
  151. }
  152. }
  153. }
  154. }
  155. .goods-heji{
  156. padding: 20upx 40upx;
  157. background: #FFFFFF;
  158. box-shadow: 1px 1px 3px #eee;
  159. margin-top: 20upx;
  160. >view{
  161. display: flex;
  162. align-items: center;
  163. justify-content: space-between;
  164. padding: 10upx 0;
  165. .heji{
  166. display: flex;
  167. align-items: center;
  168. text{
  169. color: red;
  170. margin-right: 6upx;
  171. font-size: 35upx;
  172. font-weight: bold;
  173. }
  174. }
  175. }
  176. }
  177. .cart-submit{
  178. padding: 20upx 30upx;
  179. background: #FFFFFF;
  180. box-shadow: 1px 1px 3px #eee;
  181. border-top: 1px solid #eee;
  182. display: flex;
  183. align-items: center;
  184. justify-content: space-between;
  185. > view{
  186. &:first-child{
  187. display: flex;
  188. align-items: center;
  189. text{
  190. color: red;
  191. font-size: 40upx;
  192. margin-right: 6upx;
  193. font-weight: bold;
  194. }
  195. }
  196. }
  197. }
  198. }
  199. </style>