paymentSuccess.vue 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254
  1. <template>
  2. <view>
  3. <ujp-navbar title="支付结果"></ujp-navbar>
  4. <view class="icon">
  5. <img src="../../assets/img/paymentSuccess.png" alt="">
  6. </view>
  7. <view class="text">
  8. 支付成功
  9. </view>
  10. <view class="infos-group">
  11. <view class="item">
  12. <view class="title">
  13. 商品总金额
  14. </view>
  15. <view class="value">
  16. 12.9元
  17. </view>
  18. </view>
  19. <view class="item">
  20. <view class="title">
  21. 交易手机号
  22. </view>
  23. <view class="value">
  24. 155****0001
  25. </view>
  26. </view>
  27. <view class="item">
  28. <view class="title">
  29. 订单号
  30. </view>
  31. <view class="value">
  32. T20230816112557708460925
  33. </view>
  34. </view>
  35. <view class="item">
  36. <view class="title">
  37. 创建时间
  38. </view>
  39. <view class="value">
  40. 2023-08-20 10:29:00
  41. </view>
  42. </view>
  43. <view class="item">
  44. <view class="title">
  45. 支付时间
  46. </view>
  47. <view class="value">
  48. 2023-08-20 10:29:30
  49. </view>
  50. </view>
  51. </view>
  52. <view class="btn">
  53. <view class="check">
  54. 查看订单
  55. </view>
  56. <view class="continue">
  57. 继续充电
  58. </view>
  59. </view>
  60. </view>
  61. </template>
  62. <script>
  63. import * as API from '@/apis/finance.js'
  64. import * as newsApi from '@/apis/news.js'
  65. export default {
  66. data() {
  67. return {
  68. detail: {},
  69. id: "",
  70. charge:false,
  71. chargeObj:{},
  72. title:'充值结果',
  73. bannerList:[],
  74. }
  75. },
  76. onLoad(op) {
  77. if(op.id){
  78. this.id=op.id
  79. this.getInfo();
  80. }
  81. var obj=this.carhelp.getGunIdCharge();
  82. if(obj){
  83. this.charge=true
  84. this.chargeObj=obj
  85. }
  86. this.getBannerInfo("recharge-end")
  87. },
  88. methods: {
  89. clickBanner(index){
  90. var mod= this.bannerList[index]
  91. if(mod.linkUrl.indexOf('http')==0){
  92. window.location=mod.linkUrl;
  93. }
  94. else if(mod.linkUrl.indexOf('#/')==0){
  95. if(mod.linkUrl.indexOf("?")==-1){
  96. mod.linkUrl+='?';
  97. }
  98. //window.location=mod.linkUrl;
  99. var url=mod.linkUrl.split("#")[1]
  100. //window.location = mod.clickUrl;
  101. uni.navigateTo({
  102. url: url
  103. })
  104. }
  105. else if(mod.linkUrl=='#'||mod.linkUrl==''){
  106. }
  107. else{
  108. uni.navigateTo({
  109. url:mod.linkUrl
  110. })
  111. }
  112. },
  113. getBannerInfo(code){
  114. uni.showLoading({
  115. title: "加载中",
  116. mask: true,
  117. })
  118. newsApi.getBannerInfo(code).then((res) => {
  119. uni.hideLoading();
  120. this.bannerList =res.data;
  121. // document.getElementsByClassName("uni-swiper-wrapper")[0].parentNode.style="background-color: rgb(255, 255, 255); height: 300px;"
  122. }).catch(error => {
  123. uni.showToast({
  124. title: error,icon: "none"
  125. })
  126. })
  127. },
  128. getInfo() {
  129. uni.showLoading({
  130. title: "加载中",
  131. mask: true,
  132. })
  133. API.accountDetail({
  134. outOrderNo: this.id
  135. }).then((res) => {
  136. uni.hideLoading()
  137. this.detail = res.data.orderInfo;
  138. if(this.detail.type=='2'){
  139. this.title='开通会员'
  140. }
  141. }).catch(error => {
  142. uni.showToast({
  143. title: error,
  144. icon: "none"
  145. })
  146. })
  147. },
  148. userindex() {
  149. uni.redirectTo({
  150. url: '/pages/user/index'
  151. })
  152. },
  153. rechargeContinue() {
  154. uni.redirectTo({
  155. url: '/pages/user/finance/recharge'
  156. })
  157. },
  158. chargeLook2(){
  159. uni.redirectTo({
  160. url:"/pages/searchPile/chargeProcess/dcCharging?id=" + this.detail.recordId
  161. })
  162. },
  163. chargeLook(){
  164. uni.redirectTo({
  165. url:'/pages/searchPile/chargeProcess/charge?isback=1&deviceNo='+this.chargeObj.deviceNo+"&gun="+this.chargeObj.channelNo+"&carNumber="+this.chargeObj.carNumber
  166. })
  167. },
  168. balanceLook() {
  169. uni.redirectTo({
  170. url: '/pages/user/finance/balance'
  171. })
  172. }
  173. }
  174. }
  175. </script>
  176. <style>
  177. page{
  178. background-color: #fff;
  179. }
  180. </style>
  181. <style lang="scss" scoped>
  182. .icon{
  183. width: 160rpx;
  184. height: 160rpx;
  185. margin: 100rpx auto 32rpx;
  186. img{
  187. width: 100%;
  188. height: 100%;
  189. }
  190. }
  191. .text{
  192. text-align: center;
  193. color: rgba(16, 16, 16, 1);
  194. font-size: 48rpx;
  195. }
  196. .infos-group{
  197. margin-top: 80rpx;
  198. padding: 0 80rpx;
  199. .item{
  200. display: flex;
  201. align-items: center;
  202. justify-content: space-between;
  203. margin-bottom: 24rpx;
  204. .title{
  205. color: rgba(119, 119, 119, 1);
  206. }
  207. .value{
  208. color: rgba(51, 51, 51, 1);
  209. }
  210. }
  211. }
  212. .btn{
  213. padding: 0 80rpx;
  214. margin-top: 80rpx;
  215. display: flex;
  216. align-items: center;
  217. justify-content: space-between;
  218. .check{
  219. width: 280rpx;
  220. height: 80rpx;
  221. line-height: 80rpx;
  222. border-radius: 50px;
  223. background-color: rgba(255, 255, 255, 1);
  224. color: rgba(0, 0, 0, 1);
  225. font-size: 32rpx;
  226. text-align: center;
  227. border: 1px solid rgba(223, 223, 223, 1);
  228. }
  229. .continue{
  230. width: 280rpx;
  231. height: 80rpx;
  232. line-height: 80rpx;
  233. border-radius: 50px;
  234. background-color: rgba(0, 185, 98, 1);
  235. color: rgba(255, 255, 255, 1);
  236. font-size: 32rpx;
  237. text-align: center;
  238. }
  239. }
  240. </style>