Recharge.vue 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175
  1. <template>
  2. <van-popup v-model="show" round position="bottom" class="recharge-popup">
  3. <div class="recharge_top">
  4. <div class="recharge_title">
  5. <div class="thumbnail">
  6. <img :src="detailData.previewImgId" class="thumbnail_img" alt="">
  7. </div>
  8. <div class="recharge_t_right">
  9. <div class="t_right_name">{{detailData.docName}}</div>
  10. <div class="t_right_active">
  11. <span>{{detailData.price}}剑鱼币</span>
  12. <span>共{{detailData.docPageSize}}页</span>
  13. <span>{{detailData.docFileSize}}k</span>
  14. </div>
  15. </div>
  16. </div>
  17. <div class="div_close">
  18. <img src="../assets/icon/close.png" class="recharge_close" @click="closePopup()" />
  19. </div>
  20. </div>
  21. <div class="recharge_pay_content">
  22. <div class="pay_title">
  23. 支付方式
  24. </div>
  25. <div class="jianyu_pay">
  26. <span class="jy_money">剑鱼币</span>
  27. <span class="jy_tip">(剑鱼币不足,剩余{{coins.balance}}剑鱼币)</span>
  28. </div>
  29. </div>
  30. <div class="recharge_footer">
  31. <button class="j-button-cancel btn_active" @click="closePopup()">取消</button>
  32. <button class="j-button-sure btn_active" @click="buyMoney">去充值</button>
  33. </div>
  34. </van-popup>
  35. </template>
  36. <script lang="ts">
  37. import { Component, Prop, Vue } from 'vue-property-decorator'
  38. import { Icon, Popup, Sticky } from 'vant'
  39. // @ is an alias to /src
  40. @Component({
  41. name: 'Search',
  42. components: {
  43. [Popup.name]: Popup,
  44. [Sticky.name]: Sticky,
  45. [Icon.name]: Icon
  46. }
  47. })
  48. export default class extends Vue {
  49. @Prop() detailData: any
  50. @Prop() coins: any
  51. show = false
  52. closePopup () {
  53. this.show = false
  54. }
  55. buyMoney () {
  56. window.location.href = `/page_points_app/pay?id=${this.detailData.docId}`
  57. }
  58. }
  59. </script>
  60. <style lang="scss">
  61. .recharge-popup{
  62. box-sizing: border-box;
  63. padding: 0 16px;
  64. width: 100%;
  65. // height: 256px;
  66. .recharge_top{
  67. display: flex;
  68. justify-content: space-between;
  69. align-items: center;
  70. width: 100%;
  71. height: 100px;
  72. border-bottom: 1px solid rgba($color: #000000, $alpha: 0.05);
  73. .recharge_title{
  74. display: flex;
  75. justify-content: flex-start;
  76. align-items: center;
  77. .thumbnail{
  78. width: 48px;
  79. height: 60px;
  80. .thumbnail_img{
  81. width: 100%;
  82. height: 100%;
  83. }
  84. }
  85. .recharge_t_right{
  86. margin-left: 8px;
  87. display: flex;
  88. flex-direction: column;
  89. justify-content: space-between;
  90. width: 250px;
  91. height: 60px;
  92. .t_right_name{
  93. color: #171826;
  94. font-size: 15px;
  95. line-height: 22px;
  96. }
  97. .t_right_active{
  98. color: #5F5E64;
  99. font-size: 14px;
  100. line-height: 20px;
  101. span{
  102. margin-right: 8px;
  103. }
  104. }
  105. }
  106. }
  107. .div_close{
  108. display: flex;
  109. align-items: flex-start;
  110. justify-content: center;
  111. height: 100%;
  112. .recharge_close{
  113. margin-top:24px;
  114. display: flex;
  115. width: 20px;
  116. height: 20px;
  117. }
  118. }
  119. }
  120. .recharge_pay_content{
  121. overflow: hidden;
  122. width: 100%;
  123. height: 100px;
  124. border-bottom: 1px solid rgba($color: #000000, $alpha: 0.05);
  125. .pay_title{
  126. margin-top: 16px;
  127. width: 100%;
  128. height: 24px;
  129. color: #171826;
  130. font-size: 16px;
  131. line-height: 24px;
  132. }
  133. .jianyu_pay{
  134. margin-top: 24px;
  135. width: 100%;
  136. height: 20px;
  137. color: #171826;
  138. font-size: 14px;
  139. line-height: 20px;
  140. .jy_tip{
  141. color: #FF3A20;
  142. }
  143. }
  144. }
  145. .recharge_footer{
  146. width: 100%;
  147. height: 56px;
  148. display: flex;
  149. justify-content: space-between;
  150. align-items: center;
  151. .btn_active{
  152. width: 165px;
  153. height: 40px;
  154. }
  155. .j-button-cancel{
  156. border-radius: 4px;
  157. background: #EDEFF2;
  158. color: #5F5E64;
  159. font-size: 16px;
  160. line-height: 24px;
  161. }
  162. .j-button-sure{
  163. border-radius: 4px;
  164. background: #2ABED1;
  165. color: #F7F9FA;
  166. font-size: 16px;
  167. line-height: 24px;
  168. }
  169. }
  170. }
  171. </style>