Browse Source

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

Yansen 2 years ago
parent
commit
da55a3af51

+ 2
- 2
config/dev.js View File

@@ -3,8 +3,8 @@ module.exports = {
3 3
     NODE_ENV: '"development"',
4 4
   },
5 5
   defineConstants: {
6
-    HOST: '"http://127.0.0.1:9087"',
7
-    // HOST: '"http://192.168.89.147:9087"',
6
+    // HOST: '"http://127.0.0.1:9087"',
7
+    HOST: '"http://192.168.89.25:9087"',
8 8
     AD_IMAGE: '"https://h5.njyunzhi.com/images/citizen_banner.png"',
9 9
     DEFAULT_POS: '"116.3476917447715,31.409912844296578"', // 霍山县人民政府 gcj02
10 10
     VERSION: '"1.1.13-20230325"',

+ 30
- 14
project.config.json View File

@@ -1,15 +1,31 @@
1 1
 {
2
-  "miniprogramRoot": "./dist",
3
-  "projectname": "civilized-miniapp",
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": "civilized-miniapp",
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
+        "babelSetting": {
14
+            "ignore": [],
15
+            "disablePlugins": [],
16
+            "outputPath": ""
17
+        }
18
+    },
19
+    "compileType": "miniprogram",
20
+    "libVersion": "2.31.1",
21
+    "srcMiniprogramRoot": "dist/",
22
+    "packOptions": {
23
+        "ignore": [],
24
+        "include": []
25
+    },
26
+    "condition": {},
27
+    "editorSetting": {
28
+        "tabIndent": "insertSpaces",
29
+        "tabSize": 4
30
+    }
31
+}

+ 21
- 0
project.private.config.json View File

@@ -0,0 +1,21 @@
1
+{
2
+    "description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
3
+    "projectname": "civilized-miniapp",
4
+    "setting": {
5
+        "compileHotReLoad": true,
6
+        "urlCheck": false
7
+    },
8
+    "condition": {
9
+        "miniprogram": {
10
+            "list": [
11
+                {
12
+                    "name": "实地测评页",
13
+                    "pathName": "pages/check/edit/index",
14
+                    "query": "id=99950350437476864&typ=loc",
15
+                    "launchMode": "default",
16
+                    "scene": null
17
+                }
18
+            ]
19
+        }
20
+    }
21
+}

+ 1
- 0
src/app.config.js View File

