You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
< template >
< div class = "main-wrap index-page mb-xxl" >
< van -swipe :autoplay ="3000" lazy -render >
< van -swipe -item v-for ="(image,index) in images" :key ="index" >
< a :href ="image.ad_link" target = "_blank" v-if ="image.ad_link" >
< img class = "banner-image" :src ="image.ad_code" / >
< / a >
< img class = "banner-image" :src ="image.ad_code" v -else / >
< / v a n - s w i p e - i t e m >
< / v a n - s w i p e >
< div class = "feature" >
< img src = "@/assets/images/feature01.png" alt = "特色介紹" >
< / div >
< div class = "feature" >
< img src = "@/assets/images/feature02.png" alt = "應用領域" >
< / div >
< div class = "company" >
< div >
匯康科技股份有限公司
< / div >
< div >
服務專線 : { { shopStore . config . service _phone } }
< / div >
< div >
服務信箱 : { { shopStore . config . service _email } }
< / div >
< / div >
< / div >
< / template >
< script setup >
import { ref , onMounted } from 'vue'
import { getBanner } from '@/services/home'
import { useShopStore } from '@/store/Shop'
const shopStore = useShopStore ( )
const images = ref ( [ ] ) ;
const img _url = import . meta . env . VITE _APP _IMG _URL
onMounted ( async ( ) => {
let res = await getBanner ( )
if ( res . code === 200 ) {
images . value = res . data
}
} )
< / script >
< style lang = "less" scoped >
. banner - image {
width : 100 % ;
}
. feature {
width : 100 % ;
margin - bottom : 20 px ;
img {
width : 100 % ;
}
}
. company {
background - color : # f5f5f5 ;
width : 100 % ;
// text-align: center;
padding : 10 px ;
margin - bottom : 20 px ;
div {
color : # 666 ;
margin - bottom : 3 px ;
}
}
< / style >