Parcourir la source

feat: 解决search 过滤

gemercheung il y a 10 mois
Parent
commit
a50afe1426
1 fichiers modifiés avec 6 ajouts et 5 suppressions
  1. 6 5
      src/app/map/App.vue

+ 6 - 5
src/app/map/App.vue

@@ -48,7 +48,10 @@
   <div ref="mapEl" class="map-container" v-show="currentType(0)"></div>
   <div class="card-container" v-show="currentType(1)">
     <div class="card-list">
-      <template v-for="item of list" v-if="list.length > 0">
+      <template
+        v-for="item of keywordSearch ? searchList : list"
+        v-if="keywordSearch ? searchList.length > 0 : list.length > 0"
+      >
         <el-card
           class="card"
           shadow="hover"
@@ -162,10 +165,9 @@ const request = axios.create({
 });
 const mapEl = ref<HTMLDivElement>();
 let AMap, map;
+const domain = location.protocol + "//" + location.host;
 
-const queryURL = `${
-  import.meta.env.VITE_SEVER_URL
-}/fusion/web/fireProject/queryProject`;
+const queryURL = `${domain}/api/fusion/web/fireProject/queryProject`;
 
 axios.get(getSysSetting).then((data) => {
   const { themeColour } = data.data;
@@ -213,7 +215,6 @@ watch(
   }
 );
 
-
 const initMakers = async () => {
   const data = (await getDataQuest()) as any as any[];
   const positions: any[] = [];