paySuccess.vue 4.9 KB

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