success.vue 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. <template>
  2. <view class="success-box">
  3. <view class="box-1"></view>
  4. <view class="img-1">
  5. <image class="img-2" src="@/static/img/s-2.png" mode="scaleToFill"></image>
  6. <view class="text-align-center fs-32 fc-3 fw-400 mb-25 ">支付成功</view>
  7. <view class="text-align-center fs-42 fc-3 fw-b mb-120 ">¥{{totalPrice}}</view>
  8. <view class="fs-30 text-align-center fc-6 fw-400 ">请取走你的小票和商品</view>
  9. </view>
  10. <view class="box-border-box box-2">
  11. <view class="" @click="buy()">继续购买</view>
  12. </view>
  13. </view>
  14. </template>
  15. <script>
  16. import {projectWriteDiscount} from '@/api/project.js';
  17. export default {
  18. data(){
  19. return{
  20. totalPrice:'',//实付款
  21. money:'',//原价
  22. discount:'',
  23. invite_code:'',
  24. shop_id:'',
  25. }
  26. },
  27. onLoad(e) {
  28. if(e.discount*1 > 0){
  29. this.totalPrice = (((e.money*1)*(e.discount*1)*100).toFixed(2)/100).toFixed(2);
  30. let num1 = e.money*1
  31. let num2 = e.discount*1
  32. this.totalPrice = (((num1*num2*10000)/100).toFixed(0)/100).toFixed(2)
  33. }else{
  34. this.totalPrice = e.money;
  35. }
  36. this.money = e.money;
  37. this.invite_code = e.invite_code;
  38. this.discount = e.discount;
  39. },
  40. methods:{
  41. buy(){
  42. uni.reLaunch({
  43. url:'/pages/index/index'
  44. })
  45. },
  46. },
  47. }
  48. </script>
  49. <style scoped lang="scss">
  50. .success-box{
  51. width: 100%;
  52. height: 100vh;
  53. background-color: #F2F3F5;
  54. position: relative;
  55. .box-2{
  56. margin-top: 600rpx;
  57. padding: 0 40rpx;
  58. view{
  59. width: 46%;
  60. height: 83rpx;
  61. line-height: 83rpx;
  62. border-radius: 69rpx;
  63. border: 2rpx solid #1778FD;
  64. text-align: center;
  65. color: #1778FD;
  66. font-size: 32rpx;
  67. margin: 0 auto;
  68. }
  69. }
  70. .box-1{
  71. width: 750rpx;
  72. height: 272rpx;
  73. background: #0473CF;
  74. border-radius: 0 0 100rpx 100rpx;
  75. }
  76. .img-1{
  77. background: url('@/static/img/s-1.png') no-repeat;
  78. background-size: 100% 100%;
  79. position: absolute;
  80. top: 185rpx;
  81. left: 48rpx;
  82. width: 650rpx;
  83. height: 610rpx;
  84. z-index: 0;
  85. box-sizing: border-box;
  86. padding-top: 78rpx;
  87. }
  88. .img-2{
  89. width: 160rpx;
  90. height: 127rpx;
  91. margin: 0 auto 35rpx auto;
  92. z-index: 2;
  93. }
  94. .mb-120{
  95. margin-bottom: 140rpx;
  96. }
  97. }
  98. </style>