xcx 4 vuotta sitten
vanhempi
commit
240127c267

+ 2
- 2
config/dev.js Näytä tiedosto

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

+ 1
- 1
project.config.json Näytä tiedosto

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

+ 11
- 2
src/assets/css/iconfont.css
File diff suppressed because it is too large
Näytä tiedosto


+ 18
- 6
src/assets/css/iconfont.less
File diff suppressed because it is too large
Näytä tiedosto


+ 1
- 1
src/components/CustomHeader/index.jsx Näytä tiedosto

@@ -18,7 +18,7 @@ export default function CustomHeader (props) {
18 18
   }
19 19
 
20 20
   return (
21
-    <view className='CustomHeader' style={{ background: BgColor, position: IsFixed ? 'absolute' : 'relative' }}>
21
+    <view className='CustomHeader' style={{ background: BgColor, position: IsFixed ? 'fixed' : 'relative' }}>
22 22
       <text className='iconfont iconjiantouleft Back' style={{ top: `${MarginTop}px`, lineHeight: `${LineHeight}px` }} onClick={() => { Taro.navigateBack() }}></text>
23 23
       <text className='Title' style={{ marginTop: `${MarginTop}px`, lineHeight: `${LineHeight}px` }}>{Title}</text>
24 24
     </view>

+ 63
- 3
src/components/WuYeFuWu/index.css Näytä tiedosto

@@ -3,6 +3,55 @@
3 3
   height: 100%;
4 4
   position: relative;
5 5
   overflow: hidden;
6
+  background-color: #f2f2f2;
7
+}
8
+.WuYeFuWu .TypeList {
9
+  padding-right: 60px;
10
+  font-size: 0;
11
+}
12
+.WuYeFuWu .TypeList > view {
13
+  display: inline-block;
14
+  vertical-align: middle;
15
+  position: relative;
16
+  overflow: hidden;
17
+  margin-left: 60px;
18
+  margin-top: 30px;
19
+  width: calc((100% - 180px) / 3);
20
+}
21
+.WuYeFuWu .TypeList > view > view {
22
+  position: relative;
23
+  overflow: hidden;
24
+  background: #fff;
25
+  width: 100%;
26
+  padding-bottom: 100%;
27
+}
28
+.WuYeFuWu .TypeList > view > view > view {
29
+  width: 100%;
30
+}
31
+.WuYeFuWu .TypeList > view > view > view > .Icon {
32
+  width: 80px;
33
+  height: 80px;
34
+  position: relative;
35
+  overflow: hidden;
36
+  margin: 0 auto;
37
+}
38
+.WuYeFuWu .TypeList > view > view > view > .Icon image {
39
+  width: 100%;
40
+  height: 100%;
41
+}
42
+.WuYeFuWu .TypeList > view > view > view > .Icon text {
43
+  font-size: 70px;
44
+  color: #F35844;
45
+  display: block;
46
+  text-align: center;
47
+}
48
+.WuYeFuWu .TypeList > view > view > view > .Name text {
49
+  display: block;
50
+  text-align: center;
51
+  font-size: 28px;
52
+  color: #333;
53
+  line-height: 40px;
54
+  margin-top: 10px;
6 55
 }
