fangmingyue 2 lat temu
rodzic
commit
703f61b424

+ 45
- 14
project.config.json Wyświetl plik

@@ -1,15 +1,46 @@
1 1
 {
2
-  "miniprogramRoot": "./dist",
3
-  "projectname": "文明霍山",
4
-  "description": "文明城市小程序",
5
-  "appid": "wx39d721c54a0a11c4",
6
-  "setting": {
7
-    "urlCheck": true,
8
-    "es6": false,
9
-    "enhance": false,
10
-    "compileHotReLoad": false,
11
-    "postcss": false,
12
-    "minified": false
13
-  },
14
-  "compileType": "miniprogram"
15
-}
2
+    "miniprogramRoot": "dist/",
3
+    "projectname": "%E6%96%87%E6%98%8E%E9%9C%8D%E5%B1%B1",
4
+    "description": "文明城市小程序",
5
+    "appid": "wx39d721c54a0a11c4",
6
+    "setting": {
7
+        "urlCheck": true,
8
+        "es6": false,
9
+        "enhance": false,
10
+        "postcss": false,
11
+        "preloadBackgroundData": false,
12
+        "minified": false,
13
+        "newFeature": false,
14
+        "coverView": true,
15
+        "nodeModules": false,
16
+        "autoAudits": false,
17
+        "showShadowRootInWxmlPanel": true,
18
+        "scopeDataCheck": false,
19
+        "uglifyFileName": false,
20
+        "checkInvalidKey": true,
21
+        "checkSiteMap": true,
22
+        "uploadWithSourceMap": true,
23
+        "compileHotReLoad": false,
24
+        "lazyloadPlaceholderEnable": false,
25
+        "useMultiFrameRuntime": true,
26
+        "useApiHook": true,
27
+        "useApiHostProcess": true,
28
+        "babelSetting": {
29
+            "ignore": [],
30
+            "disablePlugins": [],
31
+            "outputPath": ""
32
+        },
33
+        "enableEngineNative": false,
34
+        "useIsolateContext": true,
35
+        "userConfirmedBundleSwitch": false,
36
+        "packNpmManually": false,
37
+        "packNpmRelationList": [],
38
+        "minifyWXSS": true,
39
+        "disableUseStrict": false,
40
+        "showES6CompileOption": false,
41
+        "useCompilerPlugins": false,
42
+        "minifyWXML": true
43
+    },
44
+    "compileType": "miniprogram",
45
+    "condition": {}
46
+}

BIN
src/assets/icons/position.png Wyświetl plik


+ 8
- 6
src/components/map/index.jsx Wyświetl plik

@@ -1,7 +1,7 @@
1 1
 import React from 'react';
2 2
 import Taro from '@tarojs/taro';
3
-import { View, Map, CoverView } from '@tarojs/components';
4
-import { Icon } from '@antmjs/vantui'
3
+import { View, Map } from '@tarojs/components';
4
+import { Icon } from '@antmjs/vantui';
5 5
 import { getLocation } from '@/utils/authorize';
6 6
 import iconPath from '@/assets/icons/marker.png';
7 7
 import style from './style.module.less';
@@ -79,6 +79,8 @@ export default (props) => {
79 79
     }
80 80
   }
81 81
 
