success.vue 3.2 KB

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