Browse Source

页面调整

shuhao 5 months ago
parent
commit
2f50c34257
1 changed files with 21 additions and 27 deletions
  1. 21 27
      src/components/fnHeader.vue

+ 21 - 27
src/components/fnHeader.vue

@@ -109,7 +109,6 @@ const getGardenList = () => {
         userId: userInfo.userId,
         show3dFarm: true,
         location: "113.746646,22.970229",
-        vip:1
     };
     console.log('userInfo', userInfo);
     if(userInfo.userName === "游客"){
@@ -117,33 +116,28 @@ const getGardenList = () => {
     }else if(userInfo.userName === "LBY"){
       options.value = [{name: "荔枝博览园",organId:766, wkt: "POINT(113.61702297075017 23.584863449735067)"}]
     }else{
-      VE_API.home.userGarden(params).then((res) => {
-        let resData = []
-        for(let item of res.data){
-          resData.push({name: item.name,organId:item.id, wkt: item.pointWkt})
-        }
-        options.value = resData
-        if(props.autoGo && userInfo.userName !== "13797066447"){
-          farmVal.value = resData[0].organId
-          toggleFarm(resData[0].organId)
+      if(userInfo.userName !== "13797066447"){
+        if(props.autoGo){
+          VE_API.home.userGarden(params).then((res) => {
+            let resData = []
+            for(let item of res.data){
+              resData.push({name: item.name,organId:item.id, wkt: item.pointWkt})
+            }
+            options.value = resData
+            farmVal.value = resData[0].organId
+            toggleFarm(resData[0].organId)
+          })
         }
-
-        // options.value = res.data;
-        // options.value.push(
-        //     {name: "增城荔博园第二基地",organId:90954, wkt: "POINT(113.691683 23.249201)"},
-        //     {name: "增城荔博园",organId:90953, wkt: "POINT(113.706556 23.211292)"},
-        //     {name: "天水苹果",organId:90888, wkt: "POINT(105.6235893046624 34.72308621489583)"},
-        //     {name: "汕尾妙荔果园",organId:43318, wkt: "POINT(115.455766 22.883073)"},
-        //     {name: "湛江湖畔荔庄",organId:90440, wkt: "POINT(110.907297 21.432212)"},
-        //     {name: "荔枝博览园",organId:766, wkt: "POINT(113.61702297075017 23.584863449735067)"},
-        //     {name: "柏桥村",organId:80865, wkt: "POINT(111.010804321 21.7759452836)"},
-        //     {name: "从化凤二基地",organId:90264, wkt: "POINT(113.67884027228604 23.511176408307904)"},
-        //     {name: "从化井岗基地",organId:90263, wkt: "POINT(113.5081595 23.5320866)"},
-        //     {name: "湛江荔枝先生",organId:26196, wkt: "POINT(110.4909544 21.4152538)"},
-        //     {name: "增城北园绿基地",organId:91774, wkt: "POINT(113.78320599711542 23.420720252709344)"},
-        //     {name: "中山农场",organId:81179, wkt: "POINT(113.544619 22.464267)"},
-        // );
-      });
+      }else{
+        params["vip"] = 1
+        VE_API.home.userGarden(params).then((res) => {
+          let resData = []
+          for(let item of res.data){
+            resData.push({name: item.name,organId:item.id, wkt: item.pointWkt})
+          }
+          options.value = resData
+        });
+      }
     }
 };