success.vue 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  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://admin-b.caimei365.com/userfiles/1/images/photo/2020/05/%E8%AE%A2%E5%8D%95%E6%94%AF%E4%BB%98%E6%88%90%E5%8A%9F%402x.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. }
  50. },
  51. onShow() {
  52. }
  53. }
  54. </script>
  55. <style lang="scss">
  56. page{
  57. height: auto !important;
  58. }
  59. .container-cash{
  60. width: 100%;
  61. .container-wrapper{
  62. width:662rpx;
  63. margin: 0 auto;
  64. margin-top: 120rpx;
  65. display: flex;
  66. flex-direction: column;
  67. align-items: center;
  68. .cash-icon{
  69. width: 348rpx;
  70. height: 348rpx;
  71. margin-top: 120rpx;
  72. image{
  73. width: 348rpx;
  74. height: 348rpx;
  75. }
  76. }
  77. .cash-text{
  78. font-size: $font-size-40;
  79. color: $color-system;
  80. line-height: 104rpx;
  81. }
  82. .cash-btn{
  83. margin-top: 120rpx;
  84. .btn{
  85. width: 256rpx;
  86. height: 80rpx;
  87. border-radius: 40rpx;
  88. line-height: 80rpx;
  89. text-align: center;
  90. font-size: $font-size-26;
  91. color: #FFFFFF;
  92. margin: 12rpx 0;
  93. &.btn-open{
  94. background:linear-gradient(315deg,rgba(0,212,150,1) 0%,rgba(126,243,174,1) 100%);
  95. }
  96. &.btn-home{
  97. background:$btn-confirm;
  98. }
  99. }
  100. }
  101. }
  102. }
  103. </style>