paymentSuccess.vue 5.2 KB

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