payList.vue 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. <template>
  2. <view class="content" :style="{height:nowHeight}">
  3. <view class="pay-list-box">
  4. <view class="pay-title">
  5. <image src="../../../static/icon/moneyIcon.png" mode=""></image>
  6. <text>购买查询次数</text>
  7. </view>
  8. <view class="pay-content" :class="{'border-select':selectId === search.searchId}"
  9. v-for="search in searchList" :key='search.searchId' @click="selectPackage(search)">
  10. <view style="margin-left: 3%;">可查询次数 {{search.searchCount}}</view>
  11. <view style="margin-right: 5%;">¥ {{search.searchMoney}}</view>
  12. </view>
  13. </view>
  14. <view class="pay-box">
  15. <view style="margin-left: 5%;">{{packageMoney}}</view>
  16. <button type="primary" class="submit-message" @click="payPackage()">购买</button>
  17. </view>
  18. </view>
  19. </template>
  20. <script>
  21. export default {
  22. data() {
  23. return {
  24. nowHeight:getApp().globalData.glbalHeight,
  25. selectId:'',
  26. packageMoney:'',
  27. searchList:[
  28. {
  29. searchCount:'100',
  30. searchMoney:'10',
  31. searchId:'A1',
  32. },
  33. {
  34. searchCount:'200',
  35. searchMoney:'20',
  36. searchId:'A2',
  37. },{
  38. searchCount:'300',
  39. searchMoney:'30',
  40. searchId:'A3',
  41. },
  42. ],
  43. }
  44. },
  45. methods: {
  46. selectPackage(param){
  47. this.selectId = param.searchId;
  48. this.packageMoney = param.searchMoney + '元';
  49. }
  50. }
  51. }
  52. </script>
  53. <style>
  54. .content {
  55. display: flex;
  56. flex-direction: column;
  57. align-items: center;
  58. justify-content: flex-start;
  59. background: #f4f5f7;
  60. }
  61. .pay-list-box {
  62. width: 95%;
  63. min-height:400upx;
  64. background: #fff;
  65. margin-top: 3%;
  66. border-radius: 10rpx;
  67. }
  68. .pay-title {
  69. width: 95%;
  70. height: 80rpx;
  71. font-size: 30rpx;
  72. margin: 0 auto;
  73. border-bottom: 1px solid #d9d9d9;
  74. display: flex;
  75. align-items: center;
  76. }
  77. .pay-title image {
  78. width: 50upx;
  79. height: 50upx;
  80. margin-right: 2%;
  81. }
  82. .pay-content {
  83. width: 95%;
  84. height: 90rpx;
  85. font-size: 30rpx;
  86. margin: 3% auto;
  87. border: 1px solid #d9d9d9;
  88. display: flex;
  89. align-items: center;
  90. justify-content: space-between;
  91. border-radius: 10rpx;
  92. }
  93. .pay-box {
  94. width: 100%;
  95. height: 100rpx;
  96. position: fixed;
  97. bottom: 0;
  98. background: #fff;
  99. display: flex;
  100. align-items: center;
  101. }
  102. .pay-box button {
  103. margin-right: 5%;
  104. height: 55rpx;
  105. line-height: 55rpx;
  106. font-size: 28rpx;
  107. background: #27BCEF;
  108. }
  109. .border-select {
  110. border:2px solid #27BCEF !important;
  111. }
  112. </style>