ifcheng 2 年 前
コミット
5659c71fd9
2 ファイル変更10 行追加12 行削除
  1. 5 7
      src/pages/repaire/index.scss
  2. 5 5
      src/pages/repaire/steps/StepOne.vue

+ 5 - 7
src/pages/repaire/index.scss

@@ -83,13 +83,11 @@
       font-size: 40px;
       font-weight: 600;
       color: #1a1a1a;
-      span {
-        &:last-child {
-          margin-left: 32px;
-          font-size: 24px;
-          font-weight: 400;
-          color: #999;
-        }
+      .distance {
+        margin-left: 32px;
+        font-size: 24px;
+        font-weight: 400;
+        color: #999;
       }
     }
     &-address {

+ 5 - 5
src/pages/repaire/steps/StepOne.vue

@@ -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() {