|
|
@ -159,7 +159,7 @@ const store = useStore() |
|
|
const { indexList, currentFloor, buildingList, shopList, sidebarList, config, theme } = storeToRefs(store) |
|
|
const { indexList, currentFloor, buildingList, shopList, sidebarList, config, theme } = storeToRefs(store) |
|
|
const guideDesc = ref('') |
|
|
const guideDesc = ref('') |
|
|
const foodList = computed(() => { |
|
|
const foodList = computed(() => { |
|
|
const arr = shopList.value.filter(({ isSpecial, yaxis }) => isSpecial && yaxis) |
|
|
|
|
|
|
|
|
const arr = shopList.value.filter(({ isSpecial }) => isSpecial) |
|
|
if (arr.length > 12) { |
|
|
if (arr.length > 12) { |
|
|
while (arr.length % 4 !== 0) { |
|
|
while (arr.length % 4 !== 0) { |
|
|
arr.push(arr[Math.floor(Math.random() * arr.length)]) |
|
|
arr.push(arr[Math.floor(Math.random() * arr.length)]) |
|
|
@ -169,7 +169,7 @@ const foodList = computed(() => { |
|
|
}) |
|
|
}) |
|
|
const hotRecommend = computed(() => indexList?.value?.hotSearch?.slice(0, 5) ?? []) |
|
|
const hotRecommend = computed(() => indexList?.value?.hotSearch?.slice(0, 5) ?? []) |
|
|
const recommendShops = computed(() => { |
|
|
const recommendShops = computed(() => { |
|
|
const arr = indexList?.value?.recommendList.filter(({ yaxis }) => !!yaxis) |
|
|
|
|
|
|
|
|
const arr = indexList?.value?.recommendList |
|
|
if (arr.length > 12) { |
|
|
if (arr.length > 12) { |
|
|
while (arr.length % 4 !== 0) { |
|
|
while (arr.length % 4 !== 0) { |
|
|
arr.push(arr[Math.floor(Math.random() * arr.length)]) |
|
|
arr.push(arr[Math.floor(Math.random() * arr.length)]) |
|
|
|