default.vue 789 B

1234567891011121314151617181920212223242526272829303132
  1. <template>
  2. <div>
  3. <div class="home_adv_con" v-show="advTop.show_switch&&router.currentRoute.value.fullPath=='/'">
  4. <div class="home_adv" :style="{backgroundImage:'url('+advTop.imgUrl+')'}" @click="navTo">
  5. <div class="adv1200">
  6. <div class="close1" @click.stop="advTop.show_switch = false">×</div>
  7. </div>
  8. </div>
  9. </div>
  10. <slot/>
  11. <FooterBottom/>
  12. </div>
  13. </template>
  14. <script setup>
  15. const router = useRouter()
  16. const advTop = ref({})
  17. const getAdv = () => {
  18. get("v3/system/front/deco/firstAdv",{
  19. type: 2
  20. }).then((res) => {
  21. if (res.state == 200) {
  22. advTop.value = JSON.parse(res.data.data.replace(/&quot;/g, "\""))
  23. }
  24. });
  25. };
  26. getAdv()
  27. </script>