pay.vue 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162
  1. <template>
  2. <view class="app">
  3. <view class="price-box">
  4. <text>{{$L('支付金额')}}</text>
  5. <text class="price">38.88</text>
  6. </view>
  7. <view class="pay-type-list">
  8. <view class="type-item b-b" @click="changePayType(1)">
  9. <text class="icon yticon icon-weixinzhifu"></text>
  10. <view class="con">
  11. <text class="tit">{{$L('微信支付')}}</text>
  12. <text>{{$L('推荐使用微信支付')}}</text>
  13. </view>
  14. <label class="radio">
  15. <radio value="" color="#fa436a" :checked='payType == 1' />
  16. </radio>
  17. </label>
  18. </view>
  19. <view class="type-item b-b" @click="changePayType(2)">
  20. <text class="icon yticon icon-alipay"></text>
  21. <view class="con">
  22. <text class="tit">{{$L('支付宝支付')}}</text>
  23. </view>
  24. <label class="radio">
  25. <radio value="" color="#fa436a" :checked='payType == 2' />
  26. </radio>
  27. </label>
  28. </view>
  29. <view class="type-item" @click="changePayType(3)">
  30. <text class="icon yticon icon-erjiye-yucunkuan"></text>
  31. <view class="con">
  32. <text class="tit">{{$L('预存款支付')}}</text>
  33. <text>{{$L('可用余额')}} ¥198.5</text>
  34. </view>
  35. <label class="radio">
  36. <radio value="" color="#fa436a" :checked='payType == 3' />
  37. </radio>
  38. </label>
  39. </view>
  40. </view>
  41. <text class="mix-btn" @click="confirm">{{$L('确认支付')}}</text>
  42. </view>
  43. </template>
  44. <script>
  45. export default {
  46. data() {
  47. return {
  48. payType: 1,
  49. orderInfo: {}
  50. };
  51. },
  52. computed: {
  53. },
  54. onLoad(options) {
  55. },
  56. methods: {
  57. //选择支付方式
  58. changePayType(type) {
  59. this.payType = type;
  60. },
  61. //确认支付
  62. confirm: async function() {
  63. uni.redirectTo({
  64. url: '/pages/money/paySuccess'
  65. })
  66. },
  67. }
  68. }
  69. </script>
  70. <style lang='scss'>
  71. .app {
  72. width: 100%;
  73. }
  74. .price-box {
  75. background-color: #fff;
  76. height: 265upx;
  77. display: flex;
  78. flex-direction: column;
  79. justify-content: center;
  80. align-items: center;
  81. font-size: 28upx;
  82. color: #909399;
  83. .price{
  84. font-size: 50upx;
  85. color: #303133;
  86. margin-top: 12upx;
  87. &:before{
  88. content: '¥';
  89. font-size: 40upx;
  90. }
  91. }
  92. }
  93. .pay-type-list {
  94. margin-top: 20upx;
  95. background-color: #fff;
  96. padding-left: 60upx;
  97. .type-item{
  98. height: 120upx;
  99. padding: 20upx 0;
  100. display: flex;
  101. justify-content: space-between;
  102. align-items: center;
  103. padding-right: 60upx;
  104. font-size: 30upx;
  105. position:relative;
  106. }
  107. .icon{
  108. width: 100upx;
  109. font-size: 52upx;
  110. }
  111. .icon-erjiye-yucunkuan {
  112. color: #fe8e2e;
  113. }
  114. .icon-weixinzhifu {
  115. color: #36cb59;
  116. }
  117. .icon-alipay {
  118. color: #01aaef;
  119. }
  120. .tit{
  121. font-size: $font-lg;
  122. color: $font-color-dark;
  123. margin-bottom: 4upx;
  124. }
  125. .con{
  126. flex: 1;
  127. display: flex;
  128. flex-direction: column;
  129. font-size: $font-sm;
  130. color: $font-color-light;
  131. }
  132. }
  133. .mix-btn {
  134. display: flex;
  135. align-items: center;
  136. justify-content: center;
  137. width: 630upx;
  138. height: 80upx;
  139. margin: 80upx auto 30upx;
  140. font-size: $font-lg;
  141. color: #fff;
  142. background-color: $base-color;
  143. border-radius: 10upx;
  144. box-shadow: 1px 2px 5px rgba(219, 63, 96, 0.4);
  145. }
  146. </style>