paySuccess.vue 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194
  1. <template>
  2. <view class="container">
  3. <view class="pay-icon">
  4. <view class="iconfont iconqueding"></view>
  5. </view>
  6. <view class="pay-title" v-if="goodType && orderStatus == 1">提交成功</view>
  7. <view class="pay-title" v-else>支付成功</view>
  8. <view class="pay-text">{{goodType ? '您已提交成功, 您所购买的商品需要留言卖家后进行自助采摘' : '您已支付成功,您所购买的商品正在向您飞奔, 请耐心等待!'}}</view>
  9. <view v-if="!goodType" class="pay-text">3秒后自动跳转订单详情...</view>
  10. <view class="pay-handle">
  11. <u-button v-if="goodType" type="success" shape="circle" :ripple="true" @click="goPickVideo()" class="button1">自助采摘</u-button>
  12. <u-button v-if="goodType" type="success" shape="circle" :ripple="true" :hair-line="false" :plain="true" @click="goToOrderList2()" class="button3">查看订单</u-button>
  13. <u-button v-if="!goodType" type="success" shape="circle" :ripple="true" @click="goToOrderList()" class="button1">查看订单</u-button>
  14. <u-button v-if="!goodType" type="success" shape="circle" :ripple="true" :hair-line="false" :plain="true" @click="goToIndex()" class="button2">返回首页</u-button>
  15. </view>
  16. </view>
  17. </template>
  18. <script>
  19. const NET = require('@/utils/request')
  20. const API = require('@/config/api')
  21. export default {
  22. data() {
  23. return {
  24. orderId: '',
  25. timeoutID:0,
  26. goodType: '',
  27. tenantCode: '',
  28. orderStatus: ''
  29. }
  30. },
  31. onLoad(options) {
  32. this.orderId = options.orderId
  33. this.goodType = options.goodType ? options.goodType : ''
  34. this.tenantCode = options.tenantCode ? options.tenantCode : ''
  35. this.orderStatus = options.orderStatus ? options.orderStatus : ''
  36. if (!this.goodType) {
  37. this.autoJump()
  38. }
  39. uni.setNavigationBarTitle({
  40. title: (this.goodType == 3 && this.orderStatus == 1) ? '提交结果' : '支付结果'
  41. });
  42. },
  43. methods: {
  44. // 自动跳转页面
  45. autoJump() {
  46. this.timeoutID = setTimeout(() => {
  47. uni.redirectTo({
  48. url: '/pagesMain/orderDetail?orderId=' + this.orderId + '&orderStatus=' + 2
  49. });
  50. },3000)
  51. },
  52. // 查看订单
  53. goToOrderList() {
  54. // uni.navigateTo({
  55. // url: '/pagesMain/orderList?type=1'
  56. // });
  57. clearTimeout(this.timeoutID)
  58. uni.navigateTo({
  59. url: '/pagesMain/orderDetail?orderId=' + this.orderId + '&orderStatus=' + 2
  60. });
  61. },
  62. // 自助采摘未付款查看订单
  63. goToOrderList2() {
  64. uni.navigateTo({
  65. url: '/pagesMain/orderDetail?orderId=' + this.orderId + '&orderStatus=' + 1
  66. });
  67. },
  68. // 跳转自助采摘直播
  69. goPickVideo() {
  70. var that=this;
  71. debugger
  72. if(uni.getStorageSync("firstTimeLiveUser")==""){
  73. uni.setStorage({
  74. key: 'firstTimeLiveUser',
  75. data: 1
  76. })
  77. uni.navigateTo({
  78. url: '/pagesGood/pickVideo?orderId=' + that.orderId + '&tenantCode=' + that.tenantCode
  79. });
  80. }else{
  81. uni.navigateTo({
  82. url: '/pagesGood/pickVideo?orderId=' + that.orderId + '&tenantCode=' + that.tenantCode
  83. });
  84. }
  85. },
  86. // 返回首页
  87. goToIndex() {
  88. clearTimeout(this.timeoutID)
  89. uni.switchTab({
  90. url: '/pages/index/index'
  91. });
  92. },
  93. }
  94. }
  95. </script>
  96. <style lang="less" scoped>
  97. page {
  98. width: 100%;
  99. height: 100%;
  100. }
  101. .container {
  102. width: 100%;
  103. height: 100%;
  104. background-color: #F3F3F3;
  105. position: absolute;
  106. .pay-icon {
  107. width: 100%;
  108. height: 120px;
  109. margin-top: 50px;
  110. float: left;
  111. text-align: center;
  112. .iconqueding {
  113. color: #52A63A;
  114. font-size: 120px;
  115. font-size: 240px;
  116. line-height: 120px;
  117. }
  118. }
  119. .pay-title {
  120. width: 100%;
  121. height: 20px;
  122. float: left;
  123. margin: 16px 0 20px 0;
  124. font-size: 16px;
  125. font-family: PingFang SC;
  126. color: #333333;
  127. line-height: 20px;
  128. text-align: center;
  129. }
  130. .pay-text {
  131. width: 100%;
  132. float: left;
  133. box-sizing: border-box;
  134. padding: 0 60px;
  135. font-size: 13px;
  136. font-family: PingFang SC;
  137. color: #666666;
  138. line-height: 22px;
  139. text-align: center;
  140. }
  141. .pay-handle {
  142. width: 230px;
  143. height: 100px;
  144. float: left;
  145. position: absolute;
  146. bottom: 60px;
  147. left: 50%;
  148. transform: translateX(-50%);
  149. .button1 {
  150. /deep/button {
  151. background-color: #56a83a !important;
  152. border: none !important;
  153. }
  154. margin-bottom: 12px;
  155. float: left;
  156. width: 100%;
  157. height: 34px;
  158. }
  159. .button2 {
  160. /deep/button {
  161. background-color: #74bd60 !important;
  162. border: none !important;
  163. color: white !important;
  164. }
  165. float: left;
  166. width: 100%;
  167. height: 34px;
  168. }
  169. .button3 {
  170. /deep/button {
  171. background-color: #74bd60 !important;
  172. border: none !important;
  173. color: white !important;
  174. }
  175. float: left;
  176. width: 100%;
  177. height: 34px;
  178. }
  179. }
  180. }
  181. </style>