82
+  console.log('mapCtxRef', mapCtxRef);
83
+
82 84
   React.useEffect(() => {
83 85
     if (!readOnly) {
84 86
       fixedLocation().then((res) => {
@@ -102,11 +104,11 @@ export default (props) => {
102 104
       // markers={markers}
103 105
       >
104 106
         {!readOnly && (
105
-          <CoverView className={style['control']} onClick={onRefresh}>
106
-            <Icon name="aim" size="24px" color="#1A7565" />
107
-          </CoverView>
107
+          <>
108
+            <Icon name="aim" size="24px" onClick={onRefresh} color="#1A7565" className={style['icon']} />
109
+          </>
108 110
         )}
109 111
       </Map>
110
-    </View>
112
+    </View >
111 113
   )
112 114
 }

+ 4
- 2
src/components/map/style.module.less Wyświetl plik

@@ -10,10 +10,12 @@
10 10
     position: absolute;
11 11
     top: 0;
12 12
     left: 0;
13
-    .control {
13
+    z-index: 2;
14
+    .icon {
14 15
       position: absolute;
15
-      bottom: var(--main-space);
16
+      bottom: 45px;
16 17
       right: var(--main-space);
18
+      z-index: 3;
17 19
     }
18 20
   }
19 21
 }

+ 13
- 5
src/pages/check/edit/components/LocForm.jsx Wyświetl plik

@@ -4,6 +4,7 @@ import { View, CoverView } from '@tarojs/components';
4 4
 import { CellGroup, Cell, Field, RadioGroup, Radio, Icon } from '@antmjs/vantui';
5 5
 import Map from '@/components/map';
6 6
 import { getTaCheckItemAnswer } from '@/services/tacheckitem';
7
+import { getTaCheckAnswer } from '@/services/tacheckanswer';
7 8
 import mapIcon from '@/assets/icons/marker.png';
8 9
 import AgePicker from './AgePicker';
9 10
 
@@ -11,6 +12,7 @@ export default (props) => {
11 12
   const { checkItemInfo, checkType, answer, readonly, onChange, onLoadingChange } = props;
12 13
 
13 14
   const [showAgePicker, setShowAgePicker] = React.useState(false);
15
+  const [count, setCount] = React.useState();
14 16
 
15 17
   const setLoading = (v) => {
16 18
     if (onLoadingChange) {
@@ -25,6 +27,12 @@ export default (props) => {
25 27
     })
26 28
   }
27 29
 
30
+  React.useEffect(() => {
31
+    getTaCheckAnswer().then((res) => {
32
+      setCount(res.total);
33
+    })
34
+  })
35
+
28 36
   // // 获取答题主记录信息
29 37
   // React.useEffect(() => {
30 38
   //   if (checkItemInfo?.itemId) {
@@ -109,11 +117,11 @@ export default (props) => {
109 117
         )
110 118
       }
111 119
       <CellGroup style={{ marginTop: '20px' }}>
112
-        <Field
113
-          value="您已完成X份"
114
-          inputAlign="center"
115
-          readonly
116
-        />
120
+        <Cell>
121
+          <View style={{ textAlign: 'center', color: '#000' }}>
122
+            您已完成{count}份
123
+          </View>
124
+        </Cell>
117 125
       </CellGroup>
118 126
     </View >
119 127
   )

+ 3
- 2
src/pages/issue/components/Issue/index.jsx Wyświetl plik

@@ -111,6 +111,7 @@ export default (props) => {
111 111
     }
112 112
   }, [issue]);
113 113
 
114
+  // console.log('showIssueType', showIssueType)
114 115
   return (
115 116
     <View>
116 117
       <LocType
@@ -194,7 +195,7 @@ export default (props) => {
194 195
         />
195 196
       </CellGroup>
196 197
 
197
-      <CellGroup style={{marginTop: '20px'}}>        
198
+      <CellGroup style={{ marginTop: '20px' }}>
198 199
         <Cell title="拍照或视频" border={false} />
199 200
 
200 201
         <Cell
@@ -202,7 +203,7 @@ export default (props) => {
202 203
             <Uploader
203 204
               value={formData.attachList}
204 205
               disabled={readOnly}
205
-              onChange={e => setFieldChange('attachList',e)}
206
+              onChange={e => setFieldChange('attachList', e)}
206 207
             />
207 208
           }
208 209
         />

+ 6
- 0
src/services/tacheckanswer.js Wyświetl plik

@@ -0,0 +1,6 @@
1
+import request from '@/utils/request';
2
+
3
+/*
4
+ * 分页查询
5
+ */
6
+export const getTaCheckAnswer = (params) => request('/api/taCheckAnswer', { params });