success.vue 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. <template>
  2. <view class="container cashier">
  3. <ws-custom :systeminfo='systeminfo' :navbar-data='nvabarData' :headerBtnPosi ="headerBtnPosi" :isBackType="true" :path="'/pages/user/cart/cart'"></ws-custom>
  4. <view class="container-cash clearfix" :style="{marginTop:CustomBar+'px'}">
  5. <view class="container-wrapper">
  6. <view class="cash-icon">
  7. <image src="../../../static/ws/dd_success.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-pay" @click="this.$api.switchTabTo('/pages/tabBar/home/index')">支付订单</view>
  14. <view class="btn btn-open" @click="this.$api.navigateTo('/pages/user/order/order-details?type=confim&orderID='+orderID)">查看订单</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:true,
  27. showCapsule:1, // 是否显示左上角图标 1表示显示 0表示不显示,
  28. showSearch: 0,
  29. title: '', // 导航栏 中间的标题
  30. textLeft:this.$store.state.isIphone
  31. },
  32. headerBtnPosi:this.setHeaderBtnPosi(),//获取设备顶部胶囊高度
  33. systeminfo:this.setSysteminfo(), //获取设备信息
  34. isIphoneX:this.$store.state.isIphoneX,
  35. CustomBar:this.CustomBar,// 顶部导航栏高度
  36. successText:'订单提交成功~',
  37. }
  38. },
  39. onLoad(option) {
  40. if(option.type == 'deduction'){
  41. this.successText = '支付成功'
  42. }else{
  43. this.successText = '订单提交成功~'
  44. }
  45. // this.initData(option)
  46. },
  47. methods:{
  48. setHeaderBtnPosi(){
  49. // 获得胶囊按钮位置信息
  50. let headerBtnPosi = uni.getMenuButtonBoundingClientRect();
  51. return headerBtnPosi
  52. },
  53. setSysteminfo(){
  54. let systeminfo;
  55. uni.getSystemInfo({ // 获取设备信息
  56. success: (res) => {
  57. systeminfo = res
  58. },
  59. })
  60. return systeminfo
  61. },
  62. initData(e){
  63. let data = JSON.parse(e.data);
  64. this.orderID = data.data.orderID
  65. }
  66. },
  67. onShow() {
  68. }
  69. }
  70. </script>
  71. <style lang="scss">
  72. page{
  73. height: auto !important;
  74. }
  75. .container-cash{
  76. width: 100%;
  77. .container-wrapper{
  78. width:662rpx;
  79. margin: 0 auto;
  80. margin-top: 120rpx;
  81. display: flex;
  82. flex-direction: column;
  83. align-items: center;
  84. .cash-icon{
  85. width: 332rpx;
  86. height: 269rpx;
  87. margin-top: 112rpx;
  88. image{
  89. width: 332rpx;
  90. height: 269rpx;
  91. }
  92. }
  93. .cash-text{
  94. font-size: $font-size-28;
  95. color:#666666;
  96. line-height: 104rpx;
  97. }
  98. .cash-btn{
  99. margin-top: 79rpx;
  100. .btn{
  101. width: 600rpx;
  102. height: 90rpx;
  103. border-radius: 45rpx;
  104. line-height: 90rpx;
  105. text-align: center;
  106. font-size: $font-size-26;
  107. color: #FFFFFF;
  108. box-sizing: border-box;
  109. border: 1px solid #333333;
  110. margin-bottom: 24rpx;
  111. &.btn-open{
  112. color: #333333;
  113. }
  114. &.btn-pay{
  115. background:#191919;
  116. }
  117. }
  118. }
  119. }
  120. }
  121. </style>