submit-operate.vue 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. <template>
  2. <view class="">
  3. <view class="submit_opar">
  4. <view class="price">
  5. <text>¥</text>
  6. <text>{{ heji }}</text>
  7. </view>
  8. <view class="right">
  9. <!-- <u-button type="primary" @click="goPayResult">提交订单</u-button> -->
  10. <view class="buyBtn" @click="goPayResult">
  11. 提交订单
  12. </view>
  13. </view>
  14. </view>
  15. <view class="siteBar"></view>
  16. </view>
  17. </template>
  18. <script>
  19. export default {
  20. props: {
  21. data: {
  22. type: Object,
  23. default: () => {
  24. return {};
  25. }
  26. }
  27. },
  28. computed:{
  29. heji(){
  30. let a = Number(this.data.countPrice) + Number(this.data.freight) - Number(this.data.discount);
  31. return parseFloat(a).toFixed(2)
  32. }
  33. },
  34. methods: {
  35. goPayResult() {
  36. this.$emit('submitOrder')
  37. }
  38. }
  39. };
  40. </script>
  41. <style lang="scss" scoped>
  42. .siteBar{
  43. height: 100rpx;
  44. // padding-bottom: constant(safe-area-inset-bottom);
  45. // padding-bottom: env(safe-area-inset-bottom);
  46. // box-sizing: content-box;
  47. @extend .safeAreaPad;
  48. }
  49. .submit_opar {
  50. position: fixed;
  51. bottom: 0;
  52. left: 0;
  53. width: 100%;
  54. background-color: $app-theme-bg-color;
  55. height: 100rpx;
  56. box-shadow: $app-theme-shadow;
  57. // padding-bottom: constant(safe-area-inset-bottom);
  58. // padding-bottom: env(safe-area-inset-bottom);
  59. // box-sizing: content-box;
  60. @extend .safeAreaPad;
  61. z-index: $app-zIndex-fixed;
  62. display: flex;
  63. justify-content: space-between;
  64. align-items: center;
  65. .price {
  66. padding-left: 30rpx;
  67. text:nth-child(1) {
  68. font-size: 24rpx;
  69. font-family: PingFangSC-Medium, PingFang SC;
  70. font-weight: 500;
  71. color: $app-theme-text-money-color;
  72. }
  73. text:nth-child(2) {
  74. font-size: 36rpx;
  75. font-family: PingFangSC-Regular, PingFang SC;
  76. font-weight: 400;
  77. color: $app-theme-text-money-color;
  78. }
  79. }
  80. .right {
  81. display: flex;
  82. align-items: center;
  83. }
  84. }
  85. </style>