payment.vue 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. <template>
  2. <view class="payment-modal">
  3. <view class="modal-bg"></view>
  4. <view class="modal-box animated fast" :class="show ? 'slideInUp' : 'slideOutDown'">
  5. <view class="modal-main">
  6. <view class="closed">
  7. <text @click="closed()" class="iconfont ft20 cl-notice iconbtn_close"></text>
  8. </view>
  9. <view class="lh20 ft16 cl-main ftw600 text-center">支付订单</view>
  10. <view class=" pd16_15">
  11. <radio-group @change="changeType">
  12. <view class="box pd16_15 flex alcenter space">
  13. <view class="flex alcenter">
  14. <text class="iconfont iconicon_pay_balance ft32" style="color: #FFBD1E;"></text>
  15. <text class="ml15 ft14 ftw500 cl-main">余额支付</text>
  16. <text class="ml10 ft12 cl-notice">余额为0,不可用</text>
  17. </view>
  18. <view>
  19. <radio value="money" :checked="payType == 'money'" :disabled="false" :color="tempColor" />
  20. </view>
  21. </view>
  22. <view class="box pd16_15 mt16 flex alcenter space">
  23. <view class="flex alcenter">
  24. <text class="iconfont iconicon_pay_balance ft32 cl-green"></text>
  25. <text class="ml15 ft14 ftw500 cl-main">微信支付</text>
  26. </view>
  27. <view>
  28. <radio value="weixin" :checked="payType == 'weixin'" :color="tempColor" />
  29. </view>
  30. </view>
  31. </radio-group>
  32. </view>
  33. </view>
  34. <view class="bg-w mt16 pd10_15" style="box-shadow: 0rpx -4rpx 16rpx 0rpx rgba(0, 0, 0, 0.04);">
  35. <button class="btn-big" :style="getBtnStyle">确定支付</button>
  36. </view>
  37. </view>
  38. </view>
  39. </template>
  40. <script>
  41. export default{
  42. props:{
  43. },
  44. data(){
  45. return {
  46. payType:'weixin',
  47. show:false,
  48. }
  49. },
  50. created(){
  51. this.show = true;
  52. },
  53. methods:{
  54. changeType(e){
  55. this.payType = e.detail.value;
  56. },
  57. closed(){
  58. this.show = false;
  59. setTimeout(()=>{
  60. this.$emit('closed');
  61. },400);
  62. }
  63. }
  64. }
  65. </script>
  66. <style>
  67. .payment-modal{
  68. position: relative;
  69. z-index: 400;
  70. }
  71. .payment-modal .modal-bg{
  72. position: fixed;
  73. z-index: 400;
  74. left: 0;
  75. top: 0;
  76. width: 100%;
  77. height: 100vh;
  78. background: rgba(0,0,0,.5);
  79. }
  80. .payment-modal .modal-box{
  81. position: fixed;
  82. z-index: 401;
  83. background:#FFFFFF;
  84. left: 0;
  85. bottom: 0;
  86. width: 100%;
  87. padding-bottom:0rpx;
  88. padding-bottom:constant(safe-area-inset-bottom);
  89. padding-bottom:env(safe-area-inset-bottom);
  90. border-radius:32rpx 32rpx 0rpx 0rpx;
  91. }
  92. .payment-modal .modal-main{
  93. position: relative;
  94. height: auto;
  95. overflow: hidden;
  96. padding-top: 64rpx;
  97. }
  98. .payment-modal .modal-main .closed{
  99. position: absolute;
  100. right: 40rpx;
  101. top: 40rpx;
  102. }
  103. </style>