浏览代码

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

+ 2
- 1
src/pages/check/edit/index.jsx 查看文件

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