xcx vor 4 Jahren
Ursprung
Commit
fad1482068

+ 209
- 0
src/pages/WuYe/BaoXiuDetail/index.css Datei anzeigen

@@ -0,0 +1,209 @@
1
+.BaoXiuDetail {
2
+  width: 100%;
3
+  min-height: 100%;
4
+  position: relative;
5
+  background: #f8f8f8;
6
+}
7
+.BaoXiuDetail > .TopLine {
8
+  width: 100%;
9
+  height: 20px;
10
+  background-color: #f8f8f8;
11
+  background: #f8f8f8;
12
+}
13
+.BaoXiuDetail > .TopInfo {
14
+  padding: 0 30px;
15
+  background: #fff;
16
+  position: relative;
17
+  overflow: hidden;
18
+}
19
+.BaoXiuDetail > .TopInfo > .flex-h {
20
+  align-items: center;
21
+  border-top: 2px solid rgba(0, 0, 0, 0.08);
22
+}
23
+.BaoXiuDetail > .TopInfo > .flex-h:first-child {
24
+  border-top: none;
25
+}
26
+.BaoXiuDetail > .TopInfo > .flex-h:first-child > text:first-child {
27
+  color: #333;
28
+  font-weight: bold;
29
+  font-size: 32px;
30
+}
31
+.BaoXiuDetail > .TopInfo > .flex-h > text {
32
+  font-size: 28px;
33
+  color: #999;
34
+  line-height: 98px;
35
+  white-space: nowrap;
36
+  overflow: hidden;
37
+  text-overflow: ellipsis;
38
+}
39
+.BaoXiuDetail > .TopInfo > .flex-h > text:first-child {
40
+  margin-right: 20px;
41
+}
42
+.BaoXiuDetail > .Detail {
43
+  padding: 0 30px;
44
+  background: #fff;
45
+  position: relative;
46
+  overflow: hidden;
47
+  margin-top: 20px;
48
+  padding-bottom: 40px;
49
+}
50
+.BaoXiuDetail > .Detail > text {
51
+  display: block;
52
+  width: 100%;
53
+  font-size: 30px;
54
+  color: #333;
55
+  font-weight: bold;
56
+  line-height: 98px;
57
+  border-bottom: 2px solid rgba(0, 0, 0, 0.08);
58
+}
59
+.BaoXiuDetail > .Detail > .flex-h {
60
+  margin-top: 40px;
61
+  margin-bottom: 40px;
62
+}
63
+.BaoXiuDetail > .Detail > .flex-h > .Line {
64
+  width: 50px;
65
+  position: relative;
66
+  overflow: visible;
67
+  border-left: 2px dashed #F35844;
68
+}
69
+.BaoXiuDetail > .Detail > .flex-h > .Line > view {
70
+  width: 14px;
71
+  height: 14px;
72
+  background: #F35844;
73
+  border-radius: 100%;
74
+  position: absolute;
75
+  left: -8px;
76
+  top: 30px;
77
+}
78
+.BaoXiuDetail > .Detail > .flex-h > .flex-item {
79
+  position: relative;
80
+  overflow: visible;
81
+  background: rgba(243, 88, 68, 0.08);
82
+  padding: 20px;
83
+}
84
+.BaoXiuDetail > .Detail > .flex-h > .flex-item::after {
85
+  content: '';
86
+  width: 0;
87
+  height: 0;
88
+  display: block;
89
+  position: absolute;
90
+  left: -40px;
91
+  top: 16px;
92
+  border-color: transparent rgba(243, 88, 68, 0.08) transparent transparent;
93
+  border-style: solid dashed solid solid;
94
+  border-width: 20px;
95
+}
96
+.BaoXiuDetail > .Detail > .flex-h > .flex-item > view {
97
+  width: 100%;
98
+  position: relative;
99
+  overflow: hidden;
100
+}
101
+.BaoXiuDetail > .Detail > .flex-h > .flex-item > view > .StepList {
102
+  position: relative;
103
+  overflow: hidden;
104
+  margin-bottom: 40px;
105
+}
106
+.BaoXiuDetail > .Detail > .flex-h > .flex-item > view > .StepList > .Title {
107
+  align-items: center;
108
+}
109
+.BaoXiuDetail > .Detail > .flex-h > .flex-item > view > .StepList > .Title > text {
110
+  font-size: 24px;
111
+  color: #999;
112
+  line-height: 40px;
113
+  overflow: hidden;
114
+  white-space: nowrap;
115
+  text-overflow: ellipsis;
116
+}
117
+.BaoXiuDetail > .Detail > .flex-h > .flex-item > view > .StepList > .Title > text.Red {
118
+  color: #F35844;
119
+}
120
+.BaoXiuDetail > .Detail > .flex-h > .flex-item > view > .StepList > .Title > text.Green {
121
+  color: #14DC05;
122
+}
123
+.BaoXiuDetail > .Detail > .flex-h > .flex-item > view > .StepList > .Title > text.Blue {
124
+  color: #77A5F0;
125
+}
126
+.BaoXiuDetail > .Detail > .flex-h > .flex-item > view > .StepList > .Text {
127
+  font-size: 24px;
128
+  color: #333;
129
+  line-height: 40px;
130
+  margin-top: 10px;
131
+}
132
+.BaoXiuDetail > .Detail > .flex-h > .flex-item > view > .StepList > .Text > text.Blue {
133
+  color: #77A5F0;
134
+}
135
+.BaoXiuDetail > .Detail > .flex-h > .flex-item > view > .StepList > .Text > text.Red {
136
+  color: #F35844;
137
+  font-size: 34px;
138
+}
139
+.BaoXiuDetail > .Detail > .flex-h > .flex-item > view > .StepList > .ImgList {
140
+  font-size: 0;
141
+}
142
+.BaoXiuDetail > .Detail > .flex-h > .flex-item > view > .StepList > .ImgList > view {
143
+  display: inline-block;
144
+  vertical-align: middle;
145
+  width: 136px;
146
+  height: 136px;
147
+  position: relative;
148
+  overflow: hidden;
149
+  margin-top: 12px;
150
+  margin-right: 12px;
151
+  background: #f8f8f8;
152
+}
153
+.BaoXiuDetail > .Detail > .BottomBtn {
154
+  position: relative;
155
+  overflow: hidden;
156
+  margin-top: 30px;
157
+}
158
+.BaoXiuDetail > .Detail > .BottomBtn.active > text {
159
+  color: #fff;
160
+  background: #F35844;
161
+}
162
+.BaoXiuDetail > .Detail > .BottomBtn > text {
163
+  width: 100%;
164
+  display: block;
165
+  text-align: center;
166
+  font-size: 34px;
167
+  line-height: 98px;
168
+  border-radius: 98px;
169
+  color: #F35844;
170
+  background: #fff;
171
+  border: 2px solid #F35844;
172
+  box-sizing: border-box;
173
+}
174
+.BaoXiuDetail .LianXiPopup {
175
+  padding: 0 30px;
176
+  position: relative;
177
+  overflow: visible;
178
+  padding-bottom: 40px;
179
+}
180
+.BaoXiuDetail .LianXiPopup > text {
181
+  width: 100%;
182
+  display: block;
183
+  font-size: 24px;
184
+  color: #999;
185
+  line-height: 40px;
186
+  text-align: center;
187
+  margin-bottom: 30px;
188
+}
189
+.BaoXiuDetail .LianXiPopup > text:first-child {
190
+  font-size: 34px;
191
+  color: #333;
192
+  margin-bottom: 10px;
193
+  margin-top: -30px;
194
+}
195
+.BaoXiuDetail .LianXiPopup > .flex-h {
196
+  border-top: 2px solid rgba(0, 0, 0, 0.08);
197
+}
198
+.BaoXiuDetail .LianXiPopup > .flex-h > text {
199
+  font-size: 30px;
200
+  line-height: 100px;
201
+  color: #77A5F0;
202
+}
203
+.BaoXiuDetail .LianXiPopup > .flex-h > text:first-child {
204
+  color: #333;
205
+}
206
+.BaoXiuDetail .LianXiPopup > .flex-h > text:last-child {
207
+  font-size: 40px;
208
+  margin-left: 10px;
209
+}

