Recharge.vue 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176
  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 van-multi-ellipsis--l2">{{detailData.docName}}</div>
  10. <div class="t_right_active">
  11. <span>{{detailData.price}}剑鱼币</span>
  12. <span>共{{detailData.docPageSize}}页</span>
  13. <span>{{detailData.docFileSize}}</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_mobile/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. height: 100%;
  78. .thumbnail{
  79. width: 48px;
  80. height: 60px;
  81. .thumbnail_img{
  82. width: 100%;
  83. height: 100%;
  84. }
  85. }
  86. .recharge_t_right{
  87. margin-left: 8px;
  88. display: flex;
  89. flex-direction: column;
  90. justify-content: space-between;
  91. width: 250px;
  92. height: 80px;
  93. .t_right_name{
  94. color: #171826;
  95. font-size: 15px;
  96. line-height: 22px;
  97. }
  98. .t_right_active{
  99. color: #5F5E64;
  100. font-size: 14px;
  101. line-height: 20px;
  102. span{
  103. margin-right: 8px;
  104. }
  105. }
  106. }
  107. }
  108. .div_close{
  109. display: flex;
  110. align-items: flex-start;
  111. justify-content: center;
  112. height: 100%;
  113. .recharge_close{
  114. margin-top:24px;
  115. display: flex;
  116. width: 20px;
  117. height: 20px;
  118. }
  119. }
  120. }
  121. .recharge_pay_content{
  122. overflow: hidden;
  123. width: 100%;
  124. height: 100px;
  125. border-bottom: 1px solid rgba($color: #000000, $alpha: 0.05);
  126. .pay_title{
  127. margin-top: 16px;
  128. width: 100%;
  129. height: 24px;
  130. color: #171826;
  131. font-size: 16px;
  132. line-height: 24px;
  133. }
  134. .jianyu_pay{
  135. margin-top: 24px;
  136. width: 100%;
  137. height: 20px;
  138. color: #171826;
  139. font-size: 14px;
  140. line-height: 20px;
  141. .jy_tip{
  142. color: #FF3A20;
  143. }
  144. }
  145. }
  146. .recharge_footer{
  147. width: 100%;
  148. height: 56px;
  149. display: flex;
  150. justify-content: space-between;
  151. align-items: center;
  152. .btn_active{
  153. width: 165px;
  154. height: 40px;
  155. }
  156. .j-button-cancel{
  157. border-radius: 4px;
  158. background: #EDEFF2;
  159. color: #5F5E64;
  160. font-size: 16px;
  161. line-height: 24px;
  162. }
  163. .j-button-sure{
  164. border-radius: 4px;
  165. background: #2ABED1;
  166. color: #F7F9FA;
  167. font-size: 16px;
  168. line-height: 24px;
  169. }
  170. }
  171. }
  172. </style>