recharge.vue 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178
  1. <template>
  2. <view class="recharge">
  3. <!-- <view class="head">
  4. <image src="../../../static/index/convenient-services/return.png" mode="" @click="back" />
  5. <text>充值</text>
  6. </view> -->
  7. <view class="main">
  8. <view class="title-list">
  9. <view class="text">加油充值</view>
  10. <view class="why">?</view>
  11. </view>
  12. <view class="price-list">
  13. <view class="item" v-for="item in prices" :key="item.id" @click="handleToAmount(item.price)">
  14. <view class="number">{{ item.price }}元</view>
  15. <view class="money">售价{{ item.price }}元</view>
  16. </view>
  17. <view class="customize" @click="handleToCustomize">
  18. <view class="first">更多面额</view>
  19. <view class="second">自定义</view>
  20. </view>
  21. </view>
  22. </view>
  23. </view>
  24. </template>
  25. <script>
  26. import { prices } from './data'
  27. export default {
  28. data() {
  29. return {
  30. prices,
  31. youkabianhao: "",
  32. };
  33. },
  34. components: {
  35. },
  36. onLoad(val) {
  37. console.log(val)
  38. this.youkabianhao = val.kahao;
  39. },
  40. onShow() {
  41. },
  42. methods: {
  43. back() {
  44. uni.navigateTo({ url: '/pages_user/serve/tuanyou/service-oil' })
  45. },
  46. handleToAmount(item) {
  47. // console.log(item);
  48. uni.navigateTo({
  49. url: `/pages_user/serve/tuanyou/amount?price=${item}&kahao=` + this.youkabianhao
  50. })
  51. },
  52. handleToCustomize() {
  53. uni.navigateTo({
  54. url: `/pages_user/serve/tuanyou/amount?kahao=` + this.youkabianhao
  55. })
  56. }
  57. },
  58. };
  59. </script>
  60. <style lang="less" scoped>
  61. .recharge {
  62. width: 100vw;
  63. min-height: 100vh;
  64. .head {
  65. width: 100%;
  66. display: flex;
  67. align-items: center;
  68. justify-content: center;
  69. padding-top: 36upx;
  70. image {
  71. width: 56upx;
  72. height: 56upx;
  73. position: absolute;
  74. left: 30upx;
  75. }
  76. text {
  77. color: rgba(0, 0, 0, 0.85);
  78. font-size: 36upx;
  79. font-weight: 500;
  80. }
  81. }
  82. .main {
  83. padding: 40upx 40upx 0 40upx;
  84. .title-list {
  85. display: flex;
  86. justify-content: space-between;
  87. align-items: center;
  88. .text {
  89. font-size: 28upx;
  90. color: #000000;
  91. }
  92. .why {
  93. color: #999999;
  94. font-size: 28upx;
  95. font-weight: 500;
  96. width: 40upx;
  97. height: 40upx;
  98. border: 2upx solid #999999;
  99. border-radius: 40upx;
  100. display: flex;
  101. justify-content: center;
  102. align-items: center;
  103. }
  104. }
  105. .price-list {
  106. display: flex;
  107. flex-wrap: wrap;
  108. justify-content: space-between;
  109. margin-top: 28upx;
  110. .item {
  111. border-radius: 10upx;
  112. box-sizing: border-box;
  113. border: 1upx solid #FA5151;
  114. width: 194upx;
  115. height: 140upx;
  116. display: flex;
  117. flex-direction: column;
  118. align-items: center;
  119. justify-content: center;
  120. margin-bottom: 40upx;
  121. .number {
  122. font-size: 36upx;
  123. font-weight: 500;
  124. color: #000000;
  125. }
  126. .money {
  127. font-size: 28upx;
  128. font-weight: 350;
  129. color: #000000;
  130. }
  131. }
  132. .customize {
  133. border-radius: 10upx;
  134. box-sizing: border-box;
  135. border: 1upx solid #FA5151;
  136. width: 194upx;
  137. height: 140upx;
  138. display: flex;
  139. flex-direction: column;
  140. align-items: center;
  141. justify-content: center;
  142. margin-bottom: 40upx;
  143. .first {
  144. font-size: 36upx;
  145. color: #FF0000;
  146. }
  147. .second {
  148. font-size: 28upx;
  149. font-weight: 350;
  150. color: #000000;
  151. }
  152. }
  153. }
  154. }
  155. }
  156. </style>