paymentSuccess.vue 5.2 KB

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