success.vue 2.5 KB

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