order_ok.vue 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. <template>
  2. <view class="m-app">
  3. <view class="fx-h fx-ac fx-bc">
  4. <view class="yyok"><image src="/static/img/pay_ok.png" mode="widthFix"/></view>
  5. <view class="title" >支付成功</view>
  6. <view class="pay_name" v-if="orderId != ''">单号:{{ orderId }}</view>
  7. <view class="pay_time" v-if="time != ''">{{ time }}</view>
  8. <view class="title" v-else>感谢您的支持</view>
  9. <view class="nt yy-btn" @tap="tapHome" v-if="isHome">点击返回首页</view>
  10. <view class="nt yy-btn" @tap="tapOrder" v-else>点击返回订单</view>
  11. </view>
  12. </view>
  13. </template>
  14. <script>
  15. var orderId = "";
  16. var activeType = "";
  17. import {mapState,mapMutations} from 'vuex';
  18. export default {
  19. computed: mapState(['user']),
  20. data() {
  21. return {
  22. orderId : "",
  23. time : "",
  24. pay_card : "",
  25. payType : "",
  26. isHome : false
  27. }
  28. },
  29. onLoad(options){
  30. this.orderId = options.orderId || '';
  31. this.time = options.time || '';
  32. this.pay_card = options.pay_card || '';
  33. this.payType = options.payType || '';
  34. this.isHome = options.isHome || false;
  35. },
  36. methods: {
  37. tapOrder:function(){
  38. uni.redirectTo({
  39. url:'/pages/user/order/index'
  40. });
  41. },
  42. tapHome:function(){
  43. uni.redirectTo({
  44. url:"/pages/index/home"
  45. })
  46. }
  47. }
  48. }
  49. </script>
  50. <style>
  51. .m-app{width:100vw}
  52. .yyok{ margin-top: 100px;}
  53. .yyok image{ width: 100px;}
  54. .title{ font-size: 24px;color: #000;font-weight: bold;color:#ef4034; margin-top: 10px;}
  55. .yyok-view{ font-size: 14px;color: #303033; margin-top: 10px;}
  56. .pay_name{padding: 5px 0;font-size: 14px;}
  57. .pay_card{padding: 5px 0;font-size: 14px;}
  58. .pay_time{font-size: 14px;color: #303033;}
  59. .yy-btn{position: absolute;bottom: 60px;width: 80%;text-align: center;background: #ef4034; padding: 15px 0; color: #fff; font-size: 14px; margin-top: 20px; border-radius: 20px;}
  60. </style>