|
@@ -17,6 +17,7 @@ import useZPaging from 'z-paging/components/z-paging/js/hooks/useZPaging.js'
|
|
|
|
|
|
import { bannerList } from '@/api/common'
|
|
import { bannerList } from '@/api/common'
|
|
import { getList } from '@/api/product'
|
|
import { getList } from '@/api/product'
|
|
|
|
+import { parseQs } from '@/utils'
|
|
import { toPage } from '@/utils/page'
|
|
import { toPage } from '@/utils/page'
|
|
|
|
|
|
defineOptions({
|
|
defineOptions({
|
|
@@ -36,7 +37,14 @@ useZPaging(paging)
|
|
const current = ref<number>(0)
|
|
const current = ref<number>(0)
|
|
const swiperList = ref([])
|
|
const swiperList = ref([])
|
|
function handleSwiperClick(e: any) {
|
|
function handleSwiperClick(e: any) {
|
|
- console.log(e)
|
|
|
|
|
|
+ if (e.item.linkType === 0) {
|
|
|
|
+ const url = e.item.link.split('?')[0]
|
|
|
|
+ const params = parseQs(e.item.link.split('?')[1] || '')
|
|
|
|
+ toPage(url, params)
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
|
|
+ toPage('/pages/webLink/webLink', { title: e.item.title, link: e.item.link })
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
// 导航图标
|
|
// 导航图标
|