+ 24
- 2
src/pages/WuYe/BaoXiuDetail/index.jsx Datei anzeigen

@@ -3,6 +3,7 @@ import Taro, { Current } from '@tarojs/taro'
3 3
 import request, { apis } from '@/utils/request'
4 4
 import { useModel } from '@/store'
5 5
 import toolclass from '@/utils/toolclass.js'
6
+import SlidePopup from '@/components/SlidePopup/index'
6 7
 import '@/assets/css/reset.less'
7 8
 import '@/assets/css/iconfont.less'
8 9
 import './index.less'
@@ -12,14 +13,19 @@ export default function BaoXiuDetail () {
12 13
   const { user } = useModel('user')
13 14
   const CurrnetBaoXiuId = Current.router.params.id
14 15
   const [DetailInfo, setDetailInfo] = useState(null)
16
+  const [PhoneList, setPhoneList] = useState([])
17
+  const [ShowPopup, setShowPopup] = useState(false)
15 18
 
16 19
   useEffect(() => {
17 20
     Init()
18 21
   }, [])
19 22
 
20 23
   const Init = () => {
21
-    request({ ...apis.getGongDanDetail, args: { orgId: user.orgId }, params: { ticketId: CurrnetBaoXiuId } }).then((res) => {
24
+    request({ ...apis.getGongDanDetail, args: { orgId: user.orgId }, params: { ticketId: CurrnetBaoXiuId } }).then((res) => { // 获取工单详情
22 25
       setDetailInfo(res)
26
+      request({ ...apis.getWuYePhone }).then((cRes) => { // 获取物业电话
27
+        setPhoneList(cRes || [])
28
+      })
23 29
     })
24 30
   }
25 31
 
@@ -83,10 +89,26 @@ export default function BaoXiuDetail () {
83 89
 
84 90
         {/* 更多操作 */}
85 91
         <view className='BottomBtn'>
86
-          <text>与物业沟通</text>
92
+          <text onClick={() => { setShowPopup(true) }}>与物业沟通</text>
87 93
         </view>
88 94
       </view>
89 95
 
96
+      <SlidePopup Close={() => { setShowPopup(false) }} Show={ShowPopup}>
97
+        <view className='LianXiPopup'>
98
+          <text>联系物业</text>
99
+          <text>对此费用有疑问</text>
100
+          {
101
+            PhoneList.map((item, index) => (
102
+              <view className='flex-h' key={`PhoneList-${index}`} onClick={() => { Taro.makePhoneCall({ phoneNumber: item.tel }) }}>
103
+                <text className='flex-item'>{item.name}</text>
104
+                <text>{item.tel}</text>
105
+                <text className='iconfont icondianhua'></text>
106
+              </view>
107
+            ))
108
+          }
109
+        </view>
110
+      </SlidePopup>
111
+
90 112
     </view>
91 113
   )
92 114
 }

+ 43
- 0
src/pages/WuYe/BaoXiuDetail/index.less Datei anzeigen

@@ -206,4 +206,47 @@
206 206
       }
207 207
     }
