success.vue 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  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?type=payfirm&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. console.log(option)
  59. this.orderId = option.orderId
  60. }
  61. },
  62. onShow() {
  63. }
  64. }
  65. </script>
  66. <style lang="scss">
  67. page{
  68. height: auto !important;
  69. }
  70. .container-cash{
  71. width: 100%;
  72. .container-wrapper{
  73. width:662rpx;
  74. margin: 0 auto;
  75. margin-top: 120rpx;
  76. display: flex;
  77. flex-direction: column;
  78. align-items: center;
  79. .cash-icon{
  80. width: 332rpx;
  81. height: 269rpx;
  82. margin-top: 112rpx;
  83. image{
  84. width: 332rpx;
  85. height: 269rpx;
  86. }
  87. }
  88. .cash-text{
  89. font-size: $font-size-28;
  90. color:#666666;
  91. line-height: 104rpx;
  92. }
  93. .cash-btn{
  94. margin-top: 79rpx;
  95. .btn{
  96. width: 600rpx;
  97. height: 90rpx;
  98. border-radius: 45rpx;
  99. line-height: 90rpx;
  100. text-align: center;
  101. font-size: $font-size-26;
  102. color: #FFFFFF;
  103. box-sizing: border-box;
  104. border: 1px solid #333333;
  105. margin-bottom: 24rpx;
  106. &.btn-open{
  107. color: #333333;
  108. }
  109. &.btn-pay{
  110. background:#191919;
  111. }
  112. }
  113. }
  114. }
  115. }
  116. </style>