1002884655 4 年 前
コミット
fec345f214

+ 2
- 1
config/dev.js ファイルの表示

@@ -3,7 +3,8 @@ module.exports = {
3 3
     NODE_ENV: '"development"'
4 4
   },
5 5
   defineConstants: {
6
-    HOST: '"https://xs.ycjcjy.com"'
6
+    // HOST: '"https://xs.ycjcjy.com"',
7
+    HOST: '"http://t.ycjcjy.com"',
7 8
     // HOST: '"http://127.0.0.1:6060"'
8 9
   },
9 10
   mini: {

+ 1
- 1
project.config.json ファイルの表示

@@ -28,7 +28,7 @@
28 28
 		},
29 29
 		"bundle": false,
30 30
 		"useIsolateContext": true,
31
-		"useCompilerModule": true,
31
+		"useCompilerModule": false,
32 32
 		"userConfirmedUseCompilerModuleSwitch": false,
33 33
 		"useMultiFrameRuntime": false,
34 34
 		"useApiHook": true,

+ 1
- 1
src/app.js ファイルの表示

@@ -55,7 +55,7 @@ class App extends Component {
55 55
       success: res => {
56 56
         if (res.errMsg === 'login:ok') {
57 57
           request({ ...apis.login, params: { code: res.code, from, recommender, scene, mpOpenId } }).then(x => {
58
-            setUser({ ...x.person, ShowIndexAdv: false, FirstComing: true })
58
+            setUser({ ...x.person, ShowIndexAdv: false, FirstComing: true, communityId: x.houseList !== null && x.houseList.length ? x.houseList[0].communityId : null, roomId: x.houseList !== null && x.houseList.length ? x.houseList[0].id : null })
59 59
             Taro.setStorage({ key: 'token', data: x.token })
60 60
             Taro.setStorage({ key: 'sessionKey', data: x.sessionKey })
61 61
 

+ 1
- 1
src/components/WuYeBaoXiu/index.jsx ファイルの表示

@@ -59,7 +59,7 @@ export default function WuYeBaoXiu (props) {
59 59
         ApiName='getGongDanList'
60 60
         ListName='pagelist'
61 61
         RequestUrlData={{ orgId: user.orgId }}
62
-        RequestParams={{ type: 2 }}
62
+        RequestParams={{ type: 2, taUserVerifyId: user.roomId }}
63 63
         Refresh={Refresh}
64 64
         Push={Push}
65 65
         KeepChildren={

+ 1
- 0
src/components/WuYeGongGao/index.jsx ファイルの表示

@@ -49,6 +49,7 @@ export default function WuYeGongGao () {
49 49
         IsEmpty={IsEmpty}
50 50
         ApiName={`getGongGaoList`}
51 51
         RequestUrlData={{ orgId: user.orgId }}
52
+        RequestParams={{ taUserVerifyId: user.communityId }}
52 53
         Refresh={Refresh}
53 54
         Push={Push}
54 55
         KeepChildren={

+ 3
- 0
src/components/WuYeJiaoFei/index.jsx ファイルの表示

@@ -3,6 +3,7 @@ import WuYeBanner from '@/components/WuYeBanner/index'
3 3
 import ScrollPageRefresh from '@/components/ScrollPageRefresh/index'
4 4
 import request, { apis } from '@/utils/request'
5 5
 import nav2detail from '@/utils/nav2detail'
6
+import { useModel } from '@/store'
6 7
 import Taro from '@tarojs/taro'
7 8
 import { Swiper, SwiperItem } from '@tarojs/components'
8 9
 import { Checkbox, CheckboxGroup } from '@tarojs/components'
@@ -25,6 +26,7 @@ const cancelOrder = outTradeNo => {
25 26
 
26 27
 export default function WuYeJiaoFei () {
27 28
 
29
+  const { user } = useModel('user')
28 30
   const [PageList, setPageList] = useState([])
29 31
   const [BannerList, setBannerList] = useState([])
30 32
   const [checkedIds, setCheckedIds] = useState([])
@@ -135,6 +137,7 @@ export default function WuYeJiaoFei () {
135 137
             ApiName={`getJiaoFeiList`}
136 138
             ListName={`list`}
137 139
             RequestUrlData={{ type: 0 }}
140
+            RequestParams={{ taUserVerifyId: user.roomId }}
138 141
             Refresh={Refresh}
139 142
             Push={Push}
140 143
             Reset={ToReset}

+ 1
- 1
src/pages/ShouYe/index.jsx ファイルの表示

@@ -103,7 +103,7 @@ export default function Index () {
103 103
   }
104 104
 
105 105
   const GetNotice = () => { // 获取通知
106
-    request({ ...apis.getGongGaoList, args: { orgId: 1 }, params: { annType: 'notice', pageNum: 1, pageSize: 1 } }).then((res) => {
106
+    request({ ...apis.getGongGaoList, args: { orgId: 1 }, params: { annType: 'notice', pageNum: 1, pageSize: 1, taUserVerifyId: user.communityId } }).then((res) => {
107 107
       setNoticeInfo(res.records[0])
108 108
       if (res.records !== null && res.records.length > 0) {
109 109
         setShowNotice(true)

+ 1
- 1
src/pages/WoDe/WoDeGongDan/index.jsx ファイルの表示

@@ -30,7 +30,7 @@ export default function WoDeGongDan () {
30 30
   return (
31 31
     <Page>
32 32
       <view className='WoDeGongDan'>
33
-      <ScrollPageRefresh IsEmpty={IsEmpty} ApiName={`getGongDanList`} RequestUrlData={{ orgId: user.orgId }} RequestParams={{ type: 2 }}  ListName='pagelist' Refresh={Refresh} Push={Push}>
33
+      <ScrollPageRefresh IsEmpty={IsEmpty} ApiName={`getGongDanList`} RequestUrlData={{ orgId: user.orgId }} RequestParams={{ type: 2, taUserVerifyId: user.roomId }}  ListName='pagelist' Refresh={Refresh} Push={Push}>
34 34
           <view className='Content Activity'>
35 35
             {
36 36
               PageList.map((item, index) => (

+ 15
- 3
src/pages/WoDe/WoDeRenZheng/index.jsx ファイルの表示

@@ -56,6 +56,14 @@ export default function WoDeRenZheng () {
56 56
     setPageList(PageList.concat(e))
57 57
   }
58 58
 
59
+  const SetDefaultRoom = (item) => {
60
+    return () => {
61
+      if (item.id - 0 !== user.roomId - 0) {
62
+        setUser({ ...user, communityId: item.communityId, roomId: item.id })
63
+      }
64
+    }
65
+  }
66
+
59 67
 
60 68
   return (
61 69
     <Page>
@@ -64,14 +72,18 @@ export default function WoDeRenZheng () {
64 72
           <view className='Content Activity'>
65 73
             {
66 74
               PageList.map((item, index) => (
67
-                <view className='ListItem' key={`RenZhengItem-${index}`} onClick={() => { Taro.navigateTo({ url: `/pages/WoDe/YeZhuShenHe/index?id=${item.id}` }) }}>
68
-                  <text>{item.phaseName}{item.buildingName}{item.unitName}{item.levelName}{item.roomNoName}</text>
75
+                <view className='ListItem' key={`RenZhengItem-${index}`}>
76
+                  <text onClick={() => { Taro.navigateTo({ url: `/pages/WoDe/YeZhuShenHe/index?id=${item.id}` }) }}>{item.phaseName}{item.buildingName}{item.unitName}{item.levelName}{item.roomNoName}</text>
69 77
                   <view className='flex-h'>
70
-                    <view className='flex-item'>
78
+                    <view className='flex-item' onClick={() => { Taro.navigateTo({ url: `/pages/WoDe/YeZhuShenHe/index?id=${item.id}` }) }}>
71 79
                       <text>{item.roleName || '户主'}:{item.ownerName} {item.phone}</text>
72 80
                       <text>{toolclass.FormatDate(item.createDate)}</text>
73 81
                     </view>
74 82
                     <view>
83
+                      {
84
+                        item.verifyStatus - 0 === 1 &&
85
+                        <text className={item.id - 0 === user.roomId - 0 ? 'Btn' : 'Btn active'} onClick={SetDefaultRoom(item)}>{item.id - 0 === user.roomId - 0 ? '默认房产' : '设为默认'}</text>
86
+                      }
75 87
                       <text className={item.verifyStatus - 0 === 0 ? '' : item.verifyStatus - 0 === 1 ? 'Green' : 'Red'}>{item.verifyStatus - 0 === 0 ? '审核中' : item.verifyStatus - 0 === 1 ? '审核通过' : '审核未通过'}</text>
76 88
                     </view>
77 89
                   </view>

+ 15
- 0
src/pages/WoDe/WoDeRenZheng/index.less ファイルの表示

@@ -56,6 +56,8 @@
56 56
           >text {
57 57
             font-size: 28px;
58 58
             color: #77A5F0;
59
+            display: block;
60
+            text-align: center;
59 61
 
60 62
             &.Red {
61 63
               color: #F35844;
@@ -64,6 +66,18 @@
64 66
             &.Green {
65 67
               color: #44d61f;
66 68
             }
69
+
70
+            &.Btn {
71
+              color: #666;
72
+              line-height: 50px;
73
+              padding: 0 20px;
74
+              border-radius: 25px;
75
+
76
+              &.active {
77
+                color: #fff;
78
+                background: #F35844;
79
+              }
80
+            }
67 81
           }
68 82
         }
69 83
       }
@@ -94,6 +108,7 @@
94 108
     bottom: 0;
95 109
     background: rgba(0, 0, 0, 0.8);
96 110
     display: none;
111
+
97 112
     &.active {
98 113
       display: block;
99 114
     }

+ 41
- 8
src/pages/WoDe/YeZhuRenZheng/index.jsx ファイルの表示

@@ -23,7 +23,8 @@ export default function YeZhuRenZheng () {
23 23
     { name: '租客', id: 'TENANT' },
24 24
     { name: '家属', id: 'RELATION' }
25 25
   ])
26
-  const [Level1Value] = useState(user.orgId)
26
+  const [Level1Value, setLevel1Value] = useState(null)
27
+  const [Level1List, setLevel1List] = useState([])
27 28
   const [Level2Value, setLevel2Value] = useState(null)
28 29
   const [Level2List, setLevel2List] = useState([])
29 30
   const [Level3Value, setLevel3Value] = useState(null)
@@ -41,6 +42,10 @@ export default function YeZhuRenZheng () {
41 42
     }
42 43
   }, [user])
43 44
 
45
+  useEffect(() => {
46
+    GetLevel1List()
47
+  }, [])
48
+
44 49
   useEffect(() => {
45 50
     GetLevel2List()
46 51
   }, [Level1Value])
@@ -157,6 +162,7 @@ export default function YeZhuRenZheng () {
157 162
       ...apis.checkOwnerVerify,
158 163
       params: {
159 164
         orgId: user.orgId,
165
+        communityId: Level1List[Level1Value].id,
160 166
         phaseId: Level2List[Level2Value].id,
161 167
         buildingId: Level3List[Level3Value].id,
162 168
         unitId: Level4List[Level4Value].id,
@@ -169,6 +175,7 @@ export default function YeZhuRenZheng () {
169 175
         request({ // 提交认证数据
170 176
           ...apis.addOwnerVerify,
171 177
           data: {
178
+            communityId: Level1List[Level1Value].id,
172 179
             phaseId: Level2List[Level2Value].id,
173 180
             buildingId: Level3List[Level3Value].id,
174 181
             unitId: Level4List[Level4Value].id,
@@ -206,15 +213,24 @@ export default function YeZhuRenZheng () {
206 213
     })
207 214
   }
208 215
 
209
-  const GetLevel2List = () => {
210
-    request({ ...apis.getRenZhengAddressList, params: { orgId: user.orgId } }).then((res) => {
211
-      setLevel2List(res || [])
216
+  const GetLevel1List = () => {
217
+    request({ ...apis.GetCommunityList }).then((res) => {
218
+      console.log(res.records)
219
+      setLevel1List(res.records || [])
212 220
     })
213 221
   }
214 222
 
223
+  const GetLevel2List = () => {
224
+    if (Level1Value !== null) {
225
+      request({ ...apis.getRenZhengAddressList, params: { orgId: user.orgId, communityId: Level1List[Level1Value].id } }).then((res) => {
226
+        setLevel2List(res || [])
227
+      })
228
+    }
229
+  }
230
+
215 231
   const GetLevel3List = () => {
216 232
     if (Level2Value !== null) {
217
-      request({ ...apis.getRenZhengAddressList, params: { orgId: user.orgId, phaseId: Level2List[Level2Value].id } }).then((res) => {
233
+      request({ ...apis.getRenZhengAddressList, params: { orgId: user.orgId, communityId: Level1List[Level1Value].id, phaseId: Level2List[Level2Value].id } }).then((res) => {
218 234
         setLevel3List(res || [])
219 235
       })
220 236
     } else {
@@ -225,7 +241,7 @@ export default function YeZhuRenZheng () {
225 241
 
226 242
   const GetLevel4List = () => {
227 243
     if (Level3Value !== null) {
228
-      request({ ...apis.getRenZhengAddressList, params: { orgId: user.orgId, phaseId: Level2List[Level2Value].id, buildingId: Level3List[Level3Value].id } }).then((res) => {
244
+      request({ ...apis.getRenZhengAddressList, params: { orgId: user.orgId, communityId: Level1List[Level1Value].id, phaseId: Level2List[Level2Value].id, buildingId: Level3List[Level3Value].id } }).then((res) => {
229 245
         setLevel4List(res || [])
230 246
       })
231 247
     } else {
@@ -236,7 +252,7 @@ export default function YeZhuRenZheng () {
236 252
 
237 253
   const GetLevel5List = () => {
238 254
     if (Level4Value !== null) {
239
-      request({ ...apis.getRenZhengAddressList, params: { orgId: user.orgId, phaseId: Level2List[Level2Value].id, buildingId: Level3List[Level3Value].id, unitId: Level4List[Level4Value].id } }).then((res) => {
255
+      request({ ...apis.getRenZhengAddressList, params: { orgId: user.orgId, communityId: Level1List[Level1Value].id, phaseId: Level2List[Level2Value].id, buildingId: Level3List[Level3Value].id, unitId: Level4List[Level4Value].id } }).then((res) => {
240 256
         setLevel5List(res || [])
241 257
       })
242 258
     } else {
@@ -247,7 +263,7 @@ export default function YeZhuRenZheng () {
247 263
 
248 264
   const GetLevel6List = () => {
249 265
     if (Level5Value !== null) {
250
-      request({ ...apis.getRenZhengAddressList, params: { orgId: user.orgId, phaseId: Level2List[Level2Value].id, buildingId: Level3List[Level3Value].id, unitId: Level4List[Level4Value].id, levelId: Level5List[Level5Value].id } }).then((res) => {
266
+      request({ ...apis.getRenZhengAddressList, params: { orgId: user.orgId, communityId: Level1List[Level1Value].id, phaseId: Level2List[Level2Value].id, buildingId: Level3List[Level3Value].id, unitId: Level4List[Level4Value].id, levelId: Level5List[Level5Value].id } }).then((res) => {
251 267
         setLevel6List(res || [])
252 268
       })
253 269
     } else {
@@ -260,6 +276,15 @@ export default function YeZhuRenZheng () {
260 276
     setRoleName(RoleList[e.detail.value].name)
261 277
   }
262 278
 
279
+  const Level1Change = (e) => {
280
+    if (Level1Value !== e.detail.value - 0) {
281
+      setLevel2Value(null)
282
+    }
283
+    if (Level1List.length > 0) {
284
+      setLevel1Value(e.detail.value - 0)
285
+    }
286
+  }
287
+
263 288
   const Level2Change = (e) => {
264 289
     if (Level2Value !== e.detail.value - 0) {
265 290
       setLevel3Value(null)
@@ -331,6 +356,14 @@ export default function YeZhuRenZheng () {
331 356
               </Picker>
332 357
             </view>
333 358
           </view>
359
+          <view className='flex-h'>
360
+            <text>小区</text>
361
+            <view className='flex-item'>
362
+              <Picker value={Level1Value} range-key='name' range={Level1List} onChange={Level1Change}>
363
+                <view className='PickerText'>{Level1List.length > 0 && Level1Value !== null ? Level1List[Level1Value].name : '请选择小区'}</view>
364
+              </Picker>
365
+            </view>
366
+          </view>
334 367
           <view className='flex-h'>
335 368
             <text>期号</text>
336 369
             <view className='flex-item'>

+ 2
- 2
src/pages/WoDe/YeZhuRenZheng/index.less ファイルの表示

@@ -63,11 +63,11 @@
63 63
   }
64 64
 
65 65
   >.BottomBtn {
66
-    padding: 0 30px;
66
+    padding: 0 30px 30px;
67
+    margin-top: -40px;
67 68
     position: relative;
68 69
     overflow: hidden;
69 70
     z-index: 2;
70
-    margin-top: -164px;
71 71
 
72 72
     >text {
73 73
       display: block;

+ 4
- 2
src/pages/WuYe/TianJiaBaoXiu/index.jsx ファイルの表示

@@ -10,6 +10,7 @@ import './index.less'
10 10
 
11 11
 export default function WuYeTianJiaBaoXiu () {
12 12
 
13
+  const { user } = useModel('user')
13 14
   const [Title, setTitle] = useState('')
14 15
   const [Desc, setDesc] = useState('')
15 16
   const [DataLock, setDataLock] = useState(false)
@@ -43,6 +44,7 @@ export default function WuYeTianJiaBaoXiu () {
43 44
     setDataLock(true)
44 45
     request({
45 46
       ...apis.AddGongDan,
47
+      params: { taUserVerifyId: user.roomId },
46 48
       data: {
47 49
         ticketTitle: Title,
48 50
         ticketContent: Desc,
@@ -87,7 +89,7 @@ export default function WuYeTianJiaBaoXiu () {
87 89
 
88 90
   useEffect(() => {
89 91
     if (rpType) {
90
-      request({...apis.getRepairTypeDetail, args: {id: rpType}}).then(res => {
92
+      request({ ...apis.getRepairTypeDetail, args: { id: rpType } }).then(res => {
91 93
         setRepairType(res)
92 94
       })
93 95
     }
@@ -101,7 +103,7 @@ export default function WuYeTianJiaBaoXiu () {
101 103
           <Textarea placeholder='描述问题详情,以便我们更好的相处' onInput={TitleChange} value={Title}></Textarea>
102 104
           <view className='LabelList'>
103 105
             {
104
-              (repairType || {tags: ''}).tags.split(',').map(tag => <text key={tag} onClick={() => setTitle(Title === '' ? tag : `${Title},${tag}`)}>{tag}</text>)
106
+              (repairType || { tags: '' }).tags.split(',').map(tag => <text key={tag} onClick={() => setTitle(Title === '' ? tag : `${Title},${tag}`)}>{tag}</text>)
105 107
             }
106 108
           </view>
107 109
         </view>

+ 4
- 0
src/utils/api.js ファイルの表示

@@ -1,6 +1,10 @@
1 1
 const prefix = `${HOST}/api/wx`
2 2
 
3 3
 const $api = {
4
+  GetCommunityList: { // 获取小区列表
5
+    method: 'get',
6
+    url: `${prefix}/tpCommunity`
7
+  },
4 8
   ReplyTicket: { // 工单回复
5 9
     method: 'post',
6 10
     url: `${prefix}/ticket/reply/:orgId`