index.vue 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202
  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="50rpx" width="50rpx" 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. border-bottom: 1px solid #F8F8F8;
  89. border-top: 10upx solid #F8F8F8;
  90. display: flex;
  91. align-items: center;
  92. padding:15upx 20upx;
  93. .position{
  94. flex-grow: 1;
  95. }
  96. > view{
  97. padding: 10upx;
  98. .address{
  99. padding: 5upx 0;
  100. }
  101. &:last-child{
  102. padding: 0 20upx;
  103. }
  104. }
  105. }
  106. .goods-list{
  107. padding: 20upx 0;
  108. flex-grow: 1;
  109. overflow: auto;
  110. .goods-class-box{
  111. background: #FFFFFF;
  112. box-shadow: 1px 1px 3px #eee;
  113. margin-bottom: 20upx;
  114. }
  115. .goods-item{
  116. padding: 20upx 40upx;
  117. display: flex;
  118. align-items: center;
  119. justify-content: space-between;
  120. border-bottom: 1px solid #F8F8F8;
  121. background: #fff;
  122. &:last-child{
  123. border: 0;
  124. }
  125. .goods-imgs{
  126. position: relative;
  127. }
  128. .goods-info{
  129. padding-left: 20upx;
  130. .good-name{
  131. font-weight: bold;
  132. }
  133. }
  134. .goods-price{
  135. display: flex;
  136. align-items: center;
  137. justify-content: space-between;
  138. padding-top: 20upx;
  139. >view{
  140. &:first-child{
  141. display: flex;
  142. align-items: center;
  143. text{
  144. color: red;
  145. font-size: 35upx;
  146. margin-right: 6upx;
  147. font-weight: bold;
  148. }
  149. }
  150. }
  151. }
  152. }
  153. }
  154. .goods-heji{
  155. padding: 20upx 40upx;
  156. background: #FFFFFF;
  157. box-shadow: 1px 1px 3px #eee;
  158. margin-top: 20upx;
  159. >view{
  160. display: flex;
  161. align-items: center;
  162. justify-content: space-between;
  163. padding: 10upx 0;
  164. .heji{
  165. display: flex;
  166. align-items: center;
  167. text{
  168. color: red;
  169. margin-right: 6upx;
  170. font-size: 35upx;
  171. font-weight: bold;
  172. }
  173. }
  174. }
  175. }
  176. .cart-submit{
  177. padding: 20upx 30upx;
  178. background: #FFFFFF;
  179. box-shadow: 1px 1px 3px #eee;
  180. border-top: 1px solid #eee;
  181. display: flex;
  182. align-items: center;
  183. justify-content: space-between;
  184. > view{
  185. &:first-child{
  186. display: flex;
  187. align-items: center;
  188. text{
  189. color: red;
  190. font-size: 40upx;
  191. margin-right: 6upx;
  192. font-weight: bold;
  193. }
  194. }
  195. }
  196. }
  197. }
  198. </style>