7 56
 .WuYeFuWu .BigImg {
8 57
   width: 100%;
@@ -75,6 +124,20 @@
75 124
 .WuYeFuWu .BanShiZhiNan > .flex-h > .flex-item > text:first-child {
76 125
   margin-top: 0;
77 126
 }
127
+.WuYeFuWu .ListTitle {
128
+  position: relative;
129
+  overflow: hidden;
130
+  padding: 0 30px;
131
+  margin-top: 30px;
132
+  background: #fff;
133
+}
134
+.WuYeFuWu .ListTitle > text {
135
+  display: block;
136
+  font-size: 32px;
137
+  font-weight: bold;
138
+  color: #333;
139
+  line-height: 100px;
140
+}
78 141
 .WuYeFuWu .List {
79 142
   position: relative;
80 143
   overflow: hidden;
@@ -85,6 +148,3 @@
85 148
   overflow: hidden;
86 149
   margin-bottom: 30px;
87 150
 }
88
-.WuYeFuWu .List > view:first-child {
89
-  margin-top: 30px;
90
-}

+ 45
- 27
src/components/WuYeFuWu/index.jsx Näytä tiedosto

@@ -22,7 +22,7 @@ export default function WuYeFuWu () {
22 22
   useEffect(() => {
23 23
     GetBanner()
24 24
 
25
-    request({...apis.getTpNewsList, params: {pageSize: 999}}).then(res => setTypeList(res || []))
25
+    request({ ...apis.getTpNewsList, params: { pageSize: 999 } }).then(res => setTypeList(res || []))
26 26
   }, [])
27 27
 
28 28
   const GetBanner = (done = () => { }) => { // 获取轮播图
@@ -58,9 +58,9 @@ export default function WuYeFuWu () {
58 58
           }
59 59
         </view>
60 60
 
61
-        <view style={{display: 'flex', justifyContent: 'space-between'}}>
62
-          <IconBlock title="办事指南" />
63
-          <IconBlock title="政策法规" />
61
+        <view style={{ display: 'flex', justifyContent: 'space-between' }}>
62
+          <IconBlock title='办事指南' />
63
+          <IconBlock title='政策法规' />
64 64
         </view>
65 65
 
66 66
         {/* 物业办事指南 */}
@@ -82,9 +82,8 @@ export default function WuYeFuWu () {
82 82
   return (
83 83
     <view className='WuYeFuWu'>
84 84
       <ScrollPageRefresh
85
-        KeepChildren
86 85
         IsEmpty={IsEmpty}
87
-        ApiName={`getWuYeFuWuList`}
86
+        ApiName='getWuYeFuWuList'
88 87
         Refresh={Refresh}
89 88
         Push={Push}
90 89
         KeepChildren={
@@ -97,32 +96,51 @@ export default function WuYeFuWu () {
97 96
               }
98 97
             </view>
99 98
 
100
-            {/* 物业办事指南 */}
101
-            {/* <view className='BanShiZhiNan'>
102
-              <text>物业办事指南</text>
103
-              <view className='flex-h'>
104
-                <view className='Line'><view></view></view>
105
-                <view className='flex-item'>
106
-                  <text>1、业主收楼手续办理</text>
107
-                  <text>2、物业转名手续办理</text>
108
-                  <text>3、业主卡、住户卡办理</text>
99
+            <view className='TypeList'>
100
+              {/* <view>
101
+                <view onClick={() => { Taro.navigateTo({ url: `/pages/WuYe/ShengHuoGuanJia/index` }) }}>
102
+                  <view className='centerLabel'>
103
+                    <view className='Icon'>
104
+                      <text className='iconfont iconguanjia'></text>
105
+                    </view>
106
+                    <view className='Name'>
107
+                      <text>生活管家</text>
108
+                    </view>
109
+                  </view>
109 110
                 </view>
110
-              </view>
111
-            </view> */}
112
-            
113
-            <view className="fw-icon-row">
111
+              </view> */}
112
+              {/* <view>
113
+                <view>
114
+                  <view className='centerLabel'>
115
+                    <view className='Icon'>
116
+                      <text className='iconfont icongonggongfuwu'></text>
117
+                    </view>
118
+                    <view className='Name'>
119
+                      <text>公共服务</text>
120
+                    </view>
121
+                  </view>
122
+                </view>
123
+              </view> */}
114 124
               {
115
-                typeList.map((it, ix) => (
116
-                  <IconBlock
117
-                    key={it.newsTypeId}
118
-                    title={it.newsTypeName}
119
-                    icon={it.newsTypeImg}
120
-                    style={ix > 2 ? {marginTop: '20rpx'} : {}}
121
-                    onClick={() => setNewsTypeId(it.newsTypeId)}
122
-                  />
125
+                typeList.map((item, index) => (
126
+                  <view key={`TypeList-${index}`}>
127
+                    <view onClick={() => { Taro.navigateTo({ url: `/pages/WuYe/FuWuList/index?type=${item.newsTypeId}&name=${item.newsTypeName}` }) }}>
128
+                      <view className='centerLabel'>
129
+                        <view className='Icon'>
130
+                          <image mode='aspectFit' src={item.newsTypeImg}></image>
131
+                        </view>
132
+                        <view className='Name'>
133
+                          <text>{item.newsTypeName}</text>
134
+                        </view>
135
+                      </view>
136
+                    </view>
137
+                  </view>
123 138
                 ))
124 139
               }
125 140
             </view>
141
+            <view className='ListTitle'>
142
+              <text>热门信息</text>
143
+            </view>
126 144
           </view>
127 145
         }
128 146
       >

+ 78
- 8
src/components/WuYeFuWu/index.less Näytä tiedosto

@@ -5,11 +5,64 @@
5 5
   overflow: hidden;
6 6
   background-color: #f2f2f2;
7 7
 
8
-  .fw-icon-row {
9
-    display: flex;
10
-    justify-content: space-around;
11
-    flex-wrap: wrap;
12
-    margin-top: 45rpx;
8
+  .TypeList {
9
+    padding-right: 60px;
10
+    font-size: 0;
11
+
12
+    >view {
13
+      display: inline-block;
14
+      vertical-align: middle;
15
+      position: relative;
16
+      overflow: hidden;
17
+      margin-left: 60px;
18
+      margin-top: 30px;
19
+      width: calc((100% - 180px) / 3);
20
+
21
+      >view {
22
+        position: relative;
23
+        overflow: hidden;
24
+        background: #fff;
25
+        width: 100%;
26
+        padding-bottom: 100%;
27
+
28
+        >view {
29
+          width: 100%;
30
+
31
+          >.Icon {
32
+            width: 80px;
33
+            height: 80px;
34
+            position: relative;
35
+            overflow: hidden;
36
+            margin: 0 auto;
37
+
38
+            image {
39
+              width: 100%;
40
+              height: 100%;
41
+            }
42
+
43
+            text {
44
+              font-size: 70px;
45
+              color: #F35844;
46
+              display: block;
47
+              text-align: center;
48
+            }
49
+          }
50
+
51
+          >.Name {
52
+            text {
53
+              display: block;
54
+              text-align: center;
55
+              font-size: 28px;
56
+              color: #333;
57
+              line-height: 40px;
58
+              margin-top: 10px;
59
+            }
60
+          }
61
+        }
62
+      }
63
+
64
+
65
+    }
13 66
   }
14 67
 
15 68
   .BigImg {
@@ -85,6 +138,7 @@
85 138
           color: #333;
86 139
           line-height: 40px;
87 140
           margin-top: 10px;
141
+
88 142
           &:first-child {
89 143
             margin-top: 0;
90 144
           }
@@ -94,6 +148,22 @@
94 148
 
95 149
   }
96 150
 
151
+  .ListTitle {
152
+    position: relative;
153
+    overflow: hidden;
154
+    padding: 0 30px;
155
+    margin-top: 30px;
156
+    background: #fff;
157
+
158
+    >text {
159
+      display: block;
160
+      font-size: 32px;
161
+      font-weight: bold;
162
+      color: #333;
163
+      line-height: 100px;
164
+    }
165
+  }
166
+
97 167
   .List {
98 168
     position: relative;
99 169
     overflow: hidden;
@@ -104,9 +174,9 @@
104 174
       overflow: hidden;
105 175
       margin-bottom: 30px;
106 176
 
107
-      &:first-child {
108
-        margin-top: 30px;
109
-      }
177
+      // &:first-child {
178
+      //   margin-top: 30px;
179
+      // }
110 180
     }
111 181
   }
112 182
 }

+ 44
- 0
src/components/WuYeFuWuListItem/index.css Näytä tiedosto

@@ -0,0 +1,44 @@
1
+.WuYeFuWuListItem {
2
+  align-items: flex-start;
3
+  padding: 30px 0;
4
+  border-bottom: 2px solid rgba(0, 0, 0, 0.08);
5
+}
6
+.WuYeFuWuListItem > .Img {
7
+  width: 110px;
8
+  height: 88px;
9
+  position: relative;
10
+  overflow: hidden;
11
+  background: #eee;
12
+  margin-right: 20px;
13
+}
14
+.WuYeFuWuListItem > .Img > image {
15
+  width: 100%;
16
+  height: 100%;
17
+}
18
+.WuYeFuWuListItem > .flex-item {
19
+  position: relative;
20
+  overflow: hidden;
21
+}
22
+.WuYeFuWuListItem > .flex-item > text {
23
+  display: block;
24
+  font-size: 28px;
25
+  line-height: 40px;
26
+  color: #333;
27
+  overflow: hidden;
28
+  text-overflow: ellipsis;
29
+  display: -webkit-box;
30
+  -webkit-box-orient: vertical;
31
+  -webkit-line-clamp: 2;
32
+}
33
+.WuYeFuWuListItem > .flex-item > view {
34
+  font-size: 0;
35
+  white-space: nowrap;
36
+}
37
+.WuYeFuWuListItem > .flex-item > view > text {
38
+  display: inline-block;
39
+  vertical-align: middle;
40
+  margin-right: 20px;
41
+  color: #666;
42
+  font-size: 20px;
43
+  line-height: 40px;
44
+}

+ 26
- 0
src/components/WuYeFuWuListItem/index.jsx Näytä tiedosto

@@ -0,0 +1,26 @@
1
+import React, { useState } from 'react'
2
+import toolclass from '@/utils/toolclass.js'
3
+import Taro from '@tarojs/taro'
4
+import '@/assets/css/reset.less'
5
+import '@/assets/css/iconfont.less'
6
+import './index.less'
7
+
8
+export default function WuYeFuWuListItem (props) {
9
+
10
+  const { Data = null } = props
11
+
12
+  return (
13
+    <view className='WuYeFuWuListItem flex-h' onClick={() => { Taro.navigateTo({ url: `/pages/WuYe/FuWuDetail/index?id=${Data.newsId}` }) }}>
14
+      <view className='Img'>
15
+        <image mode='aspectFill' src={Data.newsImg}></image>
16
+      </view>
17
+      <view className='flex-item'>
18
+        <text>{Data.newsName}</text>
19
+        <view>
20
+          {/* <text>沪房更新(2020)87号</text> */}
21
+          <text>{toolclass.FormatDate(Data.createDate)}</text>
22
+        </view>
23
+      </view>
24
+    </view>
25
+  )
26
+}

+ 50
- 0
src/components/WuYeFuWuListItem/index.less Näytä tiedosto

@@ -0,0 +1,50 @@
1
+.WuYeFuWuListItem {
2
+  align-items: flex-start;
3
+  padding: 30px 0;
4
+  border-bottom: 2px solid rgba(0, 0, 0, 0.08);
5
+
6
+  >.Img {
7
+    width: 110px;
8
+    height: 88px;
9
+    position: relative;
10
+    overflow: hidden;
11
+    background: #eee;
12
+    margin-right: 20px;
13
+
14
+    >image {
15
+      width: 100%;
16
+      height: 100%;
17
+    }
18
+  }
19
+
20
+  >.flex-item {
21
+    position: relative;
22
+    overflow: hidden;
23
+
24
+    >text {
25
+      display: block;
26
+      font-size: 28px;
27
+      line-height: 40px;
28
+      color: #333;
29
+      overflow: hidden;
30
+      text-overflow: ellipsis;
31
+      display: -webkit-box;
32
+      -webkit-box-orient: vertical;
33
+      -webkit-line-clamp: 2;
34
+    }
35
+
36
+    >view {
37
+      font-size: 0;
38
+      white-space: nowrap;
39
+
40
+      >text {
41
+        display: inline-block;
42
+        vertical-align: middle;
43
+        margin-right: 20px;
44
+        color: #666;
45
+        font-size: 20px;
46
+        line-height: 40px;
47
+      }
48
+    }
49
+  }
50
+}

+ 9
- 0
src/pages.js Näytä tiedosto

@@ -39,6 +39,15 @@ const Property = [
39 39
       eventType: 'property',
40 40
     }
41 41
   },
42
+  {
43
+    name: '物业-服务分类列表',
44
+    page: 'pages/WuYe/FuWuList/index',
45
+    auth: ['avatar', 'phone', 'yezhu'],
46
+    track: {
47
+      event: 'list',
48
+      eventType: 'property',
49
+    }
50
+  },
42 51
   {
43 52
     name: '物业-服务详情',
44 53
     page: 'pages/WuYe/FuWuDetail/index',

+ 310
- 0
src/pages/ShouYe/index.css Näytä tiedosto

@@ -0,0 +1,310 @@
1
+.ShouYe {
2
+  width: 100%;
3
+  height: 100%;
4
+  overflow: hidden;
5
+  background: #f0f0f0;
6
+}
7
+.ShouYe > view {
8
+  position: relative;
9
+}
10
+.ShouYe > view.flex-item {
11
+  position: relative;
12
+  overflow: hidden;
13
+}
14
+.ShouYe > view.flex-item > .PageContainer {
15
+  width: 100%;
16
+  position: relative;
17
+  z-index: 2;
18
+  height: 100%;
19
+  overflow: hidden;
20
+  z-index: 1;
21
+}
22
+.ShouYe > view.flex-item > .PageContainer .Content {
23
+  position: relative;
24
+  overflow: hidden;
25
+}
26
+.ShouYe > view.flex-item > .PageContainer .Content > view {
27
+  position: relative;
28
+  z-index: 2;
29
+}
30
+.ShouYe > view.flex-item > .PageContainer .Content > view.TopBg {
31
+  width: 100%;
32
+  position: absolute;
33
+  left: 0;
34
+  top: 0;
35
+  padding-bottom: 50%;
36
+  border-radius: 0 0 100px 100px;
37
+  background-image: linear-gradient(#f35844, #ff8d61);
38
+  z-index: 1;
39
+}
40
+.ShouYe > view.flex-item > .PageContainer .Content > view > .Welcome {
41
+  display: block;
42
+  font-size: 30px;
43
+  color: #fff;
44
+  text-indent: 30px;
45
+  margin-bottom: 20px;
46
+}
47
+.ShouYe > view.flex-item > .PageContainer .Content > view > .BannerContainer {
48
+  padding: 0 30px;
49
+  position: relative;
50
+  overflow: hidden;
51
+}
52
+.ShouYe > view.flex-item > .PageContainer .Content > view > .BannerContainer > view {
53
+  width: 100%;
54
+  position: relative;
55
+  overflow: hidden;
56
+  padding-bottom: 50%;
57
+  background: #f8f8f8;
58
+  border-radius: 16rpx;
59
+  height: 0;
60
+}
61
+.ShouYe > view.flex-item > .PageContainer .Content > view > .BannerContainer > view > view {
62
+  width: 100%;
63
+  position: absolute;
64
+  left: 0;
65
+  top: 0;
66
+  bottom: 0;
67
+  overflow: hidden;
68
+}
69
+.ShouYe > view.flex-item > .PageContainer .Content > view > .BannerContainer > view > view > .BannerSwiper {
70
+  width: 100%;
71
+  height: 100%;
72
+  position: relative;
73
+  overflow: hidden;
74
+  border-radius: 16rpx;
75
+}
76
+.ShouYe > view.flex-item > .PageContainer .Content > view > .BannerContainer > view > view > .BannerSwiper .BannerItem {
77
+  width: 100%;
78
+  height: 100%;
79
+  position: relative;
80
+  overflow: hidden;
81
+  border-radius: 16rpx;
82
+}
83
+.ShouYe > view.flex-item > .PageContainer .Content > view > .BannerContainer > view > view > .BannerSwiper .BannerItem image {
84
+  width: 100%;
85
+  height: 100%;
86
+}
87
+.ShouYe > view.flex-item > .PageContainer .Content > view > .NavContainer {
88
+  position: relative;
89
+  overflow: hidden;
90
+  align-items: center;
91
+  padding: 0 30px;
92
+  margin-top: 30px;
93
+}
94
+.ShouYe > view.flex-item > .PageContainer .Content > view > .NavContainer > view {
95
+  margin-left: 30px;
96
+  position: relative;
97
+  overflow: hidden;
98
+}
99
+.ShouYe > view.flex-item > .PageContainer .Content > view > .NavContainer > view:first-child {
100
+  margin-left: 0;
101
+}
102
+.ShouYe > view.flex-item > .PageContainer .Content > view > .NavContainer > view:nth-child(1) > view > view > text:first-child {
103
+  color: #ffc412;
104
+}
105
+.ShouYe > view.flex-item > .PageContainer .Content > view > .NavContainer > view:nth-child(2) > view > view > text:first-child {
106
+  color: #fb3fc8;
107
+}
108
+.ShouYe > view.flex-item > .PageContainer .Content > view > .NavContainer > view:nth-child(3) > view > view > text:first-child {
109
+  color: #fb7820;
110
+}
111
+.ShouYe > view.flex-item > .PageContainer .Content > view > .NavContainer > view:nth-child(4) > view > view > text:first-child {
112
+  color: #586ff8;
113
+}
114
+.ShouYe > view.flex-item > .PageContainer .Content > view > .NavContainer > view > view {
115
+  width: 100%;
116
+  padding-bottom: 100%;
117
+  background: #fff;
118
+  position: relative;
119
+  overflow: hidden;
120
+  border-radius: 12px;
121
+}
122
+.ShouYe > view.flex-item > .PageContainer .Content > view > .NavContainer > view > view > view {
123
+  width: 100%;
124
+}
125
+.ShouYe > view.flex-item > .PageContainer .Content > view > .NavContainer > view > view > view > text {
126
+  display: block;
127
+  text-align: center;
128
+  line-height: 40px;
129
+  color: #333;
130
+  font-size: 26px;
131
+}
132
+.ShouYe > view.flex-item > .PageContainer .Content > view > .NavContainer > view > view > view > text:first-child {
133
+  font-size: 64px;
134
+  line-height: 60px;
135
+  margin-bottom: 10px;
136
+}
137
+.ShouYe > view.flex-item > .PageContainer .Content > view > .HotActivityContainer {
138
+  padding: 0 30px;
139
+  position: relative;
140
+  overflow: hidden;
141
+  margin-top: 30px;
142
+}
143
+.ShouYe > view.flex-item > .PageContainer .Content > view > .HotActivityContainer > view {
144
+  width: 100%;
145
+  position: relative;
146
+  overflow: hidden;
147
+  border-radius: 24rpx;
148
+  background: #fff;
149
+}
150
+.ShouYe > view.flex-item > .PageContainer .Content > view > .HotActivityContainer > view > .Title {
151
+  font-size: 0;
152
+  white-space: nowrap;
153
+  text-align: center;
154
+  padding: 30px 0;
155
+}
156
+.ShouYe > view.flex-item > .PageContainer .Content > view > .HotActivityContainer > view > .Title > text {
157
+  display: inline-block;
158
+  vertical-align: middle;
159
+  font-size: 24px;
160
+  color: #999;
161
+}
162
+.ShouYe > view.flex-item > .PageContainer .Content > view > .HotActivityContainer > view > .Title > text:first-child {
163
+  font-size: 34px;
164
+  color: #333;
165
+  line-height: 40px;
166
+  margin-right: 20px;
167
+}
168
+.ShouYe > view.flex-item > .PageContainer .Content > view > .HotActivityContainer > view > .Activity {
169
+  width: 100%;
170
+  padding-bottom: 33.33%;
171
+  position: relative;
172
+  overflow: hidden;
173
+}
174
+.ShouYe > view.flex-item > .PageContainer .Content > view > .HotActivityContainer > view > .Activity > image {
175
+  width: 100%;
176
+  height: 100%;
177
+}
178
+.ShouYe > view.flex-item > .PageContainer .Content > view > .OwnerContainer {
179
+  padding: 0 30px;
180
+  position: relative;
181
+  overflow: hidden;
182
+  margin-top: 30px;
183
+}
184
+.ShouYe > view.flex-item > .PageContainer .Content > view > .OwnerContainer > view {
185
+  width: 100%;
186
+  position: relative;
187
+  overflow: hidden;
188
+  border-radius: 24rpx;
189
+  background: #fff;
190
+}
191
+.ShouYe > view.flex-item > .PageContainer .Content > view > .OwnerContainer > view > .Title {
192
+  font-size: 0;
193
+  white-space: nowrap;
194
+  text-align: center;
195
+  padding: 30px 0;
196
+}
197
+.ShouYe > view.flex-item > .PageContainer .Content > view > .OwnerContainer > view > .Title > text {
198
+  display: inline-block;
199
+  vertical-align: middle;
200
+  font-size: 24px;
201
+  color: #999;
202
+}
203
+.ShouYe > view.flex-item > .PageContainer .Content > view > .OwnerContainer > view > .Title > text:first-child {
204
+  font-size: 34px;
205
+  color: #333;
206
+  line-height: 40px;
207
+  margin-right: 20px;
208
+}
209
+.ShouYe > view.flex-item > .PageContainer .Content > view > .OwnerContainer > view > .OwnerListContent {
210
+  position: relative;
211
+  width: 100%;
212
+}
213
+.ShouYe > view.flex-item > .PageContainer .Content > view > .OwnerContainer > view > .OwnerListContent .OwnerList {
214
+  border-top: 2px solid #f8f8f8;
215
+  white-space: nowrap;
216
+  font-size: 0;
217
+  padding: 30px 0;
218
+}
219
+.ShouYe > view.flex-item > .PageContainer .Content > view > .OwnerContainer > view > .OwnerListContent .OwnerList > view {
220
+  display: inline-block;
221
+  vertical-align: middle;
222
+  width: 25%;
223
+  position: relative;
224
+}
225
+.ShouYe > view.flex-item > .PageContainer .Content > view > .OwnerContainer > view > .OwnerListContent .OwnerList > view text {
226
+  display: block;
227
+  width: 100%;
228
+  text-align: center;
229
+  font-size: 26px;
230
+  color: #333;
231
+  line-height: 40px;
232
+}
233
+.ShouYe > view.flex-item > .PageContainer .Content > view > .OwnerContainer > view > .OwnerListContent .OwnerList > view text.iconfont {
234
+  color: #f35844;
235
+  font-size: 60px;
236
+  line-height: 70px;
237
+  margin-bottom: 10px;
238
+}
239
+.ShouYe > view.flex-item > .PageContainer .Content > view > .NewsContainer {
240
+  padding: 0 30px;
241
+  position: relative;
242
+  overflow: hidden;
243
+  margin-top: 30px;
244
+}
245
+.ShouYe > view.flex-item > .PageContainer .Content > view > .NewsContainer > view {
246
+  position: relative;
247
+  overflow: hidden;
248
+  background: #fff;
249
+  border-radius: 24rpx;
250
+}
251
+.ShouYe > view.flex-item > .PageContainer .Content > view > .NewsContainer > view > .Title {
252
+  align-items: center;
253
+  padding: 0 20px;
254
+}
255
+.ShouYe > view.flex-item > .PageContainer .Content > view > .NewsContainer > view > .Title > text {
256
+  font-size: 24px;
257
+  color: #666;
258
+  line-height: 98px;
259
+  margin-left: 10px;
260
+}
261
+.ShouYe > view.flex-item > .PageContainer .Content > view > .NewsContainer > view > .Title > text:first-child {
262
+  font-size: 30px;
263
+  color: #333;
264
+}
265
+.ShouYe > view.flex-item > .PageContainer .Content > view > .NewsContainer > view > .List > view {
266
+  align-items: center;
267
+  border-top: 2px solid #f8f8f8;
268
+  padding: 30px 20px;
269
+  position: relative;
270
+  overflow: hidden;
271
+}
272
+.ShouYe > view.flex-item > .PageContainer .Content > view > .NewsContainer > view > .List > view:first-child {
273
+  border-top: none;
274
+}
275
+.ShouYe > view.flex-item > .PageContainer .Content > view > .NewsContainer > view > .List > view > .Img {
276
+  width: 160px;
277
+  height: 128px;
278
+  position: relative;
279
+  overflow: hidden;
280
+  background: #f8f8f8;
281
+  margin-right: 20px;
282
+}
283
+.ShouYe > view.flex-item > .PageContainer .Content > view > .NewsContainer > view > .List > view > .Img > image {
284
+  width: 100%;
285
+  height: 100%;
286
+}
287
+.ShouYe > view.flex-item > .PageContainer .Content > view > .NewsContainer > view > .List > view > .flex-item {
288
+  position: relative;
289
+  overflow: hidden;
290
+}
291
+.ShouYe > view.flex-item > .PageContainer .Content > view > .NewsContainer > view > .List > view > .flex-item > view text {
292
+  display: block;
293
+  font-size: 26px;
294
+  color: #666;
295
+  line-height: 40px;
296
+}
297
+.ShouYe > view.flex-item > .PageContainer .Content > view > .NewsContainer > view > .List > view > .flex-item > view:first-child text {
298
+  font-size: 30px;
299
+  color: #333;
300
+  margin-bottom: 10px;
301
+}
302
+.ShouYe > view.flex-item > .PageContainer .Content > view > .NewsContainer > view > .List > view > .flex-item > view:last-child text {
303
+  white-space: nowrap;
304
+  overflow: hidden;
305
+  text-overflow: ellipsis;
306
+}
307
+.ShouYe > view.flex-item > .PageContainer .Content > view > .PageBottom {
308
+  width: 100%;
309
+  height: 30px;
310
+}

+ 20
- 15
src/pages/ShouYe/index.jsx Näytä tiedosto

@@ -21,7 +21,8 @@ export default function Index (props) {
21 21
     { icon: 'iconjiaofei', name: '物业缴费', id: 1, router: '/pages/WuYe/index', setName: 'WuYeNavId', setValue: '4', isTab: true },
22 22
     { icon: 'icontongzhi', name: '物业通知', id: 2, router: '/pages/WuYe/index', setName: 'WuYeNavId', setValue: '1', isTab: true },
23 23
     { icon: 'iconbaoxiu', name: '物业报修', id: 3, router: '/pages/WuYe/index', setName: 'WuYeNavId', setValue: '3', isTab: true },
24
-    { icon: 'iconrenzheng', name: '业主认证', id: 4, router: '/pages/WoDe/WoDeRenZheng/index', isTab: false }
24
+    { icon: 'iconrenzheng', name: '业主认证', id: 4, router: '/pages/WoDe/WoDeRenZheng/index', isTab: false },
25
+    { icon: 'iconguanjia', name: '生活管家', id: 5, router: '/pages/WuYe/ShengHuoGuanJia/index', isTab: false }
25 26
   ])
26 27
   const [NavList] = useState([
27 28
     { icon: 'iconhuodong1', name: '活动', id: 1, router: '/pages/ShouYe/HuoDong/index', isTab: false },
@@ -89,9 +90,9 @@ export default function Index (props) {
89 90
   //   })
90 91
   // }
91 92
 
92
-  const GetPropagandaList = (done = () => {}) => {
93
+  const GetPropagandaList = (done = () => { }) => {
93 94
     setPropagandaList([])
94
-    request({...apis.getIndexAdv, params: {pageNum: 1, pageSize: 1, showType: 'propaganda'}}).then(res => {
95
+    request({ ...apis.getIndexAdv, params: { pageNum: 1, pageSize: 1, showType: 'propaganda' } }).then(res => {
95 96
       setPropagandaList([...(res || [])])
96 97
       done()
97 98
     }).catch(() => done())
@@ -179,7 +180,7 @@ export default function Index (props) {
179 180
                           {
180 181
                             BannerList.map((item, index) => (
181 182
                               <SwiperItem className='SwiperItem' key={`Banner-${index}`}>
182
-                                <view className='BannerItem' onClick={() => nav2detail({type: item.contentType, id: item.targetId})}>
183
+                                <view className='BannerItem' onClick={() => nav2detail({ type: item.contentType, id: item.targetId })}>
183 184
                                   <image mode='aspectFill' src={item.image}></image>
184 185
                                 </view>
185 186
                               </SwiperItem>
@@ -212,16 +213,20 @@ export default function Index (props) {
212 213
                       <view className='Title'>
213 214
                         <Text>业主专区</Text>
214 215
                       </view>
215
-                      <view className='OwnerList flex-h'>
216
-                        {
217
-                          OwnerList.map((item, index) => (
218
-                            <view className='flex-item' key={`Owners-${index}`} onClick={OwnerClick(item)}>
219
-                              <Text className={`iconfont ${item.icon}`}></Text>
220
-                              <Text>{item.name}</Text>
221
-                            </view>
222
-                          ))
223
-                        }
224
-                      </view>
216
+                      <scroll-view className='OwnerListContent' scroll-x='true'>
217
+                        <view className='OwnerList'>
218
+                          {
219
+                            OwnerList.map((item, index) => (
220
+                              <view key={`Owners-${index}`} onClick={OwnerClick(item)}>
221
+                                <Text className={`iconfont ${item.icon}`}></Text>
222
+                                <view>
223
+                                  <Text>{item.name}</Text>
224
+                                </view>
225
+                              </view>
226
+                            ))
227
+                          }
228
+                        </view>
229
+                      </scroll-view>
225 230
                     </view>
226 231
                   </view>
227 232
 
@@ -233,7 +238,7 @@ export default function Index (props) {
233 238
                         {/* <view className='Title'>
234 239
                           <Text>热门推荐</Text>
235 240
                         </view> */}
236
-                        <view className='Activity' onClick={() => nav2detail({type: propagandaList[0].contentType, id: propagandaList[0].targetId})}>
241
+                        <view className='Activity' onClick={() => nav2detail({ type: propagandaList[0].contentType, id: propagandaList[0].targetId })}>
237 242
                           <image className='centerLabel' mode='aspectFill' src={propagandaList[0].image}></image>
238 243
                         </view>
239 244
                       </view>

+ 29
- 18
src/pages/ShouYe/index.less Näytä tiedosto

@@ -1,4 +1,3 @@
1
-
2 1
 @radius-large: 24rpx;
3 2
 @radius-middle: 16rpx;
4 3
 
@@ -275,29 +274,41 @@
275 274
                   }
276 275
                 }
277 276
 
278
-                >.OwnerList {
279
-                  border-top: 2px solid #f8f8f8;
280
-                  align-items: center;
281
-                  padding: 30px 0;
277
+                >.OwnerListContent {
278
+                  position: relative;
279
+                  width: 100%;
282 280
 
283
-                  >view {
284
-                    >text {
285
-                      display: block;
286
-                      width: 100%;
287
-                      text-align: center;
288
-                      font-size: 26px;
289
-                      color: #333;
290
-                      line-height: 40px;
281
+                  .OwnerList {
282
+                    border-top: 2px solid #f8f8f8;
283
+                    white-space: nowrap;
284
+                    font-size: 0;
285
+                    padding: 30px 0;
291 286
 
292
-                      &:first-child {
293
-                        color: #f35844;
294
-                        font-size: 60px;
295
-                        line-height: 70px;
296
-                        margin-bottom: 10px;
287
+                    >view {
288
+                      display: inline-block;
289
+                      vertical-align: middle;
290
+                      width: 25%;
291
+                      position: relative;
292
+                      text {
293
+                        display: block;
294
+                        width: 100%;
295
+                        text-align: center;
296
+                        font-size: 26px;
297
+                        color: #333;
298
+                        line-height: 40px;
299
+
300
+                        &.iconfont {
301
+                          color: #f35844;
302
+                          font-size: 60px;
303
+                          line-height: 70px;
304
+                          margin-bottom: 10px;
305
+                        }
297 306
                       }
298 307
                     }
299 308
                   }
300 309
                 }
310
+
311
+
301 312
               }
302 313
             }
303 314
 

+ 3
- 0
src/pages/WuYe/FuWuList/index.config.js Näytä tiedosto

@@ -0,0 +1,3 @@
1
+export default {
2
+  navigationBarTitleText: ''
3
+}

+ 40
- 0
src/pages/WuYe/FuWuList/index.css Näytä tiedosto

@@ -0,0 +1,40 @@
1
+.FuWuList {
2
+  width: 100%;
3
+  height: 100%;
4
+  overflow: hidden;
5
+  background: #fff;
6
+}
7
+.FuWuList > .Search {
8
+  padding: 30px;
9
+  position: relative;
10
+  overflow: hidden;
11
+}
12
+.FuWuList > .Search > view {
13
+  position: relative;
14
+  overflow: hidden;
15
+  align-items: center;
16
+  border-radius: 80px;
17
+  background: #fff;
18
+  box-shadow: 0 0 6px 6px rgba(0, 0, 0, 0.03);
19
+}
20
+.FuWuList > .Search > view > text {
21
+  font-size: 32px;
22
+  color: #666;
23
+  margin-left: 30px;
24
+}
25
+.FuWuList > .Search > view > view {
26
+  position: relative;
27
+  overflow: hidden;
28
+  margin-left: 10px;
29
+}
30
+.FuWuList > .Search > view > view > input {
31
+  width: 100%;
32
+  height: 80px;
33
+  font-size: 28px;
34
+  color: #333;
35
+}
36
+.FuWuList .FuWuListContent {
37
+  padding: 0 30px;
38
+  position: relative;
39
+  overflow: hidden;
40
+}

+ 62
- 0
src/pages/WuYe/FuWuList/index.jsx Näytä tiedosto

@@ -0,0 +1,62 @@
1
+import React, { useState, useEffect } from 'react'
2
+import WuYeFuWuListItem from '@/components/WuYeFuWuListItem'
3
+import ScrollPageRefresh from '@/components/ScrollPageRefresh'
4
+import Page from '@/layouts'
5
+import Taro, { Current } from '@tarojs/taro'
6
+// import { Input } from '@tarojs/components'
7
+import '@/assets/css/reset.less'
8
+import '@/assets/css/iconfont.less'
9
+import './index.less'
10
+
11
+export default function FuWuList () {
12
+
13
+  const [PageList, setPageList] = useState([])
14
+  const [IsEmpty, setIsEmpty] = useState(false)
15
+  const [PageTitle] = useState(Current.router.params.name)
16
+  const [PageType] = useState(Current.router.params.type)
17
+
18
+  useEffect(() => {
19
+    Taro.setNavigationBarTitle({ title: PageTitle })
20
+  }, [PageTitle])
21
+
22
+  const Refresh = (e) => { // 下拉刷新
23
+    if (e.length > 0) {
24
+      setIsEmpty(false)
25
+      setPageList(e)
26
+    } else {
27
+      setIsEmpty(true)
28
+    }
29
+  }
30
+
31
+  const Push = (e) => { // 上拉加载
32
+    setPageList(PageList.concat(e))
33
+  }
34
+
35
+  return (
36
+    <Page>
37
+      <view className='FuWuList flex-v'>
38
+        {/* <view className='Search'>
39
+          <view className='flex-h'>
40
+            <text className='iconfont iconsousuo'></text>
41
+            <view className='flex-item'>
42
+              <Input placeholder='输入关键词搜索' confirm-type='search' value={Key} onConfirm={SearchConfirm}></Input>
43
+            </view>
44
+          </view>
45
+        </view> */}
46
+        <view className='flex-item'>
47
+          <ScrollPageRefresh IsEmpty={IsEmpty} ApiName='getWuYeFuWuList' RequestParams={{ newsTypeId: PageType }} Refresh={Refresh} Push={Push}>
48
+            <view className='FuWuListContent'>
49
+              {
50
+                PageList.map((item, index) => (
51
+                  <view className='ListItem' key={`FuWuItem-${index}`}>
52
+                    <WuYeFuWuListItem Data={item}></WuYeFuWuListItem>
53
+                  </view>
54
+                ))
55
+              }
56
+            </view>
57
+          </ScrollPageRefresh>
58
+        </view>
59
+      </view>
60
+    </Page>
61
+  )
62
+}

+ 46
- 0
src/pages/WuYe/FuWuList/index.less Näytä tiedosto

@@ -0,0 +1,46 @@
1
+.FuWuList {
2
+  width: 100%;
3
+  height: 100%;
4
+  overflow: hidden;
5
+  background: #fff;
6
+
7
+  >.Search {
8
+    padding: 30px;
9
+    position: relative;
10
+    overflow: hidden;
11
+
12
+    >view {
13
+      position: relative;
14
+      overflow: hidden;
15
+      align-items: center;
16
+      border-radius: 80px;
17
+      background: #fff;
18
+      box-shadow: 0 0 6px 6px rgba(0, 0, 0, 0.03);
19
+
20
+      >text {
21
+        font-size: 32px;
22
+        color: #666;
23
+        margin-left: 30px;
24
+      }
25
+
26
+      >view {
27
+        position: relative;
28
+        overflow: hidden;
29
+        margin-left: 10px;
30
+
31
+        >input {
32
+          width: 100%;
33
+          height: 80px;
34
+          font-size: 28px;
35
+          color: #333;
36
+        }
37
+      }
38
+    }
39
+  }
40
+
41
+  .FuWuListContent {
42
+    padding: 0 30px;
43
+    position: relative;
44
+    overflow: hidden;
45
+  }
46
+}

+ 14
- 12
src/pages/WuYe/ShengHuoGuanJia/components/Card.jsx Näytä tiedosto

@@ -6,6 +6,8 @@ import './style.less'
6 6
 
7 7
 export default props => {
8 8
 
9
+  const { PostScore = () => { } } = props
10
+
9 11
   const handleClick = () => {
10 12
     if (props.onClick) {
11 13
       props.onClick(props.dataSource)
@@ -21,24 +23,24 @@ export default props => {
21 23
   const data = props.dataSource || {}
22 24
 
23 25
   return (
24
-    <view className="gj-card">
25
-      <view className="gj-card-body" onClick={handleClick}>
26
-        <view className="gj-card-body-media">
27
-          <image mode="" src={data.photo} />
26
+    <view className='gj-card'>
27
+      <view className='gj-card-body' onClick={handleClick}>
28
+        <view className='gj-card-body-media'>
29
+          <image mode='aspectFill' src={data.photo} />
28 30
         </view>
29
-        <view className="gj-card-content">
30
-          <LR title="管家姓名">{data.userName || ''}</LR>
31
-          <LR title="联系方式">{data.phone || ''}</LR>
32
-          <LR title="管家说明">{data.description || ''}</LR>
33
-          <LR title="综合评价"><Stars value={4} editable /></LR>
31
+        <view className='gj-card-content'>
32
+          <LR title='管家姓名'>{data.userName || ''}</LR>
33
+          <LR title='联系方式'>{data.phone || ''}</LR>
34
+          <LR title='管家说明'>{data.description || ''}</LR>
35
+          <LR title='综合评价'><Stars value={4} editable /></LR>
34 36
         </view>
35 37
       </view>
36
-      <view className="gj-card-footer">
38
+      <view className='gj-card-footer'>
37 39
         <view>
38 40
           {`工号: ${data.jobNumber || ''}`}
39 41
         </view>
40
-        <view className="gj-card-footer-action" style={{textAlign: 'right'}}>
41
-          <Btn onClick={handleAction}>评星</Btn>
42
+        <view className='gj-card-footer-action' style={{ textAlign: 'right' }}>
43
+          <Btn onClick={PostScore(data)}>评星</Btn>
42 44
         </view>
43 45
       </view>
44 46
     </view>

+ 82
- 0
src/pages/WuYe/ShengHuoGuanJia/components/style.css Näytä tiedosto

@@ -0,0 +1,82 @@
1
+.gj-card {
2
+  font-size: 28rpx;
3
+  padding: 0 30rpx;
4
+  background: #FFFFFF;
5
+  border-radius: 12rpx;
6
+  margin-top: 30px;
7
+}
8
+.gj-card-body {
9
+  padding-top: 30rpx;
10
+  display: flex;
11
+}
12
+.gj-card-body-media {
13
+  width: 210rpx;
14
+  height: 294rpx;
15
+  flex: none;
16
+  margin-right: 30rpx;
17
+  position: relative;
18
+  overflow: hidden;
19
+}
20
+.gj-card-body-media image {
21
+  width: 100%;
22
+  height: 100%;
23
+}
24
+.gj-card-body-content {
25
+  flex: auto;
26
+}
27
+.gj-card-footer {
28
+  padding-left: 30rpx;
29
+  line-height: 90rpx;
30
+  display: flex;
31
+  align-items: center;
32
+}
33
+.gj-card-footer view {
34
+  flex: auto;
35
+}
36
+.gj-card-footer-action {
37
+  width: 150rpx;
38
+  flex: none;
39
+}
40
+.gj-lr {
41
+  display: flex;
42
+  color: #333;
43
+  font-size: 28rpx;
44
+  line-height: 60rpx;
45
+}
46
+.gj-lr-left {
47
+  width: 120rpx;
48
+  flex: none;
49
+}
50
+.gj-lr-right {
51
+  flex: auto;
52
+}
53
+.gj-btn {
54
+  display: inline-block;
55
+  padding: 0 30rpx;
56
+  min-width: 65rpx;
57
+  color: #F35844;
58
+  font-size: 30rpx;
59
+  line-height: 60rpx;
60
+  text-align: center;
61
+  border: 1px solid #F35844;
62
+  border-radius: 30px;
63
+}
64
+.gj-stars {
65
+  font-size: 36rpx;
66
+}
67
+.gj-stars .gj-star-large {
68
+  font-size: 64rpx;
69
+}
70
+.gj-stars .gj-star-large + .gj-star-large {
71
+  margin-left: 16rpx;
72
+}
73
+.gj-star {
74
+  color: #333;
75
+  display: inline-block;
76
+}
77
+.gj-star.gj-star-active {
78
+  color: #F35844;
79
+}
80
+.gj-star + .gj-star {
81
+  margin-left: 8rpx;
82
+}

+ 3
- 4
src/pages/WuYe/ShengHuoGuanJia/components/style.less Näytä tiedosto

@@ -4,6 +4,7 @@
4 4
   padding: 0 30rpx;
5 5
   background: #FFFFFF;
6 6
   border-radius: 12rpx;
7
+  margin-top: 30px;
7 8
 
8 9
   &-body {
9 10
     padding-top: 30rpx;
@@ -14,6 +15,8 @@
14 15
       height: 294rpx;
15 16
       flex: none;
16 17
       margin-right: 30rpx;
18
+      position: relative;
19
+      overflow: hidden;
17 20
 
18 21
       image {
19 22
         width: 100%;
@@ -42,10 +45,6 @@
42 45
     }
43 46
 
44 47
   }
45
-
46
-  & + .gj-card {
47
-    margin-top: 30rpx;
48
-  }
49 48
 }
50 49
 
51 50
 .gj-lr {

+ 100
- 0
src/pages/WuYe/ShengHuoGuanJia/index.css Näytä tiedosto

@@ -0,0 +1,100 @@
1
+.shgj {
2
+  padding: 0 30px;
3
+  background: #f8f8f8;
4
+  position: relative;
5
+  overflow: hidden;
6
+}
7
+.ScorePopup {
8
+  width: 100%;
9
+  position: fixed;
10
+  left: 0;
11
+  top: 0;
12
+  bottom: 0;
13
+  z-index: 100;
14
+  background: rgba(0, 0, 0, 0.7);
15
+}
16
+.ScorePopup > view {
17
+  width: 460px;
18
+}
19
+.ScorePopup > view > view {
20
+  width: 100%;
21
+  position: relative;
22
+  overflow: hidden;
23
+  background: #fff;
24
+  border-radius: 24px;
25
+}
26
+.ScorePopup > view > view > .Title > text {
27
+  display: block;
28
+  font-size: 24px;
29
+  color: #666;
30
+  line-height: 40px;
31
+  text-align: center;
32
+  margin-top: 20px;
33
+  position: relative;
34
+  z-index: 1;
35
+}
36
+.ScorePopup > view > view > .Title > text.iconfont {
37
+  font-size: 40px;
38
+  position: absolute;
39
+  right: 30px;
40
+  top: 0;
41
+  z-index: 2;
42
+}
43
+.ScorePopup > view > view > .flex-h {
44
+  padding: 0 80px;
45
+  align-items: center;
46
+  margin-top: 40px;
47
+}
48
+.ScorePopup > view > view > .flex-h > .Icon {
49
+  width: 120px;
50
+  height: 120px;
51
+  border-radius: 100%;
52
+  position: relative;
53
+  overflow: hidden;
54
+  background: #eee;
55
+  margin-right: 20px;
56
+}
57
+.ScorePopup > view > view > .flex-h > .Icon > image {
58
+  width: 100%;
59
+  height: 100%;
60
+}
61
+.ScorePopup > view > view > .flex-h > .flex-item > text {
62
+  display: block;
63
+  font-size: 24px;
64
+  color: #999;
65
+  line-height: 40px;
66
+}
67
+.ScorePopup > view > view > .flex-h > .flex-item > text:first-child {
68
+  color: #333;
69
+  margin-bottom: 10px;
70
+}
71
+.ScorePopup > view > view > .Star {
72
+  font-size: 0;
73
+  text-align: center;
74
+  white-space: nowrap;
75
+  margin-top: 20px;
76
+}
77
+.ScorePopup > view > view > .Star > text {
78
+  display: inline-block;
79
+  vertical-align: middle;
80
+  font-size: 40px;
81
+  margin-left: 10px;
82
+  color: #666;
83
+}
84
+.ScorePopup > view > view > .Star > text.active {
85
+  color: #fcdc1e;
86
+}
87
+.ScorePopup > view > view > .Star > text:first-child {
88
+  margin-left: 0;
89
+}
90
+.ScorePopup > view > view > .Submit {
91
+  border-top: 2px solid rgba(0, 0, 0, 0.08);
92
+  margin-top: 40px;
93
+}
94
+.ScorePopup > view > view > .Submit > text {
95
+  display: block;
96
+  font-size: 30px;
97
+  color: #F35844;
98
+  line-height: 90px;
99
+  text-align: center;
100
+}

+ 91
- 25
src/pages/WuYe/ShengHuoGuanJia/index.jsx Näytä tiedosto

@@ -4,40 +4,106 @@ import Page from '@/layouts/index'
4 4
 import Card from './components/Card'
5 5
 import { useModel } from '@/store'
6 6
 import request, { apis } from '@/utils/request'
7
+import ScrollPageRefresh from '@/components/ScrollPageRefresh/index'
7 8
 import './index.less'
8 9
 
9
-export default props => {
10
-  // const [loading, setLoading] = useState(false)
11
-  const [listData, setListData] = useState([])
12
-  const [queryParams, setQueryParams] = useState({pageNum:1, pageSize: 10})
10
+export default () => {
11
+
13 12
   const { user } = useModel('user')
13
+  const [PageList, setPageList] = useState([])
14
+  const [IsEmpty, setIsEmpty] = useState(false)
15
+  const [DataLock, setDataLock] = useState(false)
16
+  const [StarIndex, setStarIndex] = useState(0)
17
+  const [CurrentUser, setCurrentUser] = useState(null)
18
+
19
+  const Refresh = (e) => { // 下拉刷新
20
+    if (e.length > 0) {
21
+      setIsEmpty(false)
22
+      setPageList(e)
23
+    } else {
24
+      setIsEmpty(true)
25
+    }
26
+  }
27
+
28
+  const Push = (e) => { // 上拉加载
29
+    setPageList(PageList.concat(e))
30
+  }
31
+
32
+  const PostScore = (e) => {
33
+    return () => {
34
+      setCurrentUser(e)
35
+    }
36
+  }
37
+
38
+  const SelectStar = (index) => {
39
+    return () => {
40
+      setStarIndex(index)
41
+    }
42
+  }
14 43
 
15
-  // 要获取新数据
16
-  // 只需要更新 queryParams 即可
17
-  Taro.usePullDownRefresh(() => {
18
-    setQueryParams({
19
-      ...queryParams,
20
-      pageNum: 1,
21
-      pageSize: 10
22
-    })
23
-  })
24
-
25
-  useEffect(() => {
26
-    if (user && user.personId && !listData.length) {
27
-      request({...apis.getShengHuoGuanJiaList, params: queryParams}).then(res => {
28
-        const { records } = res
29
-        setListData(records || [])
44
+  const SubmitScore = () => {
45
+    if (!DataLock) {
46
+      setDataLock(true)
47
+      request({
48
+        ...apis.PostOwnerScore,
49
+        data: {
50
+          orgId: user.orgId,
51
+          personId: user.personId,
52
+          score: StarIndex + 1,
53
+          userId: CurrentUser.userId
54
+        }
55
+      }).then(() => {
56
+        Taro.showToast({ title: '评价成功', icon: 'none' })
57
+        setCurrentUser(null)
58
+        setDataLock(false)
59
+      }).catch((res) => {
60
+        Taro.showToast({ title: res, icon: 'none' })
61
+        setDataLock(false)
30 62
       })
31 63
     }
32
-  }, [user, queryParams])
64
+  }
33 65
 
34 66
   return (
35 67
     <Page>
36
-      <view className="shgj">
37
-      {
38
-        listData.map(item => <Card key={item.userId} dataSource={item} />)
39
-      }
40
-      </view>
68
+      <ScrollPageRefresh RefreshBg='#f8f8f8' IsEmpty={IsEmpty} ApiName={`getShengHuoGuanJiaList`} Refresh={Refresh} Push={Push}>
69
+        <view className='shgj'>
70
+          {
71
+            PageList.map(item => <Card key={item.userId} dataSource={item} PostScore={PostScore} />)
72
+          }
73
+        </view>
74
+        {
75
+          CurrentUser !== null &&
76
+          <view className='ScorePopup'>
77
+            <view className='centerLabel'>
78
+              <view>
79
+                <view className='Title'>
80
+                  <text>每月有一次评选机会</text>
81
+                  <text className='iconfont iconguanbi' onClick={() => { setCurrentUser(null) }}></text>
82
+                </view>
83
+                <view className='flex-h'>
84
+                  <view className='Icon'>
85
+                    <image mode='aspectFill' src={CurrentUser.photo}></image>
86
+                  </view>
87
+                  <view className='flex-item'>
88
+                    <text>{CurrentUser.userName}</text>
89
+                    <text>工号:{CurrentUser.jobNumber}</text>
90
+                  </view>
91
+                </view>
92
+                <view className='Star'>
93
+                  {
94
+                    ['', '', '', '', ''].map((item, index) => (
95
+                      <text className={index > StarIndex ? 'iconfont iconxingxing' : 'iconfont iconxingxing active'} key={`Star-${index}`} onClick={SelectStar(index)}></text>
96
+                    ))
97
+                  }
98
+                </view>
99
+                <view className='Submit'>
100
+                  <text onClick={SubmitScore}>提交</text>
101
+                </view>
102
+              </view>
103
+            </view>
104
+          </view>
105
+        }
106
+      </ScrollPageRefresh>
41 107
     </Page>
42 108
   )
43 109
 }

+ 118
- 4
src/pages/WuYe/ShengHuoGuanJia/index.less Näytä tiedosto

@@ -1,6 +1,120 @@
1 1
 .shgj {
2
-  width: calc(100vw - 60rpx);
3
-  height: calc(100vh - 60rpx);
4
-  background-color: #f2f2f2;
5
-  padding: 30rpx;
2
+  padding: 0 30px;
3
+  background: #f8f8f8;
4
+  position: relative;
5
+  overflow: hidden;
6
+}
7
+
8
+.ScorePopup {
9
+  width: 100%;
10
+  position: fixed;
11
+  left: 0;
12
+  top: 0;
13
+  bottom: 0;
14
+  z-index: 100;
15
+  background: rgba(0, 0, 0, 0.7);
16
+
17
+  >view {
18
+    width: 460px;
19
+
20
+    >view {
21
+      width: 100%;
22
+      position: relative;
23
+      overflow: hidden;
24
+      background: #fff;
25
+      border-radius: 24px;
26
+
27
+      >.Title {
28
+        >text {
29
+          display: block;
30
+          font-size: 24px;
31
+          color: #666;
32
+          line-height: 40px;
33
+          text-align: center;
34
+          margin-top: 20px;
35
+          position: relative;
36
+          z-index: 1;
37
+
38
+          &.iconfont {
39
+            font-size: 40px;
40
+            position: absolute;
41
+            right: 30px;
42
+            top: 0;
43
+            z-index: 2;
44
+          }
45
+        }
46
+      }
47
+
48
+      >.flex-h {
49
+        padding: 0 80px;
50
+        align-items: center;
51
+        margin-top: 40px;
52
+
53
+        >.Icon {
54
+          width: 120px;
55
+          height: 120px;
56
+          border-radius: 100%;
57
+          position: relative;
58
+          overflow: hidden;
59
+          background: #eee;
60
+          margin-right: 20px;
61
+
62
+          >image {
63
+            width: 100%;
64
+            height: 100%;
65
+          }
66
+        }
67
+
68
+        >.flex-item {
69
+          >text {
70
+            display: block;
71
+            font-size: 24px;
72
+            color: #999;
73
+            line-height: 40px;
74
+
75
+            &:first-child {
76
+              color: #333;
77
+              margin-bottom: 10px;
78
+            }
79
+          }
80
+        }
81
+      }
82
+
83
+      >.Star {
84
+        font-size: 0;
85
+        text-align: center;
86
+        white-space: nowrap;
87
+        margin-top: 20px;
88
+
89
+        >text {
90
+          display: inline-block;
91
+          vertical-align: middle;
92
+          font-size: 40px;
93
+          margin-left: 10px;
94
+          color: #666;
95
+
96
+          &.active {
97
+            color: #fcdc1e;
98
+          }
99
+
100
+          &:first-child {
101
+            margin-left: 0;
102
+          }
103
+        }
104
+      }
105
+
106
+      >.Submit {
107
+        border-top: 2px solid rgba(0, 0, 0, 0.08);
108
+        margin-top: 40px;
109
+
110
+        >text {
111
+          display: block;
112
+          font-size: 30px;
113
+          color: #F35844;
114
+          line-height: 90px;
115
+          text-align: center;
116
+        }
117
+      }
118
+    }
119
+  }
6 120
 }

+ 3
- 3
src/pages/WuYe/TianJiaBaoXiu/index.jsx Näytä tiedosto

@@ -73,8 +73,8 @@ export default function WuYeTianJiaBaoXiu () {
73 73
           name: 'file',
74 74
           formData: { user: 'upload' },
75 75
           header: { 'x-action': 'miniapp', 'authorization': `Bearer ${Taro.getStorageSync('token')}` },
76
-          success: (res) => {
77
-            setPhotoUrl(JSON.parse(res.data).data)
76
+          success: (cRes) => {
77
+            setPhotoUrl(JSON.parse(cRes.data).data)
78 78
           }
79 79
         })
80 80
       }
@@ -97,7 +97,7 @@ export default function WuYeTianJiaBaoXiu () {
97 97
     <Page>
98 98
       <view className='WuYeTianJiaBaoXiu'>
99 99
         <view className='Form'>
100
-          {/* <Input placeholder='简述你的想法' onInput={TitleChange} value={Title}></Input> */}
100
+          <Input placeholder='简述你的想法' onInput={TitleChange} value={Title}></Input>
101 101
           <Textarea placeholder='描述问题详情,以便我们更好的相处' onInput={TitleChange} value={Title}></Textarea>
102 102
           <view className='LabelList'>
103 103
             {

+ 3
- 3
src/pages/WuYe/XiuGaiBaoXiu/index.jsx Näytä tiedosto

@@ -87,8 +87,8 @@ export default function WuYeXiuGaiBaoXiu () {
87 87
           name: 'file',
88 88
           formData: { user: 'upload' },
89 89
           header: { 'x-action': 'miniapp', 'authorization': `Bearer ${Taro.getStorageSync('token')}` },
90
-          success: (res) => {
91
-            setPhotoUrl(JSON.parse(res.data).data)
90
+          success: (cRes) => {
91
+            setPhotoUrl(JSON.parse(cRes.data).data)
92 92
           }
93 93
         })
94 94
       }
@@ -109,7 +109,7 @@ export default function WuYeXiuGaiBaoXiu () {
109 109
     <Page>
110 110
       <view className='WuYeXiuGaiBaoXiu'>
111 111
         <view className='Form'>
112
-          {/* <Input placeholder='简述你的想法' onInput={TitleChange} value={DetailInfo === null ? null : DetailInfo.ticketTitle}></Input> */}
112
+          <Input placeholder='简述你的想法' onInput={TitleChange} value={DetailInfo === null ? null : DetailInfo.ticketTitle}></Input>
113 113
           <Textarea placeholder='描述问题详情,以便我们更好的相处' onInput={TitleChange} value={DetailInfo === null ? null : DetailInfo.ticketTitle}></Textarea>
114 114
           <view className='LabelList'>
115 115
             {

+ 6
- 2
src/utils/api.js Näytä tiedosto

@@ -1,6 +1,10 @@
1 1
 const prefix = `${HOST}/api/wx`
2 2
 
3 3
 const $api = {
4
+  PostOwnerScore: { // 用户给生活管家评分
5
+    method: 'post',
6
+    url: `${prefix}/tpLifeConsultantEvaluate`
7
+  },
4 8
   activitySign: { // 活动签到
5 9
     method: 'put',
6 10
     url: `${prefix}/buildingDynamicCheckin/:id`
@@ -97,7 +101,7 @@ const $api = {
97 101
     method: 'get',
98 102
     url: `${prefix}/wxCancelPay/:outTradeNo`
99 103
   },
100
-  
104
+
101 105
   wxUnifiedOrder: {
102 106
     method: 'get',
103 107
     url: `${prefix}/wxUnifiedOrder/:outTradeNo`
@@ -107,7 +111,7 @@ const $api = {
107 111
     method: 'get',
108 112
     url: `${prefix}/tpRepairType`
109 113
   },
110
-  
114
+
111 115
   getRepairTypeDetail: {
112 116
     method: 'get',
113 117
     url: `${prefix}/tpRepairType/:id`