轮播图跳转问题修复
This commit is contained in:
parent
2c6b187983
commit
f51d2ecd01
|
|
@ -152,7 +152,12 @@ const getSwiperListData = async () => {
|
||||||
|
|
||||||
const onClickSwiper = (item: any) => {
|
const onClickSwiper = (item: any) => {
|
||||||
if (item.slideLink) {
|
if (item.slideLink) {
|
||||||
window.open(item.slideLink, '_blank')
|
// window.open(item.slideLink, '_blank')
|
||||||
|
const link = item.slideLink.startsWith('http')
|
||||||
|
? item.slideLink
|
||||||
|
: `https://${item.slideLink}`
|
||||||
|
window.open(link, '_blank')
|
||||||
|
// window.open('www.baidu.com')
|
||||||
} else {
|
} else {
|
||||||
router.push({ name: 'equipList' })
|
router.push({ name: 'equipList' })
|
||||||
}
|
}
|
||||||
|
|
@ -279,12 +284,15 @@ getSwiperListData()
|
||||||
<div class="swiper-img">
|
<div class="swiper-img">
|
||||||
<el-carousel :interval="5000" arrow="always" style="height: 100%">
|
<el-carousel :interval="5000" arrow="always" style="height: 100%">
|
||||||
<template v-for="(item, index) in swiperList" :key="index">
|
<template v-for="(item, index) in swiperList" :key="index">
|
||||||
<el-carousel-item style="height: 100%" v-if="item.delFlag == 0">
|
<el-carousel-item
|
||||||
|
style="height: 100%"
|
||||||
|
v-if="item.delFlag == 0"
|
||||||
|
@click="onClickSwiper(item)"
|
||||||
|
>
|
||||||
<el-image
|
<el-image
|
||||||
style="width: 100%; height: 100%; cursor: pointer"
|
style="width: 100%; height: 100%; cursor: pointer"
|
||||||
:src="item.slidePicture"
|
:src="item.slidePicture"
|
||||||
fit="cover"
|
fit="cover"
|
||||||
@click="onClickSwiper(item)"
|
|
||||||
/>
|
/>
|
||||||
</el-carousel-item>
|
</el-carousel-item>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue