|
@@ -16,7 +16,6 @@ import { onPageScroll, onReachBottom } from '@dcloudio/uni-app'
|
|
|
import useZPaging from 'z-paging/components/z-paging/js/hooks/useZPaging.js'
|
|
|
import { bannerList, noticeUnread } from '@/api/common'
|
|
|
import { getList } from '@/api/product'
|
|
|
-import { parseQs } from '@/utils'
|
|
|
import { toPage } from '@/utils/page'
|
|
|
|
|
|
defineOptions({
|
|
@@ -37,12 +36,10 @@ const current = ref<number>(0)
|
|
|
const swiperList = ref([])
|
|
|
function handleSwiperClick(e: any) {
|
|
|
if (e.item.linkType === 0) {
|
|
|
- const url = e.item.link.split('?')[0]
|
|
|
- const params = parseQs(e.item.link.split('?')[1] || '')
|
|
|
- toPage(url, params)
|
|
|
+ toPage({ url: e.item.link })
|
|
|
}
|
|
|
else {
|
|
|
- toPage('/pages/webLink/webLink', { title: e.item.title, link: e.item.link })
|
|
|
+ toPage({ url: '/pages/webLink/webLink', params: { title: e.item.title, link: e.item.link } })
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -203,14 +200,14 @@ onLoad(async () => {
|
|
|
<image
|
|
|
src="/static/icons/search.png"
|
|
|
class="mr-20rpx h-40rpx w-40rpx"
|
|
|
- @click="toPage('/pages/search/search')"
|
|
|
+ @click="toPage({ url: '/pages/search/search' })"
|
|
|
/>
|
|
|
</wd-badge>
|
|
|
<wd-badge :model-value="unread" :max="99">
|
|
|
<image
|
|
|
src="/static/icons/notifications.png"
|
|
|
class="h-40rpx w-40rpx"
|
|
|
- @click="toPage('/pages/notifications/notifications')"
|
|
|
+ @click="toPage({ url: '/pages/notifications/notifications' })"
|
|
|
/>
|
|
|
</wd-badge>
|
|
|
</view>
|
|
@@ -315,7 +312,7 @@ onLoad(async () => {
|
|
|
v-for="(item, index) in navIcons"
|
|
|
:key="index"
|
|
|
class="flex flex-col items-center"
|
|
|
- @click="toPage(item.url)"
|
|
|
+ @click="toPage({ url: item.url })"
|
|
|
>
|
|
|
<image :src="item.image" :style="`width: ${item.size}; height: ${item.size};`" />
|
|
|
<view class="mt-14rpx whitespace-pre-line text-center text-22rpx text-#898989 font-bold">
|
|
@@ -335,7 +332,7 @@ onLoad(async () => {
|
|
|
:title-font-size="18"
|
|
|
:item="item"
|
|
|
class="shrink-0"
|
|
|
- @item-click="toPage('/pages/productDetail/productDetail', { productId: item.productId })"
|
|
|
+ @item-click="toPage({ url: '/pages/productDetail/productDetail', params: { productId: item.productId } })"
|
|
|
/>
|
|
|
</view>
|
|
|
</scroll-view>
|
|
@@ -370,7 +367,7 @@ onLoad(async () => {
|
|
|
width="100%"
|
|
|
:height="340"
|
|
|
:item="item"
|
|
|
- @item-click="toPage('/pages/productDetail/productDetail', { productId: item.productId })"
|
|
|
+ @item-click="toPage({ url: '/pages/productDetail/productDetail', params: { productId: item.productId } })"
|
|
|
/>
|
|
|
</view>
|
|
|
</view>
|