success.vue 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  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. }
  25. },
  26. onLoad(e) {
  27. this.totalPrice = ((e.money*1)*(e.discount*1)).toFixed(2);
  28. this.money = e.money;
  29. this.invite_code = e.invite_code;
  30. this.discount = e.discount;
  31. this.upData();
  32. },
  33. methods:{
  34. buy(){
  35. uni.reLaunch({
  36. url:'/pages/index/index'
  37. })
  38. },
  39. upData(){
  40. projectWriteDiscount({order_money:this.money,invite_code:this.invite_code,discount:this.discount}).then((res)=>{})
  41. },
  42. },
  43. }
  44. </script>
  45. <style scoped lang="scss">
  46. .success-box{
  47. width: 100%;
  48. height: 100vh;
  49. background-color: #F2F3F5;
  50. position: relative;
  51. .box-2{
  52. margin-top: 600rpx;
  53. padding: 0 40rpx;
  54. view{
  55. width: 46%;
  56. height: 83rpx;
  57. line-height: 83rpx;
  58. border-radius: 69rpx;
  59. border: 2rpx solid #1778FD;
  60. text-align: center;
  61. color: #1778FD;
  62. font-size: 32rpx;
  63. margin: 0 auto;
  64. }
  65. }
  66. .box-1{
  67. width: 750rpx;
  68. height: 272rpx;
  69. background: #0473CF;
  70. border-radius: 0 0 100rpx 100rpx;
  71. }
  72. .img-1{
  73. background: url('@/static/img/s-1.png') no-repeat;
  74. background-size: 100% 100%;
  75. position: absolute;
  76. top: 185rpx;
  77. left: 48rpx;
  78. width: 650rpx;
  79. height: 610rpx;
  80. z-index: 0;
  81. box-sizing: border-box;
  82. padding-top: 78rpx;
  83. }
  84. .img-2{
  85. width: 160rpx;
  86. height: 127rpx;
  87. margin: 0 auto 35rpx auto;
  88. z-index: 2;
  89. }
  90. .mb-120{
  91. margin-bottom: 140rpx;
  92. }
  93. }
  94. </style>