paySuccess.vue 4.0 KB

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