fail.vue 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  1. <!-- 充值失败页面 -->
  2. <template>
  3. <rechargeResult :rechargeData="rechargeData"></rechargeResult>
  4. </template>
  5. <script>
  6. import rechargeResult from "@/components/recharge_result.vue";
  7. export default {
  8. components: {
  9. rechargeResult,
  10. },
  11. data() {
  12. return {
  13. rechargeData:{
  14. resule:'fail',
  15. icon:getApp().globalData.imgUrl+'recharge_fail.png',
  16. title:'充值失败',
  17. detail:[{
  18. key: 'amount',
  19. name:'交易金额',
  20. value:'',
  21. },{
  22. key: 'method',
  23. name:'交易方式',
  24. value:'支付宝',
  25. },{
  26. key: 'time',
  27. name:'交易时间',
  28. value:'2019-09-05 10:55:47',
  29. },{
  30. key: 'order_sn',
  31. name:'交易单号',
  32. value:'54243241324324',
  33. },{
  34. key: 'trade_no',
  35. name:'交易流水号',
  36. value:'324324324324324',
  37. },]
  38. },
  39. }
  40. },
  41. onLoad(options){
  42. let tmp_data = this.rechargeData.detail;
  43. tmp_data.map((item,index)=>{
  44. if(item.key == 'amount'){
  45. item.value = '¥'+options.total_amount;
  46. }else if(item.key == 'method'){
  47. item.value = options.method.indexOf('alipay')>-1?'支付宝':'微信';
  48. }else if(item.key == 'time'){
  49. item.value = options.timestamp;
  50. }else if(item.key == 'order_sn'){
  51. item.value = options.order_sn;
  52. }else if(item.key == 'trade_no'){
  53. item.value = options.trade_no;
  54. }
  55. });
  56. },
  57. methods: {
  58. }
  59. }
  60. </script>
  61. <style lang="scss">
  62. page {
  63. background: $bg-color-split;
  64. .container {
  65. width: 750rpx;
  66. height: 100vh;
  67. .top_bg {
  68. position: absolute;
  69. top: 0;
  70. left: 0;
  71. right: 0;
  72. width: 750rpx;
  73. height: 533rpx;
  74. background-size: contain;
  75. z-index: 0;
  76. }
  77. .top_content {
  78. width: 100%;
  79. .nav {
  80. width: 100%;
  81. padding: 20rpx;
  82. height: 90rpx;
  83. position: relative;
  84. margin-bottom: 40rpx;
  85. .iconfont {
  86. position: absolute;
  87. font-size: 26rpx;
  88. left: 20rpx;
  89. top: 37rpx;
  90. color: #fff;
  91. }
  92. .title {
  93. color: #fff;
  94. font-size: 36rpx;
  95. }
  96. }
  97. .detail {
  98. width: 670rpx;
  99. background: #fff;
  100. box-shadow: 0px 0px 20px 0px rgba(86, 86, 86, 0.15);
  101. border-radius: 10rpx;
  102. z-index: 1;
  103. padding: 30rpx 30rpx 50rpx;
  104. .result_icon {
  105. width: 146rpx;
  106. height: 146rpx;
  107. margin-top: 60rpx;
  108. }
  109. .result {
  110. color: $main-third-color;
  111. font-size: 28rpx;
  112. width: 100%;
  113. text-align: center;
  114. border-bottom: 1rpx solid rgba(0,0,0,.1);
  115. padding-bottom: 50rpx;
  116. }
  117. .item {
  118. width: 100%;
  119. color: $main-third-color;
  120. font-size: 26rpx;
  121. margin-top: 30rpx;
  122. }
  123. }
  124. }
  125. .operate {
  126. width: 670rpx;
  127. height: 88rpx;
  128. margin-bottom: 40rpx;
  129. background: linear-gradient(-90deg, rgba(252, 29, 28, 1) 0%, rgba(255, 122, 24, 1) 100%);
  130. box-shadow: 0px 3rpx 20rpx 0px rgba(252, 30, 28, 0.26);
  131. border-radius: 44rpx;
  132. color: #fff;
  133. font-size: 36rpx;
  134. }
  135. }
  136. }
  137. </style>