fangmingyue 2 年前
父节点
当前提交
318118258f
共有 3 个文件被更改,包括 17 次插入7 次删除
  1. 1
    1
      config/dev.js
  2. 14
    5
      src/pages/check/edit/components/LocForm.jsx
  3. 2
    1
      src/pages/check/edit/index.jsx

+ 1
- 1
config/dev.js 查看文件

4
   },
4
   },
5
   defineConstants: {
5
   defineConstants: {
6
     // HOST: '"http://127.0.0.1:9087"',
6
     // HOST: '"http://127.0.0.1:9087"',
7
-    HOST: '"http://192.168.89.147:9087"',
7
+    HOST: '"http://localhost:9087"',
8
     AD_IMAGE: '"https://h5.njyunzhi.com/images/citizen_banner.png"',
8
     AD_IMAGE: '"https://h5.njyunzhi.com/images/citizen_banner.png"',
9
   },
9
   },
10
   mini: {},
10
   mini: {},

+ 14
- 5
src/pages/check/edit/components/LocForm.jsx 查看文件

18
       onLoadingChange(v)
18
       onLoadingChange(v)
19
     }
19
     }
20
   }
20
   }
21
-  
21
+
22
   const setFieldChange = (key, val) => {
22
   const setFieldChange = (key, val) => {
23
     onChange({
23
     onChange({
24
       location: loc,
24
       location: loc,
41
   //     });
41
   //     });
42
   //   }
42
   //   }
43
   // }, [checkItemInfo?.itemId])
43
   // }, [checkItemInfo?.itemId])
44
-  
44
+
45
+  // console.log('answer', answer);
46
+
45
   return (
47
   return (
46
     <View>
48
     <View>
47
       <Map location={answer?.location} onLocChange={setLoc} />
49
       <Map location={answer?.location} onLocChange={setLoc} />
54
             />
56
             />
55
           )
57
           )
56
         }
58
         }
59
+        <Field
60
+          readonly={readonly}
61
+          placeholder={checkType == 'loc' ? '请输入地址' : '请填写社区名称'}
62
+          // value={answer}
63
+          leftIcon={mapIcon}
64
+        // onChange={e => setFieldChange('', e.detail)}
65
+        />
57
         <Field
66
         <Field
58
           readonly={readonly}
67
           readonly={readonly}
59
           placeholder={checkType == 'loc' ? '请输入地址' : '请填写小区名称'}
68
           placeholder={checkType == 'loc' ? '请输入地址' : '请填写小区名称'}
64
       </CellGroup>
73
       </CellGroup>
65
       {
74
       {
66
         checkType == 'survey' && (
75
         checkType == 'survey' && (
67
-          <CellGroup style={{marginTop: '20px'}}>
76
+          <CellGroup style={{ marginTop: '20px' }}>
68
             <Cell title="性别">
77
             <Cell title="性别">
69
-              <View style={{textAlign: 'right'}}>
78
+              <View style={{ textAlign: 'right' }}>
70
                 <RadioGroup
79
                 <RadioGroup
71
                   disabled={readonly}
80
                   disabled={readonly}
72
                   direction="horizontal"
81
                   direction="horizontal"
73
                   value={answer?.sex}
82
                   value={answer?.sex}
74
-                  style={{display: 'inline-flex'}}
83
+                  style={{ display: 'inline-flex' }}
75
                   onChange={(e) => setFieldChange('sex', e.detail)}
84
                   onChange={(e) => setFieldChange('sex', e.detail)}
76
                 >
85
                 >
77
                   <Radio name="1" checkedColor="var(--main-bg-color)">男</Radio>
86
                   <Radio name="1" checkedColor="var(--main-bg-color)">男</Radio>

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

45
       if (!readonly) {
45
       if (!readonly) {
46
         try {
46
         try {
47
           warn(!answer?.addr, typ == 'loc' ? '请填写地址' : '请填写小区名称');
47
           warn(!answer?.addr, typ == 'loc' ? '请填写地址' : '请填写小区名称');
48
+          // warn(!answer, typ == 'loc' ? '请填写地址' : '请填写社区名称');
48
           warn(!answer?.location, '未能获取定位信息, 请重试');
49
           warn(!answer?.location, '未能获取定位信息, 请重试');
49
           warn(typ == 'survey' && !answer?.sex, '请选择性别');
50
           warn(typ == 'survey' && !answer?.sex, '请选择性别');
50
           warn(typ == 'survey' && !answer?.age, '请选择年龄段');
51
           warn(typ == 'survey' && !answer?.age, '请选择年龄段');
176
 
177
 
177
         // 查询我的答案
178
         // 查询我的答案
178
         // getTaCheckItemAnswer(itemId).then(setAnswer);
179
         // getTaCheckItemAnswer(itemId).then(setAnswer);
179
-    
180
+
180
         // 查询当前测评主记录的所有问题
181
         // 查询当前测评主记录的所有问题
181
         getTaCheckItemQu({ pageSize: 200, itemId }).then(res => {
182
         getTaCheckItemQu({ pageSize: 200, itemId }).then(res => {
182
           setLoading(false);
183
           setLoading(false);