cm-order-submit-nav.vue 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. <template>
  2. <view class="cm-order-submit-nav">
  3. <view class="submit">
  4. <view class="count">共{{ orderInfo.allCount }}件商品</view>
  5. <view class="total">
  6. <view class="price"> <text class="label">总计:</text> <text>¥{{orderInfo.payAllPrice | formatPrice}}</text> </view>
  7. <view class="reduce" v-if="orderInfo.discountedPrice"> <text class="label">共减:</text> <text>¥{{orderInfo.discountedPrice | formatPrice}}</text> </view>
  8. </view>
  9. <button class="btn" @click="$emit('commit')">提交订单</button>
  10. </view>
  11. <view class="reserved" v-if="isIphoneX"></view>
  12. </view>
  13. </template>
  14. <script>
  15. export default {
  16. props:{
  17. orderInfo:{
  18. type: Object,
  19. default:()=>{}
  20. }
  21. },
  22. computed:{
  23. isIphoneX(){
  24. return this.$store.getters.isIphoneX
  25. }
  26. }
  27. }
  28. </script>
  29. <style lang="scss" scoped>
  30. .cm-order-submit-nav{
  31. width: 100%;
  32. position: fixed;
  33. bottom: 0;
  34. left: 0;
  35. .reserved{
  36. background: #fff;
  37. }
  38. .submit {
  39. display: flex;
  40. justify-content: space-between;
  41. align-items: center;
  42. box-sizing: border-box;
  43. height: 100rpx;
  44. padding: 0 24rpx;
  45. background: #fff;
  46. .count {
  47. font-size: 28rpx;
  48. color: #333333;
  49. }
  50. .total {
  51. display: flex;
  52. flex-direction: column;
  53. justify-content: center;
  54. align-items: flex-start;
  55. margin: 0 24rpx;
  56. .price {
  57. font-size: 26rpx;
  58. color: #ff457b;
  59. .label {
  60. color: #333333;
  61. }
  62. }
  63. .reduce {
  64. margin-top: 4rpx;
  65. font-size: 24rpx;
  66. color: #ff457b;
  67. }
  68. }
  69. .btn {
  70. width: 210rpx;
  71. height: 80rpx;
  72. background: linear-gradient(90deg, #fa55bf 0%, #f83c6c 100%);
  73. opacity: 1;
  74. color: #fff;
  75. line-height: 80rpx;
  76. text-align: center;
  77. border-radius: 40rpx;
  78. margin: 0;
  79. }
  80. }
  81. }
  82. </style>