paymentdetail.vue 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176
  1. <template>
  2. <view>
  3. <tn-nav-bar :bottomShadow="false" :isBack="false">支付结果</tn-nav-bar>
  4. <view :style="{height: tobheight+'px'}"></view>
  5. <view class="pay_icon">
  6. <u-icon name="checkmark-circle-fill" color="#00CA88" size="88"></u-icon>
  7. <view class="pay_result">支付成功</view>
  8. <view class="pay_money">¥{{info.pay_price?info.pay_price:0}}</view>
  9. </view>
  10. <view class="pay_detail">
  11. <view class="">支付状态:<view class="">已支付</view></view>
  12. <view class="">支付方式:<view class="">微信支付</view></view>
  13. <view class="">支付时间:<view class="">{{info.create_time?info.create_time:''}}</view></view>
  14. <view class="">支付单号:<view class="">{{info.order_number?info.order_number:''}}</view></view>
  15. <!-- <text>支付状态:已支付</text>
  16. <text>支付方式:微信支付</text>
  17. <text>支付时间:2022-04-07 18:09:06</text>
  18. <text>支付单号:58797654306318049122</text> -->
  19. </view>
  20. <view class="pay_operation">
  21. <!-- <view class="pay_back">
  22. <u-button type="primary" shape="circle" text="订单详情" size="large" plain="true" color="#00CA88"></u-button>
  23. </view> -->
  24. <view class="pay_back">
  25. <u-button @click="fanhui" type="primary" shape="circle" text="返回" size="large" color="#00CA88"></u-button>
  26. </view>
  27. <!-- <view class="pay_back">
  28. <u-button @click="fanhuidttt" type="primary" shape="circle" text="回到首页" size="large" color="#00CA88"></u-button>
  29. </view> -->
  30. </view>
  31. <wike-loading-page :isLoading="isLoading"></wike-loading-page>
  32. </view>
  33. </template>
  34. <script>
  35. import { mapMutations, mapActions, mapState, mapGetters } from 'vuex';
  36. export default {
  37. data() {
  38. return {
  39. orderid:'',
  40. type:'',
  41. info:{},
  42. tobheight:45,
  43. platform: this.$platform.get(),
  44. isLoading:true,
  45. orderType:0
  46. }
  47. },
  48. computed: {
  49. ...mapGetters(['appInfo'])
  50. },
  51. onLoad(e) {
  52. var that = this;
  53. if(e&&e.orderId){
  54. // console.log(e.orderId)
  55. that.orderid = e.orderId
  56. that.orderType = e.orderType
  57. if(e.orderType == 1){
  58. that.getorders()
  59. }else{
  60. that.getorder()
  61. }
  62. }
  63. if(this.platform == 'wxMiniProgram'){
  64. var menumtop = uni.getMenuButtonBoundingClientRect().top - uni.getSystemInfoSync().statusBarHeight
  65. var paddingtop = uni.getSystemInfoSync().statusBarHeight + menumtop
  66. this.tobheight = (menumtop+paddingtop+uni.getMenuButtonBoundingClientRect().height)
  67. }
  68. },
  69. methods: {
  70. getorder(){
  71. var that = this;
  72. that.$http('order.detail',{id: that.orderid}).then( res => {
  73. // console.log(res);
  74. if(res.code == 0){
  75. uni.setNavigationBarTitle({
  76. title: this.appInfo.site_name
  77. });
  78. that.info = res.data
  79. this.isLoading = false
  80. // console.log(that.info);
  81. }
  82. }
  83. )},
  84. getorders(){
  85. var that = this;
  86. that.$http('order.detailSettle',{id: that.orderid}).then( res => {
  87. // console.log(res);
  88. if(res.code == 0){
  89. uni.setNavigationBarTitle({
  90. title: this.appInfo.site_name
  91. });
  92. that.info = res.data
  93. this.isLoading = false
  94. // console.log(that.info);
  95. }
  96. }
  97. )
  98. },
  99. fanhui(){
  100. if(this.orderType == 0){
  101. // uni.navigateBack()
  102. uni.redirectTo({
  103. url:'/pages/user/member/member'
  104. })
  105. return;
  106. }
  107. if(this.orderType == 2){
  108. // uni.navigateBack()
  109. uni.switchTab({
  110. url:'/pages/signin/signin'
  111. })
  112. return;
  113. }
  114. uni.redirectTo({
  115. url:'/pages/user/commission/index'
  116. })
  117. },
  118. fanhuidttt(){
  119. this.$store.commit('subscribeMessage', 'order');
  120. }
  121. }
  122. }
  123. </script>
  124. <style lang="scss" scoped>
  125. .pay_icon{
  126. width: 100%;
  127. display: flex;
  128. align-items: center;
  129. justify-content: center;
  130. flex-direction: column;
  131. margin-top: 80rpx;
  132. .pay_result{
  133. margin-top: 48rpx;
  134. font-weight: 700;
  135. }
  136. .pay_money{
  137. font-size: 53rpx;
  138. font-weight: bold;
  139. margin-top: 26rpx;
  140. }
  141. }
  142. .pay_detail{
  143. display: flex;
  144. flex-direction: column;
  145. font-size: 30rpx;
  146. margin-left: 15%;
  147. margin-top: 80rpx;
  148. view{
  149. display: flex;
  150. align-items: center;
  151. color: #909090;
  152. margin-top: 28rpx;
  153. view{
  154. color: #000000;
  155. margin-top: 0;
  156. margin-left: 15rpx;
  157. }
  158. }
  159. }
  160. .pay_operation{
  161. position: absolute;bottom: 180rpx;width: 100%;
  162. .pay_back{
  163. padding: 36rpx 100rpx 0rpx;
  164. }
  165. }
  166. </style>