@@ -28,6 +28,7 @@ export default defineAppConfig({
28 28
     "pages/feedback/issuelist/index",
29 29
     "pages/user/list/index",
30 30
     "pages/user/add/index",
31
+    // "pages/reportList/index",
31 32
   ],
32 33
   subpackages: [
33 34
     {

+ 1
- 1
src/components/PowerList/index.jsx View File

@@ -9,7 +9,7 @@ import { throttle } from "@/utils/tools";
9 9
 export default React.forwardRef((props, ref) => {
10 10
   const { sid, request, params, renderItem, onLoadingChange, onDataChange } = props;
11 11
 
12
-  const pageSize = React.useMemo(() => params.pageSize || 5, [params]);
12
+  const pageSize = React.useMemo(() => params?.pageSize || 5, [params]);
13 13
   const pageShowRef = React.useRef(true);
14 14
   const [loading, setLoading] = React.useState(false);
15 15
   const [list, setList] = React.useState([]);

+ 102
- 89
src/pages/check/edit/components/LocForm.jsx View File

@@ -1,16 +1,31 @@
1
-import React from 'react';
2
-import Taro from '@tarojs/taro';
3
-import { View, CoverView } from '@tarojs/components';
4
-import { CellGroup, Cell, Field, RadioGroup, Radio, Icon, Loading } from '@antmjs/vantui';
5
-import Map from '@/components/map';
6
-import { getTaCheckItemAnswer } from '@/services/tacheckitem';
7
-import { getTaCheckAnswer } from '@/services/tacheckanswer';
8
-import { geocoder } from '@/utils/map';
9
-import mapIcon from '@/assets/icons/marker.png';
10
-import AgePicker from './AgePicker';
1
+import React from "react";
2
+import Taro from "@tarojs/taro";
3
+import { View, CoverView } from "@tarojs/components";
4
+import {
5
+  CellGroup,
6
+  Cell,
7
+  Field,
8
+  RadioGroup,
9
+  Radio,
10
+  Icon,
11
+  Loading,
12
+} from "@antmjs/vantui";
13
+import Map from "@/components/map";
14
+import { getTaCheckItemAnswer } from "@/services/tacheckitem";
15
+import { getTaCheckAnswer } from "@/services/tacheckanswer";
16
+import { geocoder } from "@/utils/map";
17
+import mapIcon from "@/assets/icons/marker.png";
18
+import AgePicker from "./AgePicker";
11 19
 
12 20
 export default (props) => {
13
-  const { checkItemInfo, checkType, answer, readonly, onChange, onLoadingChange } = props;
21
+  const {
22
+    checkItemInfo,
23
+    checkType,
24
+    answer,
25
+    readonly,
26
+    onChange,
27
+    onLoadingChange,
28
+  } = props;
14 29
 
15 30
   const [showAgePicker, setShowAgePicker] = React.useState(false);
16 31
   const answerRef = React.useRef();
@@ -18,28 +33,35 @@ export default (props) => {
18 33
 
19 34
   const setLoading = (v) => {
20 35
     if (onLoadingChange) {
21
-      onLoadingChange(v)
36
+      onLoadingChange(v);
22 37
     }
23
-  }
38
+  };
24 39
 
25 40
   const setFieldChange = (key, val) => {
26 41
     const newAnswer = {
27
-      ...answerRef.current || {},
42
+      ...(answerRef.current || {}),
28 43
       [key]: val,
29
-    }
44
+    };
30 45
 
31 46
     answerRef.current = newAnswer;
32 47
     onChange(newAnswer);
33
-  }
48
+  };
34 49
 
35 50
   const onLocationChange = (loc) => {
36
-    setFieldChange('location', loc);
37
-    
38
-    if (checkType == 'loc' && loc) {
51
+    setFieldChange("location", loc);
52
+
53
+    if (checkType == "loc" && loc) {
39 54
       // 交换经纬度位置
40
-      const [x, y] = loc.split(',');
41
-      const reLoc = [y, x].join(',');
42
-      geocoder(reLoc).then(e => setFieldChange('addr', e?.address_component?.street_number || e?.address)).catch(console.error)
55
+      const [x, y] = loc.split(",");
56
+      const reLoc = [y, x].join(",");
57
+      geocoder(reLoc)
58
+        .then((e) =>
59
+          setFieldChange(
60
+            "addr",
61
+            e?.address_component?.street_number || e?.address
62
+          )
63
+        )
64
+        .catch(console.error);
43 65
     }
44 66
   };
45 67
 
@@ -54,77 +76,68 @@ export default (props) => {
54 76
         <Loading type="spinner" vertical />
55 77
       </View> */}
56 78
       <CellGroup>
57
-        {
58
-          checkType == 'loc' && (
59
-            <Cell
60
-              title="点位"
61
-              value={checkItemInfo?.name}
62
-            />
63
-          )
64
-        }
65
-        {
66
-          checkType == 'survey' && (
67
-            <Field
68
-              key="01"
69
-              label="社区"
70
-              placeholder="请填写社区名称"
71
-              readonly={readonly}
72
-              value={answer?.communityName}
73
-              onChange={e => setFieldChange('communityName', e.detail)}
74
-            />
75
-          )
76
-        }
79
+        {checkType == "loc" && (
80
+          <Cell title="点位" value={checkItemInfo?.name} />
81
+        )}
82
+        {checkType == "survey" && <Cell title="文明用语" value={checkItemInfo?.cultureTerm} />}
83
+        {checkType == "survey" && (
84
+          <Field
85
+            key="01"
86
+            label="社区"
87
+            placeholder="请填写社区名称"
88
+            readonly={readonly}
89
+            value={answer?.communityName}
90
+            onChange={(e) => setFieldChange("communityName", e.detail)}
91
+          />
92
+        )}
77 93
         <Field
78 94
           key="02"
79 95
           readonly={readonly}
80
-          label={checkType == 'loc' ? '地址' : '小区'}
81
-          placeholder={checkType == 'loc' ? '请输入地址' : '请填写小区名称'}
96
+          label={checkType == "loc" ? "地址" : "小区"}
97
+          placeholder={checkType == "loc" ? "请输入地址" : "请填写小区名称"}
82 98
           value={answer?.addr}
83
-          onChange={e => setFieldChange('addr', e.detail)}
99
+          onChange={(e) => setFieldChange("addr", e.detail)}
84 100
         />
85 101
       </CellGroup>
86
-      {
87
-        checkType == 'survey' && (
88
-          <CellGroup style={{ marginTop: '20px' }}>
89
-            <Cell title="性别">
90
-              <View style={{ textAlign: 'right' }}>
91
-                <RadioGroup
92
-                  disabled={readonly}
93
-                  direction="horizontal"
94
-                  value={answer?.sex}
95
-                  style={{ display: 'inline-flex' }}
96
-                  onChange={(e) => setFieldChange('sex', e.detail)}
97
-                >
98
-                  <Radio name="1" checkedColor="var(--main-bg-color)">男</Radio>
99
-                  <Radio name="2" checkedColor="red">女</Radio>
100
-                </RadioGroup>
101
-              </View>
102
-            </Cell>
103
-            <Cell
104
-              title="年龄"
105
-              isLink
106
-              value={answer?.age}
107
-              onClick={() => !readonly && setShowAgePicker(true)}
108
-            />
109
-            <AgePicker
110
-              show={showAgePicker}
111
-              onShowChange={setShowAgePicker}
112
-              onChange={(e) => setFieldChange('age', e)}
113
-            />
114
-          </CellGroup>
115
-        )
116
-      }
102
+      {checkType == "survey" && (
103
+        <CellGroup style={{ marginTop: "20px" }}>
104
+          <Cell title="性别">
105
+            <View style={{ textAlign: "right" }}>
106
+              <RadioGroup
107
+                disabled={readonly}
108
+                direction="horizontal"
109
+                value={answer?.sex}
110
+                style={{ display: "inline-flex" }}
111
+                onChange={(e) => setFieldChange("sex", e.detail)}
112
+              >
113
+                <Radio name="1" checkedColor="var(--main-bg-color)">
114
+                  男
115
+                </Radio>
116
+                <Radio name="2" checkedColor="red">
117
+                  女
118
+                </Radio>
119
+              </RadioGroup>
120
+            </View>
121
+          </Cell>
122
+          <Cell
123
+            title="年龄"
124
+            isLink
125
+            value={answer?.age}
126
+            onClick={() => !readonly && setShowAgePicker(true)}
127
+          />
128
+          <AgePicker
129
+            show={showAgePicker}
130
+            onShowChange={setShowAgePicker}
131
+            onChange={(e) => setFieldChange("age", e)}
132
+          />
133
+        </CellGroup>
134
+      )}
117 135
 
118
-      {
119
-        checkType == 'survey' && (
120
-          <CellGroup style={{ marginTop: '20px' }}>
121
-            <Cell
122
-              title="已完成"
123
-              value={`${checkItemInfo?.answerNum || 0} 份`}
124
-            />
125
-          </CellGroup>
126
-        )
127
-      }
128
-    </View >
129
-  )
130
-}
136
+      {checkType == "survey" && (
137
+        <CellGroup style={{ marginTop: "20px" }}>
138
+          <Cell title="已完成" value={`${checkItemInfo?.answerNum || 0} 份`} />
139
+        </CellGroup>
140
+      )}
141
+    </View>
142
+  );
143
+};

+ 1
- 0
src/pages/feedback/issue/index.jsx View File

@@ -37,6 +37,7 @@ export default (props) => {
37 37
   }
38 38
 
39 39
   const onSubmit = () => {
40
+    console.log(formData)
40 41
     try {
41 42
       warn(!formData.addr, '请填写地址')
42 43
       warn(!formData.content, '请填写问题描述')

+ 2
- 1
src/pages/home/index.jsx View File

@@ -43,7 +43,8 @@ const menus = {
43 43
     { icon: 'icon2', text: '处 理 中', link: `/pages/org/issue/list/index?title=处理中&bizStatus=${PROCESS_ASSIGNED}` },
44 44
     { icon: 'icon3', text: '已 办 结', link: `/pages/org/issue/list/index?title=已办结&bizStatus=${PROCESS_END}` },
45 45
     { icon: 'icon5', text: '已 逾 期', link: '/pages/org/issue/list/index?title=已逾期&bizStatus=expired' },
46
-    { icon: 'icon11', text: '消息通知', link: '/pages/message/list/index' },
46
+    { icon: 'icon11', text: '消息通知', link: '/pages/message/list/index'},
47
+    // { icon: 'icon10', text: '我的上报', link: '/pages/reportList/index?title=我的上报'},
47 48
   ],
48 49
 
49 50
   // 责任交办单位管理员

+ 12
- 0
src/pages/reportList/index.jsx View File

@@ -0,0 +1,12 @@
1
+// import React from "react";
2
+// import Taro from "@tarojs/taro";
3
+// import Page from "@/layouts/index";
4
+// import PowerList from "@/components/PowerList";
5
+
6
+// export default (props) => {
7
+//   return (
8
+//     <Page>
9
+//       <PowerList request={}/>
10
+//     </Page>
11
+//   )
12
+// };

+ 102
- 0
yarn-error.log View File

@@ -0,0 +1,102 @@
1
+Arguments: 
2
+  C:\Program Files\nodejs\node.exe C:\Users\Administrator\AppData\Roaming\npm\node_modules\yarn\bin\yarn.js
3
+
4
+PATH: 
5
+  E:\java8\bin;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Program Files\Common Files\Oracle\Java\javapath;C:\Users\Administrator\Desktop\OpenSSH-Win64;C:\Program Files (x86)\Common Files\Intel\Shared Libraries\redist\intel64\compiler;D:\vmWare\bin\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;D:\Git\cmd;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;D:\android\flutter\bin;D:\dart-sdk\bin;D:\gradle-7.4.1\bin;D:\android\platform-tools;C:\Program Files (x86)\Tencent\微信web开发者工具\dll;F:\summer\;C:\Program Files\nodejs\;F:\Go\bin;D:\Microsoft VS Code\bin;C:\Program Files\PuTTY\;C:\Program Files\Amazon\AWSCLIV2\;C:\Program Files\MySQL\MySQL Shell 8.0\bin\;C:\Users\Administrator\AppData\Local\Microsoft\WindowsApps;C:\Users\Administrator\AppData\Local\Programs\Microsoft VS Code\bin;D:\apache-maven-3.8.4\bin;C:\Program Files\MySQL\MySQL Server 8.0\bin;D:\android\flutter\bin;C:\Users\Administrator\AppData\Roaming\npm;C:\Users\Administrator\go\bin;
6
+
7
+Yarn version: 
8
+  1.22.19
9
+
10
+Node version: 
11
+  16.18.1
12
+
13
+Platform: 
14
+  win32 x64
15
+
16
+Trace: 
17
+  Error: EPERM: operation not permitted, unlink 'E:\work\civilized_city\miniapp\node_modules\@swc\core-win32-x64-msvc\swc.win32-x64-msvc.node'
18
+
19
+npm manifest: 
20
+  {
21
+    "name": "civilized-miniapp",
22
+    "version": "1.0.0",
23
+    "private": true,
24
+    "description": "文明城市小程序",
25
+    "templateInfo": {
26
+      "name": "default",
27
+      "typescript": false,
28
+      "css": "less"
29
+    },
30
+    "scripts": {
31
+      "build:weapp": "taro build --type weapp",
32
+      "build:swan": "taro build --type swan",
33
+      "build:alipay": "taro build --type alipay",
34
+      "build:tt": "taro build --type tt",
35
+      "build:h5": "taro build --type h5",
36
+      "build:rn": "taro build --type rn",
37
+      "build:qq": "taro build --type qq",
38
+      "build:jd": "taro build --type jd",
39
+      "build:quickapp": "taro build --type quickapp",
40
+      "dev:weapp": "npm run build:weapp -- --watch",
41
+      "dev:swan": "npm run build:swan -- --watch",
42
+      "dev:alipay": "npm run build:alipay -- --watch",
43
+      "dev:tt": "npm run build:tt -- --watch",
44
+      "dev:h5": "npm run build:h5 -- --watch",
45
+      "dev:rn": "npm run build:rn -- --watch",
46
+      "dev:qq": "npm run build:qq -- --watch",
47
+      "dev:jd": "npm run build:jd -- --watch",
48
+      "dev:quickapp": "npm run build:quickapp -- --watch"
49
+    },
50
+    "browserslist": [
51
+      "last 3 versions",
52
+      "Android >= 4.1",
53
+      "ios >= 8"
54
+    ],
55
+    "author": "",
56
+    "dependencies": {
57
+      "@antmjs/vantui": "^2.3.5",
58
+      "@babel/runtime": "^7.7.7",
59
+      "@tarojs/components": "3.5.7",
60
+      "@tarojs/helper": "3.5.7",
61
+      "@tarojs/plugin-framework-react": "3.5.7",
62
+      "@tarojs/plugin-platform-weapp": "3.5.7",
63
+      "@tarojs/react": "3.5.7",
64
+      "@tarojs/router": "3.5.7",
65
+      "@tarojs/runtime": "3.5.7",
66
+      "@tarojs/shared": "3.5.7",
67
+      "@tarojs/taro": "3.5.7",
68
+      "@tarojs/taro-h5": "3.5.7",
69
+      "@zjxpcyc/js_event": "^1.0.0",
70
+      "@zjxpcyc/react-tiny-store": "^2.0.1",
71
+      "echarts": "5.4.1",
72
+      "echarts-for-weixin": "^1.0.2",
73
+      "md5": "^2.3.0",
74
+      "react": "^18.0.0",
75
+      "react-dom": "^18.0.0"
76
+    },
77
+    "devDependencies": {
78
+      "@babel/core": "^7.8.0",
79
+      "@pmmmwh/react-refresh-webpack-plugin": "^0.5.5",
80
+      "@tarojs/cli": "3.5.7",
81
+      "@tarojs/mini-runner": "3.5.7",
82
+      "@tarojs/webpack-runner": "3.5.7",
83
+      "@types/react": "^18.0.0",
84
+      "@types/webpack-env": "^1.13.6",
85
+      "babel-plugin-import": "^1.13.5",
86
+      "babel-preset-taro": "3.5.7",
87
+      "eslint": "^8.12.0",
88
+      "eslint-config-taro": "3.5.7",
89
+      "eslint-plugin-import": "^2.12.0",
90
+      "eslint-plugin-react": "^7.8.2",
91
+      "eslint-plugin-react-hooks": "^4.2.0",
92
+      "react-refresh": "^0.11.0",
93
+      "stylelint": "^14.4.0",
94
+      "webpack": "4.46.0"
95
+    }
96
+  }
97
+
98
+yarn manifest: 
99
+  No manifest
100
+
101
+Lockfile: 
102
+  No lockfile