success.vue 2.5 KB

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