index.vue 940 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <template>
  2. <div class="home_content" :class="{ popup_content: state.popup }">
  3. <router-view></router-view>
  4. </div>
  5. </template>
  6. <script setup>
  7. import { reactive, onMounted, provide, watch } from 'vue'
  8. import { setStorage, getStorage } from '@/uilts/help'
  9. let withdraw_info = reactive(getStorage('withdraw_info') || {})
  10. watch(withdraw_info, (newVal) => {
  11. setStorage('withdraw_info',newVal)
  12. })
  13. provide('withdraw_info', withdraw_info)
  14. let top_up_info = reactive(getStorage("top_up_info") || {});
  15. watch(top_up_info, (newVal) => {
  16. setStorage("top_up_info", newVal);
  17. });
  18. provide("top_up_info", top_up_info);
  19. let state = reactive({
  20. popup: true
  21. })
  22. onMounted(() => {
  23. if (window.location.href.indexOf('home.html') > 0) {
  24. state.popup = false
  25. }
  26. })
  27. </script>
  28. <style>
  29. .home_content {
  30. width: 100%;
  31. height: 100%;
  32. }
  33. .popup_content {
  34. width: 375px;
  35. height: 600px;
  36. box-sizing: border-box;
  37. overflow-y: auto;
  38. }
  39. </style>