cart.vue 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190
  1. <route lang="json5">
  2. {
  3. layout: 'tabbar',
  4. style: {
  5. navigationStyle: 'custom',
  6. navigationBarTitleText: '%tabbar.cart%',
  7. },
  8. }
  9. </route>
  10. <script setup lang="ts">
  11. import { t } from '@/locale'
  12. const { safeAreaInsets } = uni.getSystemInfoSync()
  13. </script>
  14. <template>
  15. <view
  16. class="pb-tab bg-white overflow-hidden box-border"
  17. :style="{ marginTop: safeAreaInsets?.top + 'px' }"
  18. >
  19. <wd-sticky>
  20. <view class="nav-bar bg-white w-100vw">
  21. <view class="cart-pos">
  22. <view class="text">{{ t('tabbar.cart') }}</view>
  23. <view class="pos">
  24. <image class="w-36rpx" src="@/static/images/cart/pos.svg" mode="widthFix"></image>
  25. <view class="address-name">{{ t('cart.homeName') }}</view>
  26. <image class="w-36rpx" src="@/static/images/cart/right.svg" mode="widthFix"></image>
  27. </view>
  28. </view>
  29. <view class="manage-cart">{{ t('cart.manageCart') }}</view>
  30. </view>
  31. </wd-sticky>
  32. <view class="cart-list"></view>
  33. <view class="cart-bottom-area pb-tab">
  34. <view class="cart-control">
  35. <view class="icon"></view>
  36. <view class="text">{{ t('cart.selectAll') }}</view>
  37. <view class="price">
  38. {{ t('cart.totalPrice') }}
  39. <view class="price-text flex">
  40. {{ t('cart.priceUint') }}
  41. <view v-format.price class="price-num">83.97</view>
  42. </view>
  43. </view>
  44. <view class="button">{{ t('cart.settlement') }}</view>
  45. </view>
  46. </view>
  47. </view>
  48. </template>
  49. <style lang="scss" scoped>
  50. :deep(.wd-sticky__container) {
  51. top: 0 !important;
  52. }
  53. .cart-list {
  54. height: 100vh;
  55. margin-bottom: 130rpx;
  56. }
  57. .cart-bottom-area {
  58. position: fixed;
  59. bottom: 0;
  60. box-sizing: border-box;
  61. width: 750rpx;
  62. background: $shop-white;
  63. .cart-control {
  64. box-sizing: border-box;
  65. display: flex;
  66. align-items: center;
  67. width: 750rpx;
  68. height: 120rpx;
  69. padding: 16rpx 32rpx;
  70. border-bottom: 2rpx solid var(--f-2-f-2-f-2, $shop-bg-line);
  71. .icon {
  72. box-sizing: border-box;
  73. width: 42rpx;
  74. height: 42rpx;
  75. margin-right: 16rpx;
  76. border: 4rpx solid $shop-bg-line;
  77. border-radius: 50%;
  78. }
  79. .text {
  80. margin-right: 96rpx;
  81. font-family: 'PingFang SC';
  82. font-size: 24rpx;
  83. font-style: normal;
  84. font-weight: 400;
  85. line-height: 40rpx;
  86. color: $shop-text-6;
  87. }
  88. .price {
  89. width: 142rpx;
  90. margin-right: 24rpx;
  91. font-family: 'PingFang SC';
  92. font-size: 28rpx;
  93. font-style: normal;
  94. font-weight: 400;
  95. line-height: 44rpx;
  96. color: var(--666, $shop-text-6);
  97. text-align: center;
  98. .price-text {
  99. font-family: 'PingFang SC';
  100. font-size: 28rpx;
  101. font-style: normal;
  102. font-weight: 500;
  103. line-height: 44rpx; /* 157.143% */
  104. color: var(--ff-4-c-1-b, $shop-primary);
  105. text-align: center;
  106. }
  107. }
  108. .button {
  109. box-sizing: border-box;
  110. display: flex;
  111. align-items: center;
  112. justify-content: center;
  113. width: 260rpx;
  114. height: 88rpx;
  115. font-family: 'PingFang SC';
  116. font-size: 32rpx;
  117. font-style: normal;
  118. font-weight: 600;
  119. line-height: 48rpx; /* 150% */
  120. color: #fff;
  121. text-align: center;
  122. text-transform: capitalize;
  123. background: linear-gradient(270deg, $shop-primary 0%, $shop-help 100%);
  124. border-radius: 42rpx;
  125. }
  126. }
  127. }
  128. .nav-bar {
  129. box-sizing: border-box;
  130. display: flex;
  131. align-items: center;
  132. justify-content: space-between;
  133. height: 88rpx;
  134. padding: 18rpx 32rpx;
  135. .manage-cart {
  136. font-family: 'PingFang SC';
  137. font-size: 28rpx;
  138. font-style: normal;
  139. font-weight: 400;
  140. line-height: 44rpx; /* 157.143% */
  141. color: var(--666, $shop-text-6);
  142. text-align: right;
  143. text-transform: capitalize;
  144. }
  145. .cart-pos {
  146. display: flex;
  147. align-items: center;
  148. .text {
  149. font-family: 'PingFang SC';
  150. font-size: 36rpx;
  151. font-style: normal;
  152. font-weight: 600;
  153. line-height: 26rpx;
  154. color: var($shop-text-3, #333333);
  155. }
  156. .pos {
  157. box-sizing: border-box;
  158. display: flex;
  159. gap: 8rpx;
  160. align-items: center;
  161. align-self: stretch;
  162. height: 52rpx;
  163. padding: 10rpx 16rpx;
  164. margin-left: 32rpx;
  165. font-family: 'PingFang SC';
  166. font-size: 24rpx;
  167. font-style: normal;
  168. font-weight: 400;
  169. line-height: 40rpx; /* 166.667% */
  170. color: var(--666, $shop-text-6);
  171. background: var(--f-2-f-2-f-2, $shop-bg-line);
  172. border-radius: 200rpx;
  173. }
  174. }
  175. }
  176. </style>