208 208
   }
209
+
210
+  .LianXiPopup {
211
+    padding: 0 30px;
212
+    position: relative;
213
+    overflow: visible;
214
+    padding-bottom: 40px;
215
+
216
+    >text {
217
+      width: 100%;
218
+      display: block;
219
+      font-size: 24px;
220
+      color: #999;
221
+      line-height: 40px;
222
+      text-align: center;
223
+      margin-bottom: 30px;
224
+
225
+      &:first-child {
226
+        font-size: 34px;
227
+        color: #333;
228
+        margin-bottom: 10px;
229
+        margin-top: -30px;
230
+      }
231
+    }
232
+
233
+    >.flex-h {
234
+      border-top: 2px solid rgba(0, 0, 0, 0.08);
235
+
236
+      >text {
237
+        font-size: 30px;
238
+        line-height: 100px;
239
+        color: #77A5F0;
240
+
241
+        &:first-child {
242
+          color: #333;
243
+        }
244
+
245
+        &:last-child {
246
+          font-size: 40px;
247
+          margin-left: 10px;
248
+        }
249
+      }
250
+    }
251
+  }
209 252
 }

+ 4
- 0
src/utils/api.js Datei anzeigen

@@ -45,6 +45,10 @@ const $api = {
45 45
     method: 'get',
46 46
     url: `${prefix}/ticket/schedule/:orgId`
47 47
   },
48
+  getWuYePhone: { // 获取物业电话
49
+    method: 'get',
50
+    url: `${prefix}/tels`
51
+  },
48 52
   getGongGaoList: { // 获取小区公告列表
49 53
     method: 'get',
50 54
     url: `${prefix}/announcements/:orgId`