success.vue 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  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.navigateTo('/pages/user/order/order-payment?orderId='+orderId)">支付订单</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. this.initData(option)
  41. },
  42. methods:{
  43. setHeaderBtnPosi(){
  44. // 获得胶囊按钮位置信息
  45. let headerBtnPosi = uni.getMenuButtonBoundingClientRect();
  46. return headerBtnPosi
  47. },
  48. setSysteminfo(){
  49. let systeminfo;
  50. uni.getSystemInfo({ // 获取设备信息
  51. success: (res) => {
  52. systeminfo = res
  53. },
  54. })
  55. return systeminfo
  56. },
  57. initData(option){
  58. this.orderId = option.orderId
  59. }
  60. },
  61. onShow() {
  62. }
  63. }
  64. </script>
  65. <style lang="scss">
  66. page{
  67. height: auto !important;
  68. }
  69. .container-cash{
  70. width: 100%;
  71. .container-wrapper{
  72. width:662rpx;
  73. margin: 0 auto;
  74. margin-top: 120rpx;
  75. display: flex;
  76. flex-direction: column;
  77. align-items: center;
  78. .cash-icon{
  79. width: 332rpx;
  80. height: 269rpx;
  81. margin-top: 112rpx;
  82. image{
  83. width: 332rpx;
  84. height: 269rpx;
  85. }
  86. }
  87. .cash-text{
  88. font-size: $font-size-28;
  89. color:#666666;
  90. line-height: 104rpx;
  91. }
  92. .cash-btn{
  93. margin-top: 79rpx;
  94. .btn{
  95. width: 600rpx;
  96. height: 90rpx;
  97. border-radius: 45rpx;
  98. line-height: 90rpx;
  99. text-align: center;
  100. font-size: $font-size-26;
  101. color: #FFFFFF;
  102. box-sizing: border-box;
  103. border: 1px solid #333333;
  104. margin-bottom: 24rpx;
  105. &.btn-open{
  106. color: #333333;
  107. }
  108. &.btn-pay{
  109. background:#191919;
  110. }
  111. }
  112. }
  113. }
  114. }
  115. </style>