success.vue 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  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 flex-justify-space">
  11. <view class="" @click="out()">退出登录</view>
  12. <view class="" @click="buy()">继续购买</view>
  13. </view>
  14. </view>
  15. </template>
  16. <script>
  17. export default {
  18. data(){
  19. return{
  20. totalPrice:'',
  21. }
  22. },
  23. onLoad(e) {
  24. this.totalPrice = e.money
  25. },
  26. methods:{
  27. out(){
  28. window.localStorage.clear()
  29. uni.clearStorageSync()
  30. uni.reLaunch({
  31. url:'/pages/login/index'
  32. })
  33. },
  34. buy(){
  35. uni.redirectTo({
  36. url:'/pages/index/index'
  37. })
  38. }
  39. },
  40. }
  41. </script>
  42. <style scoped lang="scss">
  43. .success-box{
  44. width: 100%;
  45. height: 100vh;
  46. background-color: #F2F3F5;
  47. position: relative;
  48. .box-2{
  49. margin-top: 600rpx;
  50. padding: 0 40rpx;
  51. view{
  52. width: 46%;
  53. height: 83rpx;
  54. line-height: 83rpx;
  55. border-radius: 69rpx;
  56. border: 2rpx solid #1778FD;
  57. text-align: center;
  58. color: #1778FD;
  59. font-size: 32rpx;
  60. }
  61. }
  62. .box-1{
  63. width: 750rpx;
  64. height: 272rpx;
  65. background: #0473CF;
  66. border-radius: 0 0 100rpx 100rpx;
  67. }
  68. .img-1{
  69. background: url('@/static/img/s-1.png') no-repeat;
  70. background-size: 100% 100%;
  71. position: absolute;
  72. top: 185rpx;
  73. left: 48rpx;
  74. width: 650rpx;
  75. height: 610rpx;
  76. z-index: 0;
  77. box-sizing: border-box;
  78. padding-top: 78rpx;
  79. }
  80. .img-2{
  81. width: 160rpx;
  82. height: 127rpx;
  83. margin: 0 auto 35rpx auto;
  84. z-index: 2;
  85. }
  86. .mb-120{
  87. margin-bottom: 140rpx;
  88. }
  89. }
  90. </style>