paySuccess.vue 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204
  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. if(uni.getStorageSync("firstTimeLiveUser")==""){
  72. uni.setStorage({
  73. key: 'firstTimeLiveUser',
  74. data: 1
  75. })
  76. uni.navigateTo({
  77. url: '/pagesGood/pickVideo?orderId=' + that.orderId + '&tenantCode=' + that.tenantCode
  78. });
  79. }else{
  80. wx.getSetting({
  81. success(res) {
  82. /*if (!res.authSetting['scope.camera']){
  83. that.show_qx=false;
  84. }else*/
  85. if (!res.authSetting['scope.record']){
  86. that.show_qx=false;
  87. }else{
  88. uni.navigateTo({
  89. url: '/pagesGood/pickVideo?orderId=' + that.orderId + '&tenantCode=' + that.tenantCode
  90. });
  91. }
  92. }
  93. })
  94. }
  95. },
  96. // 返回首页
  97. goToIndex() {
  98. clearTimeout(this.timeoutID)
  99. uni.switchTab({
  100. url: '/pages/index/index'
  101. });
  102. },
  103. }
  104. }
  105. </script>
  106. <style lang="less" scoped>
  107. page {
  108. width: 100%;
  109. height: 100%;
  110. }
  111. .container {
  112. width: 100%;
  113. height: 100%;
  114. background-color: #F3F3F3;
  115. position: absolute;
  116. .pay-icon {
  117. width: 100%;
  118. height: 120px;
  119. margin-top: 50px;
  120. float: left;
  121. text-align: center;
  122. .iconqueding {
  123. color: #52A63A;
  124. font-size: 120px;
  125. font-size: 240px;
  126. line-height: 120px;
  127. }
  128. }
  129. .pay-title {
  130. width: 100%;
  131. height: 20px;
  132. float: left;
  133. margin: 16px 0 20px 0;
  134. font-size: 16px;
  135. font-family: PingFang SC;
  136. color: #333333;
  137. line-height: 20px;
  138. text-align: center;
  139. }
  140. .pay-text {
  141. width: 100%;
  142. float: left;
  143. box-sizing: border-box;
  144. padding: 0 60px;
  145. font-size: 13px;
  146. font-family: PingFang SC;
  147. color: #666666;
  148. line-height: 22px;
  149. text-align: center;
  150. }
  151. .pay-handle {
  152. width: 230px;
  153. height: 100px;
  154. float: left;
  155. position: absolute;
  156. bottom: 60px;
  157. left: 50%;
  158. transform: translateX(-50%);
  159. .button1 {
  160. /deep/button {
  161. background-color: #56a83a !important;
  162. border: none !important;
  163. }
  164. margin-bottom: 12px;
  165. float: left;
  166. width: 100%;
  167. height: 34px;
  168. }
  169. .button2 {
  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. .button3 {
  180. /deep/button {
  181. background-color: #74bd60 !important;
  182. border: none !important;
  183. color: white !important;
  184. }
  185. float: left;
  186. width: 100%;
  187. height: 34px;
  188. }
  189. }
  190. }
  191. </style>