fangmingyue 2 лет назад
Родитель
Сommit
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,7 +4,7 @@ module.exports = {
4 4
   },
5 5
   defineConstants: {
6 6
     // HOST: '"http://127.0.0.1:9087"',
7
-    HOST: '"http://192.168.89.147:9087"',
7
+    HOST: '"http://localhost:9087"',
8 8
     AD_IMAGE: '"https://h5.njyunzhi.com/images/citizen_banner.png"',
9 9
   },
10 10
   mini: {},

+ 14
- 5
src/pages/check/edit/components/LocForm.jsx Просмотреть файл

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

+ 2
- 1
src/pages/check/edit/index.jsx Просмотреть файл

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