|
|
|
@ -31,9 +31,17 @@ |
|
|
|
</li> |
|
|
|
</ul> |
|
|
|
<!-- 店铺 --> |
|
|
|
<scroll-view ref="shopScroll" :scrollbar="true" class="shop-scroll" :list="copyShopList" :pull-up="false"> |
|
|
|
<scroll-view |
|
|
|
ref="shopScroll" |
|
|
|
:scrollbar="true" |
|
|
|
class="shop-scroll" |
|
|
|
:list="pageList[0]?.shopList" |
|
|
|
pull-up |
|
|
|
:scroll-top="false" |
|
|
|
@scroll-end="myScrollEnd" |
|
|
|
> |
|
|
|
<ul class="shop-group"> |
|
|
|
<shopItem v-for="shop in copyShopList" :key="shop.shopCode" :shop="shop" @click="clickShop(shop)" /> |
|
|
|
<shopItem v-for="shop in pageList[0]?.shopList" :key="shop.shopCode" :shop="shop" @click="clickShop(shop)" /> |
|
|
|
</ul> |
|
|
|
</scroll-view> |
|
|
|
</div> |
|
|
|
@ -45,6 +53,7 @@ import typeBtnGroup from '@/components/TypeBtnList/TypeBtnList.vue' |
|
|
|
import scrollView from '@/base/ScrollView/ScrollView.vue' |
|
|
|
import { getBrandInfo } from '@/http/api/brand/index' |
|
|
|
import { ref, computed, shallowRef } from 'vue' |
|
|
|
import { usePage } from '@/composables/usePage' |
|
|
|
|
|
|
|
import { storeToRefs } from 'pinia' |
|
|
|
import { useRootStore } from '@/store/root' |
|
|
|
@ -69,11 +78,12 @@ const formatZMList = computed(() => { |
|
|
|
const formatList = ref<Industry[]>([]) |
|
|
|
const zmList = ref<Industry[]>([]) |
|
|
|
const letters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' |
|
|
|
|
|
|
|
const floorIdx = ref(-1) |
|
|
|
const floorList = ref<FloorItem[]>([]) |
|
|
|
|
|
|
|
const copyShopList = shallowRef<Shop[]>([]) |
|
|
|
const copyShopList = shallowRef<any>([]) |
|
|
|
const myscroll = shallowRef(null) |
|
|
|
const { scrollEnd, pageList } = usePage(copyShopList, myscroll) |
|
|
|
|
|
|
|
const typeBtnList = [ |
|
|
|
{ |
|
|
|
@ -149,10 +159,10 @@ function handleClickFloor(item: FloorItem, index: number) { |
|
|
|
resetIdx() |
|
|
|
floorIdx.value = index |
|
|
|
if (index === 0) { |
|
|
|
copyShopList.value = [...shopList.value] |
|
|
|
copyShopList.value = [{ name: '1', shopList: [...shopList.value] }] |
|
|
|
return |
|
|
|
} |
|
|
|
copyShopList.value = shopList.value.filter(shop => shop.floor === item.floor) |
|
|
|
copyShopList.value = [{ name: '1', shopList: shopList.value.filter(shop => shop.floor === item.floor) }] |
|
|
|
} |
|
|
|
//点击业态和字母 |
|
|
|
function handleClickFormat(item: Industry, index: number) { |
|
|
|
@ -163,17 +173,22 @@ function handleClickFormat(item: Industry, index: number) { |
|
|
|
return |
|
|
|
} |
|
|
|
if (currentTypeId.value === 0) { |
|
|
|
copyShopList.value = shopList.value.filter(shop => shop.industryFatherCode === item.industryCode) |
|
|
|
copyShopList.value = [{ name: '1', shopList: shopList.value.filter(shop => shop.industryFatherCode === item.industryCode) }] |
|
|
|
useStatistics({ tag: 'industry', industryCode: item.industryCode }) |
|
|
|
} else { |
|
|
|
copyShopList.value = shopList.value.filter(shop => shop.initials?.charAt(0) === item.industryName) |
|
|
|
copyShopList.value = [{ name: '1', shopList: shopList.value.filter(shop => shop.initials?.charAt(0) === item.industryName) }] |
|
|
|
} |
|
|
|
} |
|
|
|
//点击品牌 |
|
|
|
function clickShop(item: Shop) { |
|
|
|
function clickShop(item: any) { |
|
|
|
store.SET_SHOP(item) |
|
|
|
store.SET_SHOW_DETAIL(true) |
|
|
|
} |
|
|
|
|
|
|
|
// 分页到底部 |
|
|
|
function myScrollEnd() { |
|
|
|
scrollEnd() |
|
|
|
} |
|
|
|
</script> |
|
|
|
|
|
|
|
<style scoped lang="scss"> |
|
|
|
@ -240,7 +255,7 @@ function clickShop(item: Shop) { |
|
|
|
position: absolute; |
|
|
|
top: 319px; |
|
|
|
left: 124px; |
|
|
|
width: 144px; |
|
|
|
width: 80px; |
|
|
|
font-size: 24px; |
|
|
|
font-family: 'font_bold'; |
|
|
|
text-align: center; |
|
|
|
|