Bläddra i källkod

Merge branch 'master' of http://git.ycjcjy.com/xiangsong/miniapp

张延森 4 år sedan
förälder
incheckning
284b1811a1

+ 17
- 5
src/components/ScrollPageRefresh/index.jsx Visa fil

@@ -33,14 +33,26 @@ export default function ScrollPageRefresh (props) {
33 33
     }
34 34
     request({ ...RequestBody }).then((res) => {
35 35
       if (PageNum === 1) {
36
-        Refresh([...res[ListName]])
36
+        if (ListName === null) {
37
+          Refresh([...res])
38
+        } else {
39
+          Refresh([...res[ListName]])
40
+        }
37 41
       } else {
38
-        Push([...res[ListName]])
42
+        if (ListName === null) {
43
+          Push([...res])
44
+        } else {
45
+          Push([...res[ListName]])
46
+        }
39 47
       }
40
-      if (res[ListName].length) {
41
-        setHasNextPage(res.current - 0 < res.pages - 0)
42
-      } else if (res.total === 0) {
48
+      if (ListName === null) {
43 49
         setHasNextPage(false)
50
+      } else {
51
+        if (res[ListName].length) {
52
+          setHasNextPage(res.current - 0 < res.pages - 0)
53
+        } else if (res.total === 0) {
54
+          setHasNextPage(false)
55
+        }
44 56
       }
45 57
       done()
46 58
     }).catch(() => {

+ 1
- 0
src/components/WuYeFuWu/index.css Visa fil

@@ -1,5 +1,6 @@
1 1
 .WuYeFuWu {
2 2
   width: 100%;
3
+  height: 100%;
3 4
   position: relative;
4 5
   overflow: hidden;
5 6
 }

+ 8
- 45
src/components/WuYeFuWu/index.jsx Visa fil

@@ -1,8 +1,7 @@
1
-import React, { useState, useEffect } from 'react'
2
-import request, { apis } from '@/utils/request'
1
+import React, { useState } from 'react'
3 2
 import { useModel } from '@/store'
4 3
 import WuYeFuWuItem from '@/components/WuYeFuWuItem/index'
5
-import ScrollPage from '@/components/ScrollPage/index'
4
+import ScrollPageRefresh from '@/components/ScrollPageRefresh/index'
6 5
 import '@/assets/css/reset.less'
7 6
 import '@/assets/css/iconfont.less'
8 7
 import './index.less'
@@ -10,55 +9,19 @@ import './index.less'
10 9
 export default function WuYeFuWu () {
11 10
 
12 11
   const { user } = useModel('user')
13
-  const [IsPullUp, setIsPullUp] = useState(false)
14
-  const [IsPullDown, setIsPullDown] = useState(false)
15
-  const [HasNextPage, setHasNextPage] = useState(true)
16
-  const [PageNum, setPageNum] = useState(1)
17 12
   const [PageList, setPageList] = useState([])
18 13
 
19
-  useEffect(() => {
20
-    GetPageList(() => {
21
-      setIsPullUp(false)
22
-    })
23
-  }, [PageNum])
24
-
25
-  const GetPageList = (done = () => { }) => { // 获取列表
26
-    request({ ...apis.getGongGaoList, args: { orgId: user.orgId }, params: { pageNum: PageNum, pageSize: 10 } }).then((res) => {
27
-      if (PageNum === 1) {
28
-        setPageList([...res.records])
29
-      } else {
30
-        setPageList(PageList.concat([...res.records]))
31
-      }
32
-      setHasNextPage(res.current - 0 < res.pages - 0)
33
-      done()
34
-    }).catch(() => {
35
-      done()
36
-    })
37
-  }
38
-
39
-  const OnRefresh = () => { // 页面下拉刷新
40
-    setIsPullDown(true)
41
-    setHasNextPage(true)
42
-    setPageNum(1)
43
-    if (PageNum === 1) {
44
-      GetPageList(() => {
45
-        setIsPullDown(false)
46
-      })
47
-    } else {
48
-      setPageNum(1)
49
-    }
14
+  const Refresh = (e) => { // 下拉刷新
15
+    setPageList(e)
50 16
   }
51 17
 
52
-  const OnPullUp = () => {
53
-    if (HasNextPage) {
54
-      setIsPullUp(true)
55
-      setPageNum(PageNum + 1)
56
-    }
18
+  const Push = (e) => { // 上拉加载
19
+    setPageList(PageList.concat(e))
57 20
   }
58 21
 
59 22
   return (
60 23
     <view className='WuYeFuWu'>
61
-      <ScrollPage IsPullDown={IsPullDown} IsPullUp={IsPullUp} HasMore={HasNextPage} OnRefresh={OnRefresh} OnPullUp={OnPullUp}>
24
+      <ScrollPageRefresh ApiName={`getMessageList`} ListName={`list`} RequestUrlData={{ orgId: user.orgId }} Refresh={Refresh} Push={Push}>
62 25
         {/* 大图 */}
63 26
         <view className='BigImg'>
64 27
           <image mode='aspectFill' src={null} className='centerLabel'></image>
@@ -87,7 +50,7 @@ export default function WuYeFuWu () {
87 50
             ))
88 51
           }
89 52
         </view>
90
-      </ScrollPage>
53
+      </ScrollPageRefresh>
91 54
     </view>
92 55
   )
93 56
 }

+ 1
- 0
src/components/WuYeFuWu/index.less Visa fil

@@ -1,5 +1,6 @@
1 1
 .WuYeFuWu {
2 2
   width: 100%;
3
+  height: 100%;
3 4
   position: relative;
4 5
   overflow: hidden;
5 6
 

+ 5
- 0
src/pages.js Visa fil

@@ -185,6 +185,11 @@ const Other = [
185 185
       eventType: 'other',
186 186
     }
187 187
   },
188
+  {
189
+    name: '我的-我的认证',
190
+    page: 'pages/WoDe/WoDeRenZheng/index',
191
+    type: 'other',
192
+  },
188 193
   {
189 194
     name: '我的-业主认证',
190 195
     page: 'pages/WoDe/YeZhuRenZheng/index',

+ 1
- 1
src/pages/ShouYe/index.jsx Visa fil

@@ -23,7 +23,7 @@ export default function Index (props) {
23 23
     { icon: 'iconjiaofei', name: '物业缴费', id: 1, router: '/pages/WuYe/index', isTab: true },
24 24
     { icon: 'icontongzhi', name: '物业通知', id: 2, router: '/pages/WuYe/index', isTab: true },
25 25
     { icon: 'iconbaoxiu', name: '物业报修', id: 3, router: '/pages/WuYe/index', isTab: true },
26
-    { icon: 'iconrenzheng', name: '业主认证', id: 4, router: '/pages/WoDe/YeZhuRenZheng/index', isTab: false }
26
+    { icon: 'iconrenzheng', name: '业主认证', id: 4, router: '/pages/WoDe/WoDeRenZheng/index', isTab: false }
27 27
   ])
28 28
   const [NavList] = useState([
29 29
     { icon: 'iconhuodong1', name: '活动', id: 1, router: '/pages/ShouYe/HuoDong/index', isTab: false },

+ 3
- 0
src/pages/WoDe/WoDeRenZheng/index.config.js Visa fil

@@ -0,0 +1,3 @@
1
+export default {
2
+  navigationBarTitleText: '我的认证'
3
+}

+ 74
- 0
src/pages/WoDe/WoDeRenZheng/index.css Visa fil

@@ -0,0 +1,74 @@
1
+.WoDeRenZheng {
2
+  width: 100%;
3
+  height: 100%;
4
+  position: relative;
5
+  background: #f8f8f8;
6
+  overflow: hidden;
7
+}
8
+.WoDeRenZheng .Content {
9
+  padding: 0 30px;
10
+  position: relative;
11
+  overflow: hidden;
12
+}
13
+.WoDeRenZheng .Content > .ListItem {
14
+  position: relative;
15
+  overflow: hidden;
16
+  margin-bottom: 30px;
17
+  background: #fff;
18
+  border-radius: 10px;
19
+  padding: 20px;
20
+}
21
+.WoDeRenZheng .Content > .ListItem:first-child {
22
+  margin-top: 30px;
23
+}
24
+.WoDeRenZheng .Content > .ListItem > text {
25
+  display: block;
26
+  font-size: 28px;
27
+  font-weight: bold;
28
+  color: #000;
29
+  line-height: 40px;
30
+}
31
+.WoDeRenZheng .Content > .ListItem > .flex-h {
32
+  align-items: center;
33
+  position: relative;
34
+  overflow: hidden;
35
+  margin-top: 10px;
36
+}
37
+.WoDeRenZheng .Content > .ListItem > .flex-h > .flex-item {
38
+  position: relative;
39
+  overflow: hidden;
40
+  margin-right: 10px;
41
+}
42
+.WoDeRenZheng .Content > .ListItem > .flex-h > .flex-item > text {
43
+  display: block;
44
+  white-space: nowrap;
45
+  overflow: hidden;
46
+  text-overflow: ellipsis;
47
+  font-size: 24px;
48
+  color: #666;
49
+  line-height: 40px;
50
+}
51
+.WoDeRenZheng .Content > .ListItem > .flex-h > view:last-child > text {
52
+  font-size: 28px;
53
+  color: #77A5F0;
54
+}
55
+.WoDeRenZheng .Content > .ListItem > .flex-h > view:last-child > text.Red {
56
+  color: #F35844;
57
+}
58
+.WoDeRenZheng .Content > .ListItem > .flex-h > view:last-child > text.Green {
59
+  color: #44d61f;
60
+}
61
+.WoDeRenZheng .Content > .AddBtn {
62
+  margin-bottom: 30px;
63
+  position: relative;
64
+  overflow: hidden;
65
+}
66
+.WoDeRenZheng .Content > .AddBtn > text {
67
+  font-size: 28px;
68
+  color: #fff;
69
+  line-height: 80px;
70
+  border-radius: 80px;
71
+  background: #F35844;
72
+  text-align: center;
73
+  display: block;
74
+}

+ 49
- 0
src/pages/WoDe/WoDeRenZheng/index.jsx Visa fil

@@ -0,0 +1,49 @@
1
+import React, { useState } from 'react'
2
+import ScrollPageRefresh from '@/components/ScrollPageRefresh'
3
+import toolclass from '@/utils/toolclass.js'
4
+import Taro from '@tarojs/taro'
5
+import '@/assets/css/reset.less'
6
+import '@/assets/css/iconfont.less'
7
+import './index.less'
8
+
9
+export default function WoDeRenZheng () {
10
+
11
+  const [PageList, setPageList] = useState([])
12
+
13
+  const Refresh = (e) => { // 下拉刷新
14
+    setPageList(e)
15
+  }
16
+
17
+  const Push = (e) => { // 上拉加载
18
+    setPageList(PageList.concat(e))
19
+  }
20
+
21
+
22
+  return (
23
+    <view className='WoDeRenZheng'>
24
+      <ScrollPageRefresh ApiName={`getOwnerVerifyList`} ListName={null} Refresh={Refresh} Push={Push}>
25
+        <view className='Content Activity'>
26
+          {
27
+            PageList.map((item, index) => (
28
+              <view className='ListItem' key={`RenZhengItem-${index}`} onClick={() => { Taro.navigateTo({ url: `/pages/WoDe/YeZhuShenHe/index?id=${item.id}` }) }}>
29
+                <text>{item.phaseName}{item.buildingName}{item.unitName}{item.levelName}{item.roomNoName}</text>
30
+                <view className='flex-h'>
31
+                  <view className='flex-item'>
32
+                    <text>业主:{item.ownerName} {item.phone}</text>
33
+                    <text>{toolclass.FormatDate(item.createDate)}</text>
34
+                  </view>
35
+                  <view>
36
+                    <text className={item.verifyStatus - 0 === 0 ? '' : item.verifyStatus - 0 === 1 ? 'Green' : 'Red'}>{item.verifyStatus - 0 === 0 ? '审核中' : item.verifyStatus - 0 === 1 ? '审核通过' : '审核未通过'}</text>
37
+                  </view>
38
+                </view>
39
+              </view>
40
+            ))
41
+          }
42
+          <view className='AddBtn'>
43
+            <text onClick={() => { Taro.navigateTo({ url: `/pages/WoDe/YeZhuRenZheng/index` }) }}>添加认证</text>
44
+          </view>
45
+        </view>
46
+      </ScrollPageRefresh>
47
+    </view>
48
+  )
49
+}

+ 88
- 0
src/pages/WoDe/WoDeRenZheng/index.less Visa fil

@@ -0,0 +1,88 @@
1
+.WoDeRenZheng {
2
+  width: 100%;
3
+  height: 100%;
4
+  position: relative;
5
+  background: #f8f8f8;
6
+  overflow: hidden;
7
+
8
+  .Content {
9
+    padding: 0 30px;
10
+    position: relative;
11
+    overflow: hidden;
12
+
13
+    >.ListItem {
14
+      position: relative;
15
+      overflow: hidden;
16
+      margin-bottom: 30px;
17
+      background: #fff;
18
+      border-radius: 10px;
19
+      padding: 20px;
20
+
21
+      &:first-child {
22
+        margin-top: 30px;
23
+      }
24
+
25
+      >text {
26
+        display: block;
27
+        font-size: 28px;
28
+        font-weight: bold;
29
+        color: #000;
30
+        line-height: 40px;
31
+      }
32
+
33
+      >.flex-h {
34
+        align-items: center;
35
+        position: relative;
36
+        overflow: hidden;
37
+        margin-top: 10px;
38
+
39
+        >.flex-item {
40
+          position: relative;
41
+          overflow: hidden;
42
+          margin-right: 10px;
43
+
44
+          >text {
45
+            display: block;
46
+            white-space: nowrap;
47
+            overflow: hidden;
48
+            text-overflow: ellipsis;
49
+            font-size: 24px;
50
+            color: #666;
51
+            line-height: 40px;
52
+          }
53
+        }
54
+
55
+        >view:last-child {
56
+          >text {
57
+            font-size: 28px;
58
+            color: #77A5F0;
59
+
60
+            &.Red {
61
+              color: #F35844;
62
+            }
63
+
64
+            &.Green {
65
+              color: #44d61f;
66
+            }
67
+          }
68
+        }
69
+      }
70
+    }
71
+
72
+    >.AddBtn {
73
+      margin-bottom: 30px;
74
+      position: relative;
75
+      overflow: hidden;
76
+
77
+      >text {
78
+        font-size: 28px;
79
+        color: #fff;
80
+        line-height: 80px;
81
+        border-radius: 80px;
82
+        background: #F35844;
83
+        text-align: center;
84
+        display: block;
85
+      }
86
+    }
87
+  }
88
+}

+ 32
- 16
src/pages/WoDe/YeZhuRenZheng/index.jsx Visa fil

@@ -109,22 +109,38 @@ export default function YeZhuRenZheng () {
109 109
       setDataLock(false)
110 110
       return false
111 111
     }
112
-    request({ ...apis.checkPhoneCode, params: { captcha: PhoneCode, tel: FormData.Phone } }).then(() => {
113
-      request({
114
-        ...apis.addOwnerVerify,
115
-        data: {
116
-          phaseId: Level2List[Level2Value].id,
117
-          buildingId: Level3List[Level3Value].id,
118
-          unitId: Level4List[Level4Value].id,
119
-          levelId: Level5List[Level5Value].id,
120
-          roomNoId: Level6List[Level6Value].id,
121
-          phone: FormData.Phone,
122
-          ownerName: FormData.RealName,
123
-          idCard: FormData.IdCard
124
-        }
125
-      }).then(() => {
126
-        Taro.showToast({ title: '添加认证成功', icon: 'none' })
127
-        setDataLock(false)
112
+    request({  // 校验业主是否认证某房产
113
+      ...apis.checkOwnerVerify,
114
+      params: {
115
+        orgId: user.orgId,
116
+        phaseId: Level2List[Level2Value].id,
117
+        buildingId: Level3List[Level3Value].id,
118
+        unitId: Level4List[Level4Value].id,
119
+        levelId: Level5List[Level5Value].id,
120
+        roomNoId: Level6List[Level6Value].id
121
+      }
122
+    }).then(() => {
123
+      request({ ...apis.checkPhoneCode, params: { captcha: PhoneCode, tel: FormData.Phone } }).then(() => { // 校验验证码
124
+        request({ // 提交认证数据
125
+          ...apis.addOwnerVerify,
126
+          data: {
127
+            phaseId: Level2List[Level2Value].id,
128
+            buildingId: Level3List[Level3Value].id,
129
+            unitId: Level4List[Level4Value].id,
130
+            levelId: Level5List[Level5Value].id,
131
+            roomNoId: Level6List[Level6Value].id,
132
+            phone: FormData.Phone,
133
+            ownerName: FormData.RealName,
134
+            idCard: FormData.IdCard
135
+          }
136
+        }).then((res) => {
137
+          Taro.showToast({ title: '添加认证成功', icon: 'none' })
138
+          Taro.navigateTo({ url: `/pages/WoDe/YeZhuShenHe/index?id=${res.id}` })
139
+          setDataLock(false)
140
+        }).catch((res) => {
141
+          Taro.showToast({ title: res, icon: 'none' })
142
+          setDataLock(false)
143
+        })
128 144
       }).catch((res) => {
129 145
         Taro.showToast({ title: res, icon: 'none' })
130 146
         setDataLock(false)

+ 36
- 0
src/pages/WoDe/YeZhuShenHe/index.css Visa fil

@@ -149,3 +149,39 @@
149 149
   line-height: 84px;
150 150
   text-align: center;
151 151
 }
152
+.YeZhuShenHe .LianXiPopup {
153
+  padding: 0 30px;
154
+  position: relative;
155
+  overflow: visible;
156
+  padding-bottom: 40px;
157
+}
158
+.YeZhuShenHe .LianXiPopup > text {
159
+  width: 100%;
160
+  display: block;
161
+  font-size: 24px;
162
+  color: #999;
163
+  line-height: 40px;
164
+  text-align: center;
165
+  margin-bottom: 30px;
166
+}
167
+.YeZhuShenHe .LianXiPopup > text:first-child {
168
+  font-size: 34px;
169
+  color: #333;
170
+  margin-bottom: 10px;
171
+  margin-top: -30px;
172
+}
173
+.YeZhuShenHe .LianXiPopup > .flex-h {
174
+  border-top: 2px solid rgba(0, 0, 0, 0.08);
175
+}
176
+.YeZhuShenHe .LianXiPopup > .flex-h > text {
177
+  font-size: 30px;
178
+  line-height: 100px;
179
+  color: #77A5F0;
180
+}
181
+.YeZhuShenHe .LianXiPopup > .flex-h > text:first-child {
182
+  color: #333;
183
+}
184
+.YeZhuShenHe .LianXiPopup > .flex-h > text:last-child {
185
+  font-size: 40px;
186
+  margin-left: 10px;
187
+}

+ 47
- 5
src/pages/WoDe/YeZhuShenHe/index.jsx Visa fil

@@ -1,11 +1,37 @@
1
-import React, { useState } from 'react'
1
+import React, { useState, useEffect } from 'react'
2
+import Taro, { Current } from '@tarojs/taro'
3
+import request, { apis } from '@/utils/request'
4
+import { useModel } from '@/store'
5
+import SlidePopup from '@/components/SlidePopup/index'
2 6
 import '@/assets/css/reset.less'
3 7
 import '@/assets/css/iconfont.less'
4 8
 import './index.less'
5 9
 
6
-export default function YeZhuShenHe (props) {
10
+export default function YeZhuShenHe () {
7 11
 
8
-  const [Status, setStatus] = useState(1)
12
+  const { user } = useModel('user')
13
+  const [Status] = useState(1)
14
+  const [CurrnetId] = useState(Current.router.params.id) // 当前id
15
+  const [PhoneList, setPhoneList] = useState([])
16
+  const [ShowPopup, setShowPopup] = useState(false)
17
+  const [Detail, setDetail] = useState(null)
18
+
19
+  useEffect(() => {
20
+    GetDetail()
21
+    GetWuYePhoneList()
22
+  }, [CurrnetId])
23
+
24
+  const GetDetail = () => { // 获取详情
25
+    request({ ...apis.getRenZhengDetail, args: { id: CurrnetId } }).then((res) => {
26
+      setDetail(res)
27
+    })
28
+  }
29
+
30
+  const GetWuYePhoneList = () => { // 获取物业电话
31
+    request({ ...apis.getWuYePhone }).then((res) => {
32
+      setPhoneList(res || [])
33
+    })
34
+  }
9 35
 
10 36
   return (
11 37
     <view className='YeZhuShenHe'>
@@ -90,7 +116,7 @@ export default function YeZhuShenHe (props) {
90 116
         }
91 117
 
92 118
         <view className='OtherTab'>
93
-          <view className='flex-h'>
119
+          <view className='flex-h' onClick={() => { setShowPopup(true) }}>
94 120
             <text className='flex-item'>联系物业</text>
95 121
             <text className='iconfont iconjiantouright'></text>
96 122
           </view>
@@ -98,7 +124,7 @@ export default function YeZhuShenHe (props) {
98 124
             <text className='flex-item'>删除当前资料</text>
99 125
             <text className='iconfont iconjiantouright'></text>
100 126
           </view>
101
-          <view className='flex-h'>
127
+          <view className='flex-h' onClick={() => { Taro.redirectTo({ url: `/pages/WoDe/YeZhuRenZheng/index` }) }}>
102 128
             <text className='flex-item'>关联其他房产</text>
103 129
             <text className='iconfont iconjiantouright'></text>
104 130
           </view>
@@ -115,6 +141,22 @@ export default function YeZhuShenHe (props) {
115 141
           <text>重新认证</text>
116 142
         </view>
117 143
       }
144
+
145
+      <SlidePopup Close={() => { setShowPopup(false) }} Show={ShowPopup}>
146
+        <view className='LianXiPopup'>
147
+          <text>联系物业</text>
148
+          <text>对此费用有疑问</text>
149
+          {
150
+            PhoneList.map((item, index) => (
151
+              <view className='flex-h' key={`PhoneList-${index}`} onClick={() => { Taro.makePhoneCall({ phoneNumber: item.tel }) }}>
152
+                <text className='flex-item'>{item.name}</text>
153
+                <text>{item.tel}</text>
154
+                <text className='iconfont icondianhua'></text>
155
+              </view>
156
+            ))
157
+          }
158
+        </view>
159
+      </SlidePopup>
118 160
     </view>
119 161
   )
120 162
 }

+ 42
- 0
src/pages/WoDe/YeZhuShenHe/index.less Visa fil

@@ -177,4 +177,46 @@
177 177
       text-align: center;
178 178
     }
179 179
   }
180
+  .LianXiPopup {
181
+    padding: 0 30px;
182
+    position: relative;
183
+    overflow: visible;
184
+    padding-bottom: 40px;
185
+
186
+    >text {
187
+      width: 100%;
188
+      display: block;
189
+      font-size: 24px;
190
+      color: #999;
191
+      line-height: 40px;
192
+      text-align: center;
193
+      margin-bottom: 30px;
194
+
195
+      &:first-child {
196
+        font-size: 34px;
197
+        color: #333;
198
+        margin-bottom: 10px;
199
+        margin-top: -30px;
200
+      }
201
+    }
202
+
203
+    >.flex-h {
204
+      border-top: 2px solid rgba(0, 0, 0, 0.08);
205
+
206
+      >text {
207
+        font-size: 30px;
208
+        line-height: 100px;
209
+        color: #77A5F0;
210
+
211
+        &:first-child {
212
+          color: #333;
213
+        }
214
+
215
+        &:last-child {
216
+          font-size: 40px;
217
+          margin-left: 10px;
218
+        }
219
+      }
220
+    }
221
+  }
180 222
 }

+ 11
- 12
src/pages/WoDe/index.jsx Visa fil

@@ -2,19 +2,18 @@ import React, { useState, useEffect } from 'react'
2 2
 import NavHeader from '@/components/NavHeader/index'
3 3
 import Taro from '@tarojs/taro'
4 4
 import request, { apis } from '@/utils/request'
5
-import { store, useModel } from '@/store'
5
+import { useModel } from '@/store'
6 6
 import '@/assets/css/reset.less'
7 7
 import '@/assets/css/iconfont.less'
8 8
 import './index.less'
9 9
 
10
-export default function WoDe (props) {
10
+export default function WoDe () {
11 11
 
12
-  const { setUser } = store.getModel('user').getState()
13
-  const { user } = useModel('user')
12
+  const { user, setUser } = useModel('user')
14 13
   const [IsPull, setIsPull] = useState(false)
15 14
   const [UserTab] = useState([
16
-    { icon: 'iconrenzheng1', name: '业主认证', id: 1, router: '/pages/WoDe/YeZhuRenZheng/index' },
17
-    { icon: 'iconjifenguize', name: '积分明细', id: 2, router: null },
15
+    { icon: 'iconrenzheng1', name: '业主认证', id: 1, router: '/pages/WoDe/WoDeRenZheng/index' },
16
+    { icon: 'iconjifenguize', name: '积分明细', id: 2, router: '/pages/FuLi/JiFenMingXi/index' },
18 17
     { icon: 'iconjiaofei', name: '物业缴费', id: 3, router: null },
19 18
     { icon: 'iconfuwu1', name: '物业服务', id: 4, router: null }
20 19
   ])
@@ -26,12 +25,12 @@ export default function WoDe (props) {
26 25
   const [DataLock, setDataLock] = useState(false)
27 26
 
28 27
   useEffect(() => {
29
-    if (user !== null) {
30
-      request({ ...apis.getOwnerVerifyList }).then(() => {
31
-      }).catch((res) => {
32
-        Taro.showToast({ title: res, icon: 'none' })
33
-      })
34
-    }
28
+    // if (user !== null) {
29
+    //   request({ ...apis.getOwnerVerifyList }).then(() => {
30
+    //   }).catch((res) => {
31
+    //     Taro.showToast({ title: res, icon: 'none' })
32
+    //   })
33
+    // }
35 34
   }, [])
36 35
 
37 36
   const ToSign = () => { // 签到

+ 55
- 2
src/pages/WuYe/GongGaoDetail/index.css Visa fil

@@ -1,6 +1,59 @@
1 1
 .WuYeGongGaoDetail {
2 2
   width: 100%;
3
-  height: 100%;
3
+  min-height: 100%;
4 4
   position: relative;
5
-  background: #f8f8f8;
5
+  background: #fff;
6
+}
7
+.WuYeGongGaoDetail > .Title {
8
+  padding: 30px;
9
+  position: relative;
10
+  overflow: hidden;
11
+}
12
+.WuYeGongGaoDetail > .Title > text {
13
+  display: block;
14
+  font-size: 30px;
15
+  font-weight: bold;
16
+  text-align: center;
17
+  line-height: 40px;
18
+}
19
+.WuYeGongGaoDetail > .flex-h {
20
+  padding: 0 30px;
21
+  align-items: center;
22
+}
23
+.WuYeGongGaoDetail > .flex-h > .flex-item {
24
+  font-size: 0;
25
+  white-space: nowrap;
26
+}
27
+.WuYeGongGaoDetail > .flex-h > .flex-item > text {
28
+  display: inline-block;
29
+  vertical-align: middle;
30
+  font-size: 24px;
31
+  color: #666;
32
+  line-height: 40px;
33
+  margin-right: 10px;
34
+}
35
+.WuYeGongGaoDetail > .flex-h > view:last-child {
36
+  font-size: 0;
37
+  white-space: nowrap;
38
+}
39
+.WuYeGongGaoDetail > .flex-h > view:last-child > text {
40
+  display: inline-block;
41
+  vertical-align: middle;
42
+  font-size: 24px;
43
+  color: #666;
44
+  line-height: 40px;
45
+}
46
+.WuYeGongGaoDetail > .flex-h > view:last-child > text.iconfont {
47
+  font-size: 40px;
48
+  color: #F35844;
49
+  margin-right: 10px;
50
+}
51
+.WuYeGongGaoDetail > .Desc {
52
+  padding: 30px;
53
+  position: relative;
54
+  overflow: hidden;
55
+}
56
+.WuYeGongGaoDetail > .Desc > image {
57
+  width: 100%;
58
+  margin-top: 10px;
6 59
 }

+ 21
- 4
src/pages/WuYe/GongGaoDetail/index.jsx Visa fil

@@ -1,7 +1,9 @@
1 1
 import React, { useState, useEffect } from 'react'
2 2
 import Taro, { Current } from '@tarojs/taro'
3 3
 import request, { apis } from '@/utils/request'
4
+import { RichText } from '@tarojs/components'
4 5
 import { useModel } from '@/store'
6
+import toolclass from '@/utils/toolclass.js'
5 7
 import '@/assets/css/reset.less'
6 8
 import '@/assets/css/iconfont.less'
7 9
 import './index.less'
@@ -9,23 +11,38 @@ import './index.less'
9 11
 export default function WuYeGongGaoDetail () {
10 12
 
11 13
   const { user } = useModel('user')
12
-  const CurrnetId = Current.router.params.id
14
+  const [CurrnetId] = useState(Current.router.params.id)
13 15
   const [DetailInfo, setDetailInfo] = useState(null)
14 16
 
15 17
   useEffect(() => {
16 18
     Init()
17
-  }, [])
19
+  }, [CurrnetId])
18 20
 
19 21
   const Init = () => {
20 22
     request({ ...apis.getGongGaoDetail, args: { orgId: user.orgId }, params: { id: CurrnetId } }).then((res) => {
21
-      console.log(JSON.stringify(res))
22 23
       setDetailInfo(res)
23 24
     })
24 25
   }
25 26
 
26 27
   return (
27 28
     <view className='WuYeGongGaoDetail'>
28
-
29
+      <view className='Title'>
30
+        <text>{DetailInfo === null ? null : DetailInfo.announcementTitle}</text>
31
+      </view>
32
+      <view className='flex-h'>
33
+        <view className='flex-item'>
34
+          <text>{DetailInfo === null ? null : DetailInfo.createUser}</text>
35
+          <text>{DetailInfo === null ? null : toolclass.FormatDate(DetailInfo.createDate)}</text>
36
+        </view>
37
+        <view>
38
+          <text className='iconfont iconguankan'></text>
39
+          <text>{DetailInfo === null ? null : DetailInfo.viewCount}</text>
40
+        </view>
41
+      </view>
42
+      <view className='Desc'>
43
+        <RichText nodes={DetailInfo === null ? null : DetailInfo.announcementContent}></RichText>
44
+        <image mode='widthFix' src={DetailInfo === null ? null : DetailInfo.announcementCarouselImg}></image>
45
+      </view>
29 46
     </view>
30 47
   )
31 48
 }

+ 65
- 2
src/pages/WuYe/GongGaoDetail/index.less Visa fil

@@ -1,6 +1,69 @@
1 1
 .WuYeGongGaoDetail {
2 2
   width: 100%;
3
-  height: 100%;
3
+  min-height: 100%;
4 4
   position: relative;
5
-  background: #f8f8f8;
5
+  background: #fff;
6
+
7
+  >.Title {
8
+    padding: 30px;
9
+    position: relative;
10
+    overflow: hidden;
11
+
12
+    >text {
13
+      display: block;
14
+      font-size: 30px;
15
+      font-weight: bold;
16
+      text-align: center;
17
+      line-height: 40px;
18
+    }
19
+  }
20
+
21
+  >.flex-h {
22
+    padding: 0 30px;
23
+    align-items: center;
24
+
25
+    >.flex-item {
26
+      font-size: 0;
27
+      white-space: nowrap;
28
+
29
+      >text {
30
+        display: inline-block;
31
+        vertical-align: middle;
32
+        font-size: 24px;
33
+        color: #666;
34
+        line-height: 40px;
35
+        margin-right: 10px;
36
+      }
37
+    }
38
+
39
+    >view:last-child {
40
+      font-size: 0;
41
+      white-space: nowrap;
42
+
43
+      >text {
44
+        display: inline-block;
45
+        vertical-align: middle;
46
+        font-size: 24px;
47
+        color: #666;
48
+        line-height: 40px;
49
+
50
+        &.iconfont {
51
+          font-size: 40px;
52
+          color: #F35844;
53
+          margin-right: 10px;
54
+        }
55
+      }
56
+    }
57
+  }
58
+
59
+  >.Desc {
60
+    padding: 30px;
61
+    position: relative;
62
+    overflow: hidden;
63
+
64
+    >image {
65
+      width: 100%;
66
+      margin-top: 10px;
67
+    }
68
+  }
6 69
 }

+ 12
- 0
src/utils/api.js Visa fil

@@ -1,6 +1,14 @@
1 1
 const prefix = `${HOST}/api/wx`
2 2
 
3 3
 const $api = {
4
+  getMessageList: { // 获取小区通知
5
+    method: 'get',
6
+    url: `${prefix}/message/:orgId/news`
7
+  },
8
+  getRenZhengDetail: { // 获取认证详情
9
+    method: 'get',
10
+    url: `${prefix}/user/verify/:id`
11
+  },
4 12
   userSign: { // 用户签到
5 13
     method: 'post',
6 14
     url: `${prefix}/user/signin`
@@ -13,6 +21,10 @@ const $api = {
13 21
     method: 'post',
14 22
     url: `${prefix}/user/verify/add`
15 23
   },
24
+  checkOwnerVerify: { // 校验业主是否认证某房产
25
+    method: 'get',
26
+    url: `${prefix}/building/has`
27
+  },
16 28
   checkPhoneCode: { // 校验手机验证码
17 29
     method: 'post',
18 30
     url: `${prefix}/check/captcha`