success.vue 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172
  1. <template>
  2. <view class="container cashier">
  3. <custom :systeminfo='systeminfo'
  4. :navbar-data='nvabarData'
  5. :headerBtnPosi ="headerBtnPosi"
  6. :isBackType="true"
  7. :path="'/pages/user/cart/cart'">
  8. </custom>
  9. <view class="container-cash clearfix" :style="{marginTop:CustomBar+'px'}">
  10. <view class="container-wrapper">
  11. <view class="cash-icon">
  12. <image :src="StaticUrl+'icon-pay-fail.png'" mode=""></image>
  13. </view>
  14. <view class="cash-text">
  15. <text>{{ successText }}</text>
  16. </view>
  17. </view>
  18. <view class="container-money">
  19. <view class="label">支付金额</view>
  20. <view class="money">¥{{ payMoney | NumFormat}}</view>
  21. </view>
  22. <view class="container-button">
  23. <view class="btn btn-pay" @click="handPayWxMinPay">重新支付</view>
  24. <view class="btn btn-open" @click="this.$api.redirectTo('/pages/user/order/order-details?type=confim&orderId='+orderId)">查看订单</view>
  25. </view>
  26. </view>
  27. </view>
  28. </template>
  29. <script>
  30. import custom from '@/components/cm-custom/pay-custom' //自定义导航
  31. export default{
  32. components:{
  33. custom
  34. },
  35. data(){
  36. return{
  37. StaticUrl:this.$Static,
  38. orderId:'',
  39. nvabarData: { //顶部自定义导航
  40. haveBack:false,
  41. showCapsule:1, // 是否显示左上角图标 1表示显示 0表示不显示,
  42. showSearch: 0,
  43. title: '支付结果', // 导航栏 中间的标题
  44. textLeft:this.$store.state.isIphone
  45. },
  46. headerBtnPosi:this.setHeaderBtnPosi(),//获取设备顶部胶囊高度
  47. systeminfo:this.setSysteminfo(), //获取设备信息
  48. isIphoneX:this.$store.state.isIphoneX,
  49. CustomBar:this.CustomBar,// 顶部导航栏高度
  50. successText:'订单支付失败',
  51. payMoney:88888
  52. }
  53. },
  54. onLoad(option) {
  55. this.initData(option)
  56. },
  57. filters:{
  58. NumFormat(value) {//处理金额
  59. return Number(value).toFixed(2);
  60. },
  61. },
  62. methods:{
  63. setHeaderBtnPosi(){
  64. // 获得胶囊按钮位置信息
  65. let headerBtnPosi = uni.getMenuButtonBoundingClientRect();
  66. return headerBtnPosi
  67. },
  68. setSysteminfo(){
  69. let systeminfo;
  70. uni.getSystemInfo({ // 获取设备信息
  71. success: (res) => {
  72. systeminfo = res
  73. },
  74. })
  75. return systeminfo
  76. },
  77. handPayWxMinPay(){
  78. },
  79. initData(option){
  80. console.log(option)
  81. this.orderId = option.orderId
  82. }
  83. },
  84. onShow() {
  85. }
  86. }
  87. </script>
  88. <style lang="scss">
  89. page{
  90. background-color: #f7f7f7;
  91. height: auto !important;
  92. }
  93. .container-cash{
  94. width: 100%;
  95. .container-wrapper{
  96. width:100%;
  97. margin: 0 auto;
  98. margin-top: 120rpx;
  99. display: flex;
  100. flex-direction: column;
  101. align-items: center;
  102. background-color: #FFFFFF;
  103. .cash-icon{
  104. width: 210rpx;
  105. height: 210rpx;
  106. margin-top: 112rpx;
  107. image{
  108. width: 210rpx;
  109. height: 210rpx;
  110. }
  111. }
  112. .cash-text{
  113. font-size: $font-size-28;
  114. color:#666666;
  115. line-height: 104rpx;
  116. font-weight: bold;
  117. }
  118. }
  119. .container-money{
  120. width: 100%;
  121. height: 90rpx;
  122. float: left;
  123. line-height: 90rpx;
  124. font-size: $font-size-28;
  125. box-sizing: border-box;
  126. padding: 0 24rpx;
  127. margin-top: 20rpx;
  128. background-color: #FFFFFF;
  129. .label{
  130. float: left;
  131. color: #333333;
  132. }
  133. .money{
  134. float: right;
  135. color: #666666;
  136. }
  137. }
  138. .container-button{
  139. width: 100%;
  140. height: auto;
  141. float: left;
  142. display: flex;
  143. flex-direction: column;
  144. align-items: center;
  145. margin-top: 160rpx;
  146. .btn{
  147. width: 600rpx;
  148. height: 90rpx;
  149. border-radius: 45rpx;
  150. line-height: 90rpx;
  151. text-align: center;
  152. font-size: $font-size-26;
  153. color: #FFFFFF;
  154. box-sizing: border-box;
  155. border: 1px solid $color-system;
  156. margin-bottom: 24rpx;
  157. &.btn-open{
  158. color: $color-system;
  159. }
  160. &.btn-pay{
  161. border-color: $color-system;
  162. background:$btn-confirm;
  163. }
  164. }
  165. }
  166. }
  167. </style>