Ver código fonte

fix: 附近农资

lxf 1 semana atrás
pai
commit
475df7b0fd

+ 4 - 0
src/api/modules/z_agricultural_store.js

@@ -30,4 +30,8 @@ module.exports = {
         url: url + "_farm" + "/list",
         type: "get",
     },
+    getStoreItem: {
+        url: url + "_farm" + "/get_agricultural_store_by_farm_id",
+        type: "get",
+    },
 }

+ 3 - 7
src/views/old_mini/album_recognize/index.vue

@@ -122,14 +122,10 @@ const toConsult = async () => {
 
 async function getNearStore() {
     const params = {
-        point: localStorage.getItem('MINI_USER_LOCATION_POINT'),
-        page: 1,
-        limit: 1,
+        farmId: currentFarmId,
     };
-    const res = await VE_API.farm.getStoreList(params);
-    if(res.data.length > 0){
-        return res.data[0].miniUserIds[0];
-    }
+    const {data} = await VE_API.z_agricultural_store.getStoreItem(params);
+    return data.miniUserId;
 }
 </script>