cm-order-submit-nav.vue 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  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. z-index: 999;
  36. .reserved{
  37. background: #fff;
  38. }
  39. .submit {
  40. display: flex;
  41. justify-content: space-between;
  42. align-items: center;
  43. box-sizing: border-box;
  44. height: 100rpx;
  45. padding: 0 24rpx;
  46. background: #fff;
  47. .count {
  48. font-size: 28rpx;
  49. color: #333333;
  50. }
  51. .total {
  52. display: flex;
  53. flex-direction: column;
  54. justify-content: center;
  55. align-items: flex-start;
  56. margin: 0 24rpx;
  57. .price {
  58. font-size: 26rpx;
  59. color: #ff457b;
  60. .label {
  61. color: #333333;
  62. }
  63. }
  64. .reduce {
  65. margin-top: 4rpx;
  66. font-size: 24rpx;
  67. color: #ff457b;
  68. }
  69. }
  70. .btn {
  71. width: 210rpx;
  72. height: 80rpx;
  73. background: linear-gradient(90deg, #fa55bf 0%, #f83c6c 100%);
  74. opacity: 1;
  75. color: #fff;
  76. line-height: 80rpx;
  77. text-align: center;
  78. border-radius: 40rpx;
  79. margin: 0;
  80. }
  81. }
  82. }
  83. </style>