index.vue 4.2 KB

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