瀏覽代碼

fix: 附近农资

lxf 1 周之前
父節點
當前提交
475df7b0fd
共有 2 個文件被更改,包括 7 次插入7 次删除
  1. 4 0
      src/api/modules/z_agricultural_store.js
  2. 3 7
      src/views/old_mini/album_recognize/index.vue

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

@@ -30,4 +30,8 @@ module.exports = {
         url: url + "_farm" + "/list",
         url: url + "_farm" + "/list",
         type: "get",
         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() {
 async function getNearStore() {
     const params = {
     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>
 </script>