paySuccess.vue 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. <template>
  2. <view class="content" :class="[AppTheme]">
  3. <view class="success">
  4. <u-icon name="checkmark-circle-fill" :color="primary" size="45"></u-icon>
  5. <text class="tit">支付成功</text>
  6. </view>
  7. <view class="btn-group">
  8. <view @click="goorder(1)">
  9. <view class="mix-btn bg-linear-gradient">
  10. 查看订单
  11. </view>
  12. </view>
  13. <view @click="goorder(2)">
  14. <view class="mix-btn hollow">
  15. 返回首页
  16. </view>
  17. </view>
  18. </view>
  19. </view>
  20. </template>
  21. <script>
  22. export default {
  23. data() {
  24. return {
  25. primary: this.$theme.primary,
  26. channel: 0,
  27. gourl: '/pages/index/index'
  28. }
  29. },
  30. methods: {
  31. goorder(type) {
  32. if (type == 1) {
  33. uni.navigateTo({
  34. url: this.gourl
  35. });
  36. } else {
  37. uni.switchTab({
  38. url: '/pages/index/index'
  39. });
  40. }
  41. }
  42. },
  43. onLoad(options) {
  44. this.channel = options.channel ? options.channel : 0
  45. console.log('channel', this.channel)
  46. //1:(商品,砍价 ,拼团),2:认养,,3:充值,4:租地,5:活动
  47. if (this.channel == 1) {
  48. this.gourl = '/pagesD/pages/order/order?state=0';
  49. } else if (this.channel == 2) {
  50. this.gourl = '/pagesA/pages/subrecord/subrecord';
  51. } else if (this.channel == 3) {
  52. this.gourl = '/pagesA/pages/mypurse/mypurse';
  53. } else if (this.channel == 4) {
  54. this.gourl = '/pagesB/pages/myland/myland';
  55. } else if (this.channel == 5) {
  56. this.gourl = '/pagesB/pages/activitylist/myactivity/myactivity';
  57. }
  58. },
  59. }
  60. </script>
  61. <style lang='scss'>
  62. .content {
  63. display: flex;
  64. flex-direction: column;
  65. justify-content: center;
  66. align-items: center;
  67. }
  68. .success-icon {
  69. font-size: 160upx;
  70. color: limegreen;
  71. margin-top: 100upx;
  72. }
  73. .success {
  74. display: flex;
  75. justify-content: center;
  76. align-items: center;
  77. padding-top: 100upx;
  78. .tit {
  79. font-size: 38upx;
  80. color: #303133;
  81. }
  82. }
  83. .btn-group {
  84. padding-top: 100upx;
  85. }
  86. .mix-btn {
  87. margin-top: 30upx;
  88. display: flex;
  89. align-items: center;
  90. justify-content: center;
  91. width: 600upx;
  92. height: 80upx;
  93. font-size: $font-lg;
  94. color: #fff;
  95. border-radius: 10upx;
  96. &.hollow {
  97. background: #fff;
  98. color: #303133;
  99. border: 1px solid #ccc;
  100. }
  101. }
  102. </style>