rechargeRes.vue 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181
  1. <template>
  2. <view>
  3. <ujp-navbar :title="title" :is-back="false" ></ujp-navbar>
  4. <view class="paySuccess">
  5. <u-icon :name="detail.payStatus==20?'chenggong':'close-circle-fill'" custom-prefix="custom-icon" size="180" :color="detail.payStatus==20?'#00B962':'#ff9800'"></u-icon>
  6. <view class="title oldTextjp" oldstyle="font-size: 20px;" v-if="detail.type=='1'">{{detail.payStatusStr}}</view>
  7. <view class="title oldTextjp" oldstyle="font-size: 20px;" v-if="detail.type=='2'" >开通{{detail.payStatus==20?'成功':'失败'}}</view>
  8. <view class="payPrice">
  9. <font>{{detail.totalFee.toFixed(2)}}</font><span>元</span>
  10. </view>
  11. <p class="oldTextjp2" oldstyle="font-size: 16px;" >{{detail.payNameStr}}</p>
  12. </view>
  13. <view class="paySuccess-btn" v-if="detail.type=='1'">
  14. <u-button class="success-btn1 oldTextjp2" oldstyle="font-size: 18px;" shape="circle" type="" @click="rechargeContinue">
  15. <span>继续充值</span>
  16. </u-button>
  17. <u-button class="success-btn2 oldTextjp2" oldstyle="font-size: 18px;"
  18. v-if="charge"
  19. shape="circle" type="success" @click="chargeLook">
  20. <span>前往充电</span>
  21. </u-button>
  22. <u-button class="success-btn2 oldTextjp2" oldstyle="font-size: 18px;"
  23. v-else
  24. shape="circle" type="success" @click="balanceLook">
  25. <span>查看余额</span>
  26. </u-button>
  27. </view>
  28. <view class="paySuccess-btn" v-if="detail.type=='2'">
  29. <u-button class="success-btn1 oldTextjp2" v-if="detail.payStatus!=20" oldstyle="font-size: 18px;" shape="circle" type="" @click="getInfo">
  30. <span>刷新</span>
  31. </u-button>
  32. <u-button class="success-btn2 oldTextjp2" oldstyle="font-size: 18px;" shape="circle" type="" @click="userindex">
  33. <span>返回</span>
  34. </u-button>
  35. </view>
  36. </view>
  37. </template>
  38. <script>
  39. import * as API from '@/apis/finance.js'
  40. export default {
  41. data() {
  42. return {
  43. detail: {},
  44. id: "",
  45. charge:false,
  46. chargeObj:{},
  47. title:'充值结果'
  48. }
  49. },
  50. onLoad(op) {
  51. if(op.id){
  52. this.id=op.id
  53. this.getInfo();
  54. }
  55. var obj=this.carhelp.getGunIdCharge();
  56. if(obj){
  57. this.charge=true
  58. this.chargeObj=obj
  59. }
  60. },
  61. onReady() {
  62. },
  63. methods: {
  64. getInfo() {
  65. uni.showLoading({
  66. title: "加载中",
  67. mask: true,
  68. })
  69. API.accountDetail({
  70. outOrderNo: this.id
  71. }).then((res) => {
  72. uni.hideLoading()
  73. this.detail = res.data.orderInfo;
  74. if(this.detail.type=='2'){
  75. this.title='开通会员'
  76. }
  77. }).catch(error => {
  78. uni.showToast({
  79. title: error,
  80. icon: "none"
  81. })
  82. })
  83. },
  84. userindex() {
  85. uni.redirectTo({
  86. url: '/pages/user/index'
  87. })
  88. },
  89. rechargeContinue() {
  90. uni.redirectTo({
  91. url: '/pages/user/finance/recharge'
  92. })
  93. },
  94. chargeLook(){
  95. uni.redirectTo({
  96. url:'/pages/searchPile/chargeProcess/charge?isback=1&deviceNo='+this.chargeObj.deviceNo+"&gun="+this.chargeObj.channelNo+"&carNumber="+this.chargeObj.carNumber
  97. })
  98. },
  99. balanceLook() {
  100. uni.redirectTo({
  101. url: '/pages/user/finance/balance'
  102. })
  103. }
  104. }
  105. }
  106. </script>
  107. <style>
  108. page {
  109. background-color: #fff;
  110. }
  111. </style>
  112. <style lang="scss" scoped>
  113. .paySuccess {
  114. text-align: center;
  115. padding: 50px 0;
  116. .title {
  117. font-size: 20px;
  118. margin-top: 20px;
  119. }
  120. .payPrice {
  121. display: flex;
  122. align-items: flex-end;
  123. justify-content: center;
  124. font {
  125. font-size: 36px;
  126. line-height: 36px;
  127. }
  128. margin-top: 20px;
  129. }
  130. p {
  131. color: #999;
  132. margin-top: 4px;
  133. }
  134. }
  135. .paySuccess-btn {
  136. display: flex;
  137. justify-content: space-between;
  138. padding: 0 40px;
  139. }
  140. .success-btn1 {
  141. color: #BBBBBB !important;
  142. background-color: #fff !important;
  143. flex: 0.4;
  144. span {
  145. color: #333;
  146. }
  147. }
  148. .success-btn2 {
  149. background-color: #00B962 !important;
  150. flex: 0.4;
  151. border-color: #00B962 !important;
  152. color: #fff !important;
  153. }
  154. </style>