张涛 il y a 1 an
Parent
révision
4622374c43

+ 0
- 52
src/components/H5Map/index.jsx Voir le fichier

@@ -1,52 +0,0 @@
1
-import Taro from "@tarojs/taro";
2
-import { getLocation, h5GetLocation } from "@/utils/authorize";
3
-import React from "react";
4
-import { useEffect } from "react";
5
-export default (props) => {
6
-  const { location, onChange } = props;
7
-  useEffect(() => {
8
-    if (location) {
9
-      console.log(location)
10
-      const [lat, lng] = (location || DEFAULT_POS).split(",");
11
-   
12
-      const center = new TMap.LatLng(parseFloat(lat), parseFloat(lng));
13
-      new TMap.Map("container", {
14
-        rotation: 20, //设置地图旋转角度
15
-        pitch: 30, //设置俯仰角度(0~45)
16
-        zoom: 20, //设置地图缩放级别
17
-        center: center, //设置地图中心点坐标
18
-      });
19
-    }
20
-  }, [location]);
21
-
22
-  useEffect(() => {
23
-    fixedLocation().then((res) => {
24
-      console.log(res);
25
-      const {lat,lng   } = res.location;
26
-      onChange([lat,lng].join(","));
27
-    });
28
-  }, []);
29
-
30
-  const fixedLocation = () => {
31
-    return new Promise((resolve) => {
32
-      Taro.showLoading({
33
-        title: "加载中",
34
-      });
35
-      return h5GetLocation()
36
-        .then((res) => {
37
-          Taro.hideLoading();
38
-          resolve(res.data.result);
39
-        })
40
-        .catch((err) => {
41
-          console.error(err);
42
-          Taro.hideLoading();
43
-          Taro.showToast({
44
-            title: "定位失败",
45
-            icon: "none",
46
-          });
47
-        });
48
-    });
49
-  };
50
-
51
-  return <div id="container"></div>;
52
-};

+ 8
- 8
src/components/map/index.jsx Voir le fichier

@@ -15,14 +15,14 @@ export default (props) => {
15 15
 
16 16
   console.log("-----map---readOnly---", readOnly, location);
17 17
 
18
-  const id = React.useMemo(
19
-    () => `map-${Math.random().toString(36).substring(2, 10)}`,
20
-    []
21
-  );
22
-  const idReadOnly = React.useMemo(
23
-    () => `map-${Math.random().toString(36).substring(2, 10)}`,
24
-    []
25
-  );
18
+  // const id = React.useMemo(
19
+  //   () => `map-${Math.random().toString(36).substring(2, 10)}`,
20
+  //   []
21
+  // );
22
+  // const idReadOnly = React.useMemo(
23
+  //   () => `map-${Math.random().toString(36).substring(2, 10)}`,
24
+  //   []
25
+  // );
26 26
   const mapCtxRef = React.useRef();
27 27
 
28 28
   useEffect(() => {

+ 1
- 1
src/pages/apply/list/index.jsx Voir le fichier

@@ -71,7 +71,7 @@ export default (props) => {
71 71
         // onChange={(e) => setIssueId(e.detail)}
72 72
         placeholder="请输入问题单号"
73 73
         onSearch={onSearch}
74
-        clearable
74
+        // clearable
75 75
       />
76 76
       <Tabs sticky>
77 77
         <Tab title="督查员" style={tabStyle}>

+ 0
- 2
src/pages/issue/components/Issue/index.jsx Voir le fichier

@@ -13,7 +13,6 @@ import mapIcon from "@/assets/icons/marker.png";
13 13
 import { getTaOrgIssueByIssueId } from "@/services/taorgissue";
14 14
 import { PROCESS_END } from "@/utils/biz";
15 15
 import { geocoder } from "@/utils/map";
16
-import H5Map from "@/components/H5Map";
17 16
 import { ROLE_ORG_USER } from "@/utils/user";
18 17
 import IssueStatus from "./IssueStatus";
19 18
 
@@ -184,7 +183,6 @@ export default (props) => {
184 183
         onChange={onLocationChange}
185 184
       />
186 185
 
187
-      {/* <H5Map location={formData.location} onChange={onLocationChange} /> */}
188 186
 
189 187
       <CellGroup>
190 188
         {issue?.issueId && <Cell title="ID" value={issue.issueId} />}

+ 1
- 1
src/pages/issue/list/index.jsx Voir le fichier

@@ -72,7 +72,7 @@ export default (props) => {
72 72
       <Search
73 73
         placeholder="请输入问题单号"
74 74
         onSearch={onSearch}
75
-        clearable
75
+        // clearable
76 76
       />
77 77
       <Tabs sticky onChange={onTabChange}>
78 78
         <Tab title="全部" style={tabStyle}>

+ 1
- 1
src/pages/issue/list2/index.jsx Voir le fichier

@@ -57,7 +57,7 @@ export default (props) => {
57 57
         // onChange={(e) => setIssueId(e.detail)}
58 58
         placeholder="请输入问题单号"
59 59
         onSearch={onSearch}
60
-        clearable
60
+        // clearable
61 61
       />
62 62
       <Tabs sticky>
63 63
         <Tab title="督查员" style={tabStyle}>

+ 1
- 1
src/pages/org/issue/list/index.jsx Voir le fichier

@@ -61,7 +61,7 @@ export default (props) => {
61 61
         // onChange={(e) => setIssueId(e.detail)}
62 62
         placeholder="请输入问题单号"
63 63
         onSearch={onSearch}
64
-        clearable
64
+        // clearable
65 65
       />
66 66
       <Tabs sticky>
67 67
         <Tab title="督查员" style={tabStyle}>

+ 1
- 1
src/utils/authorize.js Voir le fichier

@@ -44,7 +44,7 @@ export const getLocation = async (options) => {
44 44
   //   reject(err_1);
45 45
   // }
46 46
 };
47
-const key = "6WQBZ-5VIC4-BZTUI-DIG64-R4XO3-PWBH3";
47
+const key = "HTPBZ-HHJA7-XD2XD-PRS37-H3HVJ-U5BAA";
48 48
 export const h5GetLocation = () => {
49 49
   return new Promise((resolve, reject) => {
50 50
     const url = `/api2/ws/location/v1/ip?key=${key}`;