success.vue 2.3 KB

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