<template>
    <!-- 广告位 -->
    <div class="adversing">
        <div class="inner">
            <a href="http://www.baidu.com">
                <img :src="imgurl.thumb" alt="">
            </a>
        </div>
        <p>{{ message }}</p>
    </div>
</template>

<script setup>
import { onMounted } from 'vue'

const nuxtApp = useNuxtApp();
const axios = nuxtApp.$axios;

const props = defineProps({
    imgurl: String
});


let image = useState("image", () => "")
let getWebsiteAdvertisement = async () => {
    try {
        const response = await axios.get(`/web/getWebsiteAdvertisement?adPlace=${9}`);
        console.log(response);
        image.value = response.data;
    } catch (error) {
        console.error(error);
    }
}

onMounted(() => {
    getWebsiteAdvertisement()
})

</script>

<style lang="less">
// 广告位logo
.adversing {
    width: 100%;
    height: 90px;
    margin: 60px 0 60px;

    img {
        width: 1200px;
        height: 90px;
    }
}
</style>