1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- <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>
|