success.vue 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. <template>
  2. <view class="container cashier">
  3. <cu-custom :navbar-data="nvabarData"></cu-custom>
  4. <view class="container-cash clearfix" :style="{ marginTop: CustomBar + 'px' }">
  5. <view class="container-wrapper">
  6. <view class="cash-icon">
  7. <image src="https://static.caimei365.com/app/img/icon/icon-success@2x.png" mode=""></image>
  8. </view>
  9. <view class="cash-text">
  10. <text>{{ successText }}</text>
  11. </view>
  12. <view class="cash-btn">
  13. <view
  14. class="btn btn-open"
  15. @click="
  16. this.$api.navigateTo(
  17. '/pages/user/order/order-details?type=confim&shopOrderId=' + shopOrderId
  18. )
  19. "
  20. >查看订单</view
  21. >
  22. <view class="btn btn-home" @click="this.$api.switchTabTo('/pages/tabBar/home/index')"
  23. >继续采购</view
  24. >
  25. </view>
  26. </view>
  27. </view>
  28. </view>
  29. </template>
  30. <script>
  31. export default {
  32. data() {
  33. return {
  34. shopOrderId: '',
  35. nvabarData: {
  36. //顶部自定义导航
  37. haveBack: false,
  38. showCapsule: 1, // 是否显示左上角图标 1表示显示 0表示不显示,
  39. showSearch: 0,
  40. title: '支付结果', // 导航栏 中间的标题
  41. textLeft: this.$store.state.isIphone
  42. },
  43. successText: '订单提交并支付成功',
  44. isIphoneX: this.$store.state.isIphoneX,
  45. CustomBar: this.CustomBar // 顶部导航栏高度
  46. }
  47. },
  48. onLoad(option) {
  49. if (option.type == 'deduction') {
  50. this.successText = '支付成功'
  51. } else {
  52. this.successText = '订单提交并支付成功'
  53. }
  54. this.initData(option)
  55. },
  56. methods: {
  57. initData(e) {
  58. let data = JSON.parse(e.data)
  59. this.shopOrderId = data.data.shopOrderId
  60. console.log(this.shopOrderId)
  61. }
  62. },
  63. onShow() {}
  64. }
  65. </script>
  66. <style lang="scss">
  67. page {
  68. height: auto !important;
  69. }
  70. .container-cash {
  71. width: 100%;
  72. .container-wrapper {
  73. width: 662rpx;
  74. margin: 0 auto;
  75. margin-top: 120rpx;
  76. display: flex;
  77. flex-direction: column;
  78. align-items: center;
  79. .cash-icon {
  80. width: 260rpx;
  81. height: 260rpx;
  82. margin-top: 120rpx;
  83. image {
  84. width: 260rpx;
  85. height: 260rpx;
  86. }
  87. }
  88. .cash-text {
  89. font-size: $font-size-40;
  90. color: $color-system;
  91. line-height: 104rpx;
  92. }
  93. .cash-btn {
  94. margin-top: 120rpx;
  95. .btn {
  96. width: 256rpx;
  97. height: 80rpx;
  98. border-radius: 40rpx;
  99. line-height: 80rpx;
  100. text-align: center;
  101. font-size: $font-size-26;
  102. color: #ffffff;
  103. margin: 12rpx 0;
  104. &.btn-open {
  105. background: linear-gradient(315deg, rgba(0, 212, 150, 1) 0%, rgba(126, 243, 174, 1) 100%);
  106. }
  107. &.btn-home {
  108. background: $btn-confirm;
  109. }
  110. }
  111. }
  112. }
  113. }
  114. </style>