|
@@ -44,7 +44,7 @@
|
|
|
>
|
|
|
<div class="shop-name">
|
|
|
<span>{{ item.name }}</span>
|
|
|
- <!-- <span>3.5KM</span> -->
|
|
|
+ <!-- <span class="distance">3.5KM</span> -->
|
|
|
</div>
|
|
|
<div class="shop-address">
|
|
|
{{ item.centre_name }},{{ item.address }}
|
|
@@ -91,16 +91,16 @@ async function fetchData() {
|
|
|
const res = await getLocation({ timeout: 2000 })
|
|
|
coords = res?.coords
|
|
|
}
|
|
|
- const { results, pageBean } = await getShopList({
|
|
|
+ const { results } = await getShopList({
|
|
|
page: pageNo,
|
|
|
size: 10,
|
|
|
lat: coords?.latitude,
|
|
|
lng: coords?.longitude,
|
|
|
post_code: postCode,
|
|
|
})
|
|
|
- list.value.push(...results)
|
|
|
+ list.value.push(...results.items)
|
|
|
pageNo++
|
|
|
- hasMore.value = list.value.length === pageBean.totalCount
|
|
|
+ hasMore.value = list.value.length < results.pageBean.totalCount
|
|
|
} catch {}
|
|
|
loading.value = false
|
|
|
}
|
|
@@ -116,7 +116,7 @@ const autocomplete = debounce(async () => {
|
|
|
size: 10,
|
|
|
post_code: value,
|
|
|
})
|
|
|
- suggestions.value = results
|
|
|
+ suggestions.value = results.items
|
|
|
}, 300)
|
|
|
|
|
|
function handleSearch() {
|