소스 검색

Merge branch 'dev1.0' of http://git.ycjcjy.com/civilized_city/miniapp into dev1.0

张涛 2 년 전
부모
커밋
91ca6f4d5c
2개의 변경된 파일10개의 추가작업 그리고 5개의 파일을 삭제
  1. 8
    4
      src/components/map/index.jsx
  2. 2
    1
      src/pages/check/edit/index.jsx

+ 8
- 4
src/components/map/index.jsx 파일 보기

@@ -26,7 +26,7 @@ export default (props) => {
26 26
     // eslint-disable-next-line no-undef
27 27
     const loc = location || DEFAULT_POS;
28 28
     const [longitude, latitude] = loc.split(',');
29
-    
29
+
30 30
     const mks = readOnly ? [{
31 31
       id: 1,
32 32
       longitude,
@@ -35,8 +35,8 @@ export default (props) => {
35 35
       width: 17,
36 36
       height: 20
37 37
     }] : [];
38
-    
39
-  console.log('-----mks---', mks);
38
+
39
+    console.log('-----mks---', mks);
40 40
 
41 41
     return [
42 42
       mks,
@@ -87,9 +87,12 @@ export default (props) => {
87 87
     if (mapCtxRef.current) {
88 88
       fixedLocation().then((res) => {
89 89
         const { longitude, latitude } = res;
90
+        // console.log('longitude', longitude);
91
+        // console.log('latitude', latitude);
90 92
         onChange([res.longitude, res.latitude].join(','));
91 93
         moveTo(mapCtxRef.current, { longitude, latitude });
92 94
       })
95
+
93 96
     }
94 97
   }
95 98
 
@@ -103,9 +106,10 @@ export default (props) => {
103 106
         onChange([longitude, latitude].join(','));
104 107
       })
105 108
     }
106
-  // eslint-disable-next-line react-hooks/exhaustive-deps
109
+    // eslint-disable-next-line react-hooks/exhaustive-deps
107 110
   }, [readOnly, getContext]);
108 111
 
112
+  console.log('-----方---》', center);
109 113
   return (
110 114
     <View className={style['map-wrapper']}>
111 115
       {

+ 2
- 1
src/pages/check/edit/index.jsx 파일 보기

@@ -46,7 +46,8 @@ export default (props) => {
46 46
         try {
47 47
           warn(typ == 'survey' && !answer?.communityName, '请填写社区名称');
48 48
           warn(!answer?.addr, typ == 'loc' ? '请填写地址' : '请填写小区名称');
49
-          warn(!answer?.location, '未能获取定位信息, 请重试');
49
+          // warn(!answer?.location, '未能获取定位信息, 请重试');
50
+          console.log('!answer?.location', !answer?.location);
50 51
           warn(typ == 'survey' && !answer?.sex, '请选择性别');
51 52
           warn(typ == 'survey' && !answer?.age, '请选择年龄段');
52 53
         } catch (error) {