index.vue 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  1. <template>
  2. <view :style="viewColor">
  3. <view class="payment" :class="pay_close ? 'on' : ''">
  4. <view class="title acea-row row-center-wrapper">
  5. 选择提现方式<text class="iconfont icon-guanbi" @click='close'></text>
  6. </view>
  7. <radio-group @change="radioChange">
  8. <label class="item acea-row row-between-wrapper" v-for="(item,index) in payMode" :key="index">
  9. <view class="acea-row-left">
  10. <view class="icon-left" :style="[{backgroundColor: item.bg_color}]">
  11. <view class="iconfont" :class="item.icon"></view>
  12. </view>
  13. <view class="name">{{item.name}}</view>
  14. </view>
  15. <view>
  16. <radio :value="item.id.toString()" :checked="item.id == order_id" />
  17. </view>
  18. </label>
  19. </radio-group>
  20. </view>
  21. <view class="mask" ref="close" @click='close' v-if="pay_close"></view>
  22. </view>
  23. </template>
  24. <script>
  25. // +----------------------------------------------------------------------
  26. // | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
  27. // +----------------------------------------------------------------------
  28. // | Copyright (c) 2016~2024 https://www.crmeb.com All rights reserved.
  29. // +----------------------------------------------------------------------
  30. // | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
  31. // +----------------------------------------------------------------------
  32. // | Author: CRMEB Team <admin@crmeb.com>
  33. // +----------------------------------------------------------------------
  34. import { orderPay, presellOrderPay } from '@/api/order.js';
  35. import { mapGetters } from "vuex";
  36. export default {
  37. props: {
  38. payMode: {
  39. type: Array,
  40. default: function() {
  41. return [];
  42. }
  43. },
  44. pay_close: {
  45. type: Boolean,
  46. default: false,
  47. },
  48. order_id: {
  49. type: String,
  50. default: '0'
  51. }
  52. },
  53. computed: mapGetters(['viewColor']),
  54. data() {
  55. return {
  56. type: '0'
  57. };
  58. },
  59. methods: {
  60. close: function() {
  61. this.$emit('payClose')
  62. },
  63. radioChange(e) {
  64. this.type = e.detail.value
  65. this.$emit('onChangeFun', {
  66. action: 'payClose',
  67. type: this.type
  68. });
  69. }
  70. }
  71. }
  72. </script>
  73. <style scoped lang="scss">
  74. .payment {
  75. position: fixed;
  76. bottom: 0;
  77. left: 0;
  78. width: 100%;
  79. border-radius: 16rpx 16rpx 0 0;
  80. background-color: #fff;
  81. padding-bottom: 60rpx;
  82. z-index: 99;
  83. transition: all 0.3s cubic-bezier(0.25, 0.5, 0.5, 0.9);
  84. transform: translate3d(0, 100%, 0);
  85. }
  86. .payment.on {
  87. transform: translate3d(0, 0, 0);
  88. }
  89. /deep/radio .uni-radio-input.uni-radio-input-checked {
  90. border: 1px solid var(--view-theme) !important;
  91. background-color: var(--view-theme) !important
  92. }
  93. .payment .title {
  94. text-align: center;
  95. height: 123rpx;
  96. font-size: 32rpx;
  97. color: #282828;
  98. font-weight: bold;
  99. padding-right: 30rpx;
  100. margin-left: 30rpx;
  101. position: relative;
  102. border-bottom: 1px solid #eee;
  103. }
  104. .payment .title .iconfont {
  105. position: absolute;
  106. right: 30rpx;
  107. top: 50%;
  108. transform: translateY(-50%);
  109. font-size: 43rpx;
  110. color: #8a8a8a;
  111. font-weight: normal;
  112. }
  113. .payment .item {
  114. border-bottom: 1px solid #eee;
  115. height: 130rpx;
  116. margin-left: 30rpx;
  117. padding-right: 30rpx;
  118. }
  119. .payment .item .acea-row-left{
  120. .icon-left{
  121. display: inline-block;
  122. width: 56rpx;
  123. height: 56rpx;
  124. text-align: center;
  125. line-height: 56rpx;
  126. background-color: #FE960F;
  127. margin-right: 20rpx;
  128. border-radius: 50%;
  129. .iconfont{
  130. color: #FFF;
  131. font-size: 36rpx;
  132. }
  133. }
  134. .name{
  135. display: inline-block;
  136. }
  137. }
  138. </style>