recharge.vue 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. <template>
  2. <view class="re-body pd16_15">
  3. <p class="ft14">账户余额<span class="ft14 kb-txt">{{user_info.total_coin}}</span>K币</p>
  4. <view class="box options-box">
  5. <block v-for="(item,key) in list" :key="key">
  6. <view class="box mt16 options-item">
  7. <text class="ft18 pirice-txt"> 50.9元</text>
  8. <p class="ft14 cz-desc-txt">5000币 <text class="ft14">+888币</text></p>
  9. <text></text>
  10. </view>
  11. </block>
  12. </view>
  13. <view class="ft14 textdesc">
  14. <text class="ft12">1、虚拟商品,一经购买不得退换</text>
  15. <text class="ft12">2、充值后K币可能有延迟,1小时未到账请在“我的”页面联系客服</text>
  16. <text class="ft12">3、未满18岁的未成年需要在监护人陪同下购买并观看短剧剧</text>
  17. <text class="ft12">4、购买成功后,“K币”仅在本小程序中使用</text>
  18. <text class="ft12">5、购买成功后可在”我的”页面订单中心进行查看</text>
  19. </view>
  20. </view>
  21. </template>
  22. <script>
  23. import {
  24. getOptions
  25. } from "@/common/apis/recharge.js"
  26. export default {
  27. props: ['user_info', "video_info"],
  28. data() {
  29. return {
  30. list: []
  31. }
  32. },watch:{
  33. user_info:{
  34. // 此处监听variable变量,当期有变化时执行
  35. handler(item1,item2){
  36. this.user_info = item1;
  37. // console.log('111111111111','item1',item1,'item2',item2,'this.user_info',this.user_info)
  38. // item1为新值,item2为旧值
  39. }
  40. }
  41. },
  42. created() {
  43. // props 会暴露到 `this` 上
  44. this.get_options();
  45. console.log(this.user_info, 'getOptions', this.list)
  46. },
  47. methods: {
  48. loginAct() {
  49. this.$emit('loginAct');
  50. },
  51. showQrcodeAct() {
  52. this.$emit('qrcode');
  53. },
  54. async get_options() {
  55. this.list = await getOptions();
  56. }
  57. }
  58. }
  59. </script>
  60. <style>
  61. @import url("style/recharge.css");
  62. </style>