张延森 5 år sedan
förälder
incheckning
d72a8e333d

+ 1
- 1
config/dev.js Visa fil

@@ -3,7 +3,7 @@ module.exports = {
3 3
     NODE_ENV: '"development"'
4 4
   },
5 5
   defineConstants: {
6
-		// HOST: '"http://47.101.36.130:8085"',//测试
6
+    // HOST: '"http://47.101.36.130:8085"',//测试
7 7
     // WSS_HOST: '"wss://47.101.36.130:8085"',
8 8
     // HOST: '"https://dev.jinchengjiaye.com"',//测试
9 9
     // WSS_HOST: '"wss://dev.jinchengjiaye.com"',

+ 14944
- 14944
package-lock.json
Filskillnaden har hållits tillbaka eftersom den är för stor
Visa fil


+ 6
- 14
src/actions/shop.js Visa fil

@@ -20,15 +20,7 @@ import {
20 20
 import { createAction } from '@utils/redux'
21 21
 
22 22
 
23
-/**
24
- * 商品列表
25
- * @param {*} payload
26
- */
27
-export const dispatchGoodsList = payload => createAction({
28
-  url: API_GOODS_LIST,
29
-  type: GOODS_LIST,
30
-  payload
31
-})
23
+
32 24
 
33 25
 
34 26
 
@@ -50,7 +42,7 @@ export const dispatchGoodsDetail = id => createAction({
50 42
 export const dispatchGoodsExchange = id => createAction({
51 43
   url: `${API_GOODS_EXCHANGE}/${id}`,
52 44
   type: GOODS_EXCHANGE,
53
-  method:'POST'
45
+  method: 'POST'
54 46
 })
55 47
 
56 48
 
@@ -80,7 +72,7 @@ export const dispatchPointsRecords = payload => createAction({
80 72
  * @param {*} payload
81 73
  */
82 74
 export const dispatchPointsRule = payload => createAction({
83
-  url:  API_POINTS_RULE,
75
+  url: API_POINTS_RULE,
84 76
   type: POINTS_RULE,
85 77
   payload
86 78
 })
@@ -90,8 +82,8 @@ export const dispatchPointsRule = payload => createAction({
90 82
  * @param {*} payload
91 83
  */
92 84
 export const dispatchPointsAddress = payload => createAction({
93
-  url:  `${API_POINTS_ADRESS}`,
94
-  type:POINTS_ADRESS,
85
+  url: `${API_POINTS_ADRESS}`,
86
+  type: POINTS_ADRESS,
95 87
   payload,
96
-  method:'PUT'
88
+  method: 'PUT'
97 89
 })

+ 6
- 5
src/app.js Visa fil

@@ -40,11 +40,12 @@ class App extends Component {
40 40
       }
41 41
     },
42 42
     pages: [
43
-      'pages/person/index',
44 43
       'pages/activity/activity',
45
-      'pages/person/profile/index',
46
-      'pages/project/index',
47 44
       'pages/shop/index',
45
+      'pages/project/index',
46
+      'pages/person/index',
47
+
48
+      'pages/person/profile/index',
48 49
       'pages/project/detail/index',
49 50
       'pages/activity/assemblePage',
50 51
       'pages/activity/assistancePage',
@@ -63,7 +64,6 @@ class App extends Component {
63 64
       'pages/person/authorize/index',
64 65
       'pages/project/map/index',
65 66
       'pages/agent/index',
66
-
67 67
       'pages/shop/integralDetail/index',
68 68
       'pages/auth/index',
69 69
       'pages/card/list/index',
@@ -98,7 +98,7 @@ class App extends Component {
98 98
       'pages/checkin/index',
99 99
       'pages/checkin/checkinsuccess/index',
100 100
       // 'pages/checkin/unregistered/index',
101
-  
101
+
102 102
     ],
103 103
     window: {
104 104
       backgroundTextStyle: 'light',
@@ -110,6 +110,7 @@ class App extends Component {
110 110
     tabBar: {
111 111
       color: '#666',
112 112
       selectedColor: '#BB9C79',
113
+
113 114
       list: [
114 115
         {
115 116
           pagePath: "pages/project/index",

Binär
src/assets/agent/banner.png Visa fil


Binär
src/assets/buildbg.png Visa fil


Binär
src/assets/helpgroup/wait.png Visa fil


Binär
src/assets/mine/profile.png Visa fil


+ 2
- 0
src/constants/api.js Visa fil

@@ -44,10 +44,12 @@ export const API_FORM_ID = resolvePath('formid')
44 44
 export const API_ITEMS_LIST = resolvePath('building/list')
45 45
 export const API_ITEMS_DETAIL = resolvePath('buildingSelectId')
46 46
 export const API_ITEMS_TYPE = resolvePath('tdBuildingType')
47
+export const API_ACTIVITY_GROUP = resolvePath('helpActivityAndGroup')
47 48
 
48 49
 
49 50
 // shop
50 51
 export const API_GOODS_LIST = resolvePath('goods')
52
+export const API_GOODS_BUILDING = resolvePath('goodsToBuilding')
51 53
 export const API_GOODS_EXCHANGE = resolvePath('goods/exchange')
52 54
 export const API_GOODS_EXCHANGE_RECORDS = resolvePath('taPointsExchange')
53 55
 export const API_POINTS_RECORDS = resolvePath('taPointsRecords')

+ 1
- 1
src/pages/activity/assistanceItem/index.js Visa fil

@@ -1,7 +1,7 @@
1 1
 import Taro, { Component } from '@tarojs/taro';
2 2
 import './index.scss'
3 3
 import dayjs from 'dayjs'
4
-const helpSuccess = '@https://estateagents.oss-cn-shanghai.aliyuncs.com/miniapp/images/helpgroup/help/success1.png'
4
+const helpSuccess = 'https://estateagents.oss-cn-shanghai.aliyuncs.com/miniapp/images/helpgroup/help/success1.png'
5 5
 const helpFail = require('@assets/helpgroup/fail.png')
6 6
 
7 7
 export default class Item extends Component {

+ 11
- 9
src/pages/activity/detail/assemble.js Visa fil

@@ -1,7 +1,7 @@
1 1
 import Taro, { Component } from '@tarojs/taro';
2 2
 import './index.scss'
3 3
 import Notice from '@components/Notice'
4
-// import BackHomeBtn from '@components/BackHomeBtn'
4
+import BackHomeBtn from '@components/BackHomeBtn'
5 5
 import AchievePhone from '@components/achievePhone'
6 6
 import Poster from '@components/Poster'
7 7
 import dayjs from 'dayjs'
@@ -38,10 +38,12 @@ const GroupFailure = 2;
38 38
 
39 39
 @connect(state => state.user)
40 40
 export default class Detail extends Component {
41
+
41 42
   config = {
42 43
     navigationBarTitleText: '拼团详情'
43 44
   }
44 45
 
46
+
45 47
   state = {
46 48
     id: null, // 活动ID
47 49
     recordId: undefined,  // 发起拼团ID
@@ -81,7 +83,7 @@ export default class Detail extends Component {
81 83
     if (!this.state.detail.groupActivityId) {
82 84
       let id = this.$router.params.id
83 85
       let recordId = this.$router.params.recordId
84
-     
86
+
85 87
       if (!id) {
86 88
         const router = Taro.getStorageSync('router')
87 89
         id = router.query.id
@@ -205,7 +207,7 @@ export default class Detail extends Component {
205 207
         this.updateLeftTime(res.taShareActivity.startTime, res.taShareActivity.endTime)
206 208
       }
207 209
 
208
-      Taro.setNavigationBarTitle({ title: res.taShareActivity.activityName })
210
+      // Taro.setNavigationBarTitle({ title: res.taShareActivity.activityName })
209 211
 
210 212
       // WxParse.wxParse('article', 'html', res.desc, this.$scope, 0)
211 213
 
@@ -431,7 +433,7 @@ export default class Detail extends Component {
431 433
           grantPhoneVisible &&
432 434
           <AchievePhone user={userInfo.person} onSuccess={this.initPageData}></AchievePhone>
433 435
         }
434
-
436
+        <BackHomeBtn></BackHomeBtn>
435 437
         {
436 438
           loaded && (
437 439
             <View className="ass-page">
@@ -525,22 +527,22 @@ export default class Detail extends Component {
525 527
 
526 528
                 {
527 529
                   actState === ActBeforeStart &&
528
-                  (<Button className="nostart-btn" style="margin:36px auto">未开始</Button>)
530
+                  (<Button className="nostart-btn" style="margin:30px auto">未开始</Button>)
529 531
                 }
530 532
                 {
531 533
                   isStarter && actState === ActInProcess && groupState === GroupInProcess &&
532
-                  (<Button className="assistance-btn" style="margin:36px auto" onClick={this.groupBuyInvite}>邀请好友拼团</Button>)
534
+                  (<Button className="assistance-btn" style="margin:30px auto" onClick={this.groupBuyInvite}>邀请好友拼团</Button>)
533 535
                 }
534 536
                 {
535 537
                   !isStarter && actState === ActInProcess &&
536 538
                   (
537
-                    <Block>
539
+                    <View className="btn-box">
538 540
                       {
539 541
                         groupState === GroupInProcess &&
540
-                        (<Button className="assistance-btn" style="margin:36px auto" onClick={this.joinGroup}>立即参团</Button>)
542
+                        (<Button className="assistance-btn" onClick={this.joinGroup}>立即参团</Button>)
541 543
                       }
542 544
                       <Button className={groupState === GroupInProcess ? "set-btn" : "assistance-btn"} onClick={this.startMine}>发起我的拼团</Button>
543
-                    </Block>
545
+                    </View>
544 546
                   )
545 547
                 }
546 548
               </ScrollView>

+ 3
- 3
src/pages/activity/detail/assistance.js Visa fil

@@ -1,7 +1,7 @@
1 1
 import Taro, { Component } from '@tarojs/taro';
2 2
 import './index.scss'
3 3
 import Notice from '@components/Notice'
4
-// import BackHomeBtn from '@components/BackHomeBtn'
4
+import BackHomeBtn from '@components/BackHomeBtn'
5 5
 import AchievePhone from '@components/achievePhone'
6 6
 import Poster from '@components/Poster'
7 7
 import dayjs from 'dayjs'
@@ -207,7 +207,7 @@ export default class Detail extends Component {
207 207
         this.updateLeftTime(res.helpActivity.startDate, res.helpActivity.endDate)
208 208
       }
209 209
 
210
-      Taro.setNavigationBarTitle({ title: res.helpActivity.title })
210
+      // Taro.setNavigationBarTitle({ title: res.helpActivity.title })
211 211
 
212 212
       // WxParse.wxParse('article', 'html', res.desc, this.$scope, 0)
213 213
 
@@ -430,7 +430,7 @@ export default class Detail extends Component {
430 430
           grantPhoneVisible &&
431 431
           <AchievePhone user={userInfo.person} onSuccess={this.initPageData}></AchievePhone>
432 432
         }
433
-
433
+        <BackHomeBtn></BackHomeBtn>
434 434
         {
435 435
           loaded && (
436 436
             <View className="ass-page">

+ 33
- 25
src/pages/activity/detail/index.js Visa fil

@@ -41,7 +41,7 @@ export default class Detail extends Component {
41 41
     selector: ['1', '2', '3'],
42 42
     selectorChecked: '1',
43 43
     canChoose: 'none',
44
-    inputName:''
44
+    inputName: ''
45 45
   }
46 46
 
47 47
   componentWillMount() {
@@ -95,7 +95,7 @@ export default class Detail extends Component {
95 95
     })
96 96
   }
97 97
   onShareAppMessage = () => {
98
-    const { detail: { shareContents,title, dynamicId, url } } = this.state
98
+    const { detail: { shareContents, title, dynamicId, url } } = this.state
99 99
     const { userInfo: { person: { personId } } } = this.props
100 100
 
101 101
     addActivityShareNum(dynamicId)
@@ -243,31 +243,31 @@ export default class Detail extends Component {
243 243
       selectorChecked: this.state.selector[e.detail.value]
244 244
     })
245 245
   }
246
-  
247
-  onInputText=e=>{
248
-  	this.setState({
246
+
247
+  onInputText = e => {
248
+    this.setState({
249 249
       inputName: e.detail.value
250
-   })
250
+    })
251 251
   }
252 252
 
253 253
   comfire = e => {
254
-		
255
-    const { detail: { buildingId, dynamicId }, isSign, selectorChecked,inputName } = this.state
256
-    const { userInfo: { person: { phone, name, nickname,tel } } } = this.props
257
-    
258
-    if(inputName==''){
259
-    	Taro.showToast({
260
-	      title: '请输入姓名',
261
-	      icon: 'none'
262
-	    })
263
-	    return
254
+
255
+    const { detail: { buildingId, dynamicId }, isSign, selectorChecked, inputName } = this.state
256
+    const { userInfo: { person: { phone, name, nickname, tel } } } = this.props
257
+
258
+    if (inputName == '') {
259
+      Taro.showToast({
260
+        title: '请输入姓名',
261
+        icon: 'none'
262
+      })
263
+      return
264 264
     }
265
-    
265
+
266 266
     const payload = {
267 267
       buildingId,
268 268
       dynamicId,
269 269
       name: inputName,
270
-      phone:phone ? phone : tel,
270
+      phone: phone ? phone : tel,
271 271
       attendNum: selectorChecked
272 272
     }
273 273
 
@@ -316,7 +316,12 @@ export default class Detail extends Component {
316 316
                 scrollY
317 317
                 className="detail-wrap">
318 318
                 <View className="detail">
319
-                  <View className="detail-sign__num">{detail.enlisted || 0}人已报名</View>
319
+                  {(detail.enlisted == 0 || !detail.enlisted) &&
320
+                    <View className="detail-sign__num">不需要报名</View>
321
+                  }
322
+                  {detail.enlisted > 0 &&
323
+                    <View className="detail-sign__num">{detail.enlisted || 0}人已报名</View>
324
+                  }
320 325
                   <View class="detail-title">{detail.title}</View>
321 326
                   <View className="detail-top">
322 327
                     <View className="detail-top__row">
@@ -329,7 +334,10 @@ export default class Detail extends Component {
329 334
                     </View>
330 335
                     <View className="detail-top__row">
331 336
                       <Text className="row-label">报名截止:</Text>
332
-                      <Text className="row-content">{dayjs(detail.enlistEnd).format('YYYY-MM-DD HH:mm:ss')}</Text>
337
+                      {detail.enlistEnd &&
338
+                        <Text className="row-content">{dayjs(detail.enlistEnd).format('YYYY-MM-DD HH:mm:ss')}</Text>
339
+                      }
340
+
333 341
                     </View>
334 342
                   </View>
335 343
                   <View className="detail-con">
@@ -365,11 +373,11 @@ export default class Detail extends Component {
365 373
                   <Text className="txt">收藏</Text>
366 374
                 </Button>
367 375
                 {
368
-                  parseInt(detail.isEnlist) !=0 && (parseInt(detail.isEnlist) == 2 ? (<Button disabled='true' className='submit-btn hasSigned'>报名人数已满</Button>) : (( phone ? (
376
+                  parseInt(detail.isEnlist) != 0 && (parseInt(detail.isEnlist) == 2 ? (<Button disabled='true' className='submit-btn hasSigned'>报名人数已满</Button>) : ((phone ? (
369 377
                     <Button disabled={isSign} className={`submit-btn ${isSign ? 'hasSigned' : ''}`} onClick={this.handleSignup}>{isSign ? '已报名' : '立即报名'}</Button>
370 378
                   ) : (
371
-                  <Button disabled={isSign} className='submit-btn' open-type="getPhoneNumber" onGetphonenumber={this.handleGetPhone}>{isSign ? '已报名' : '立即报名'}</Button>
372
-                  ))))
379
+                      <Button disabled={isSign} className='submit-btn' open-type="getPhoneNumber" onGetphonenumber={this.handleGetPhone}>{isSign ? '已报名' : '立即报名'}</Button>
380
+                    ))))
373 381
                 }
374 382
                 {/* {phone ? (
375 383
                   <Button disabled={isSign} className={`submit-btn ${isSign ? 'hasSigned' : ''}`} onClick={this.handleSignup}>{isSign ? '已报名' : '立即报名'}</Button>
@@ -379,11 +387,11 @@ export default class Detail extends Component {
379 387
               </View>
380 388
 
381 389
               <View className='page-body' style={{ display: this.state.canChoose }}>
382
-                <View className="mask"  onClick={this.hideModal}></View>
390
+                <View className="mask" onClick={this.hideModal}></View>
383 391
                 <View className='page-section'>
384 392
                   <Text className="page-section__title">报名信息</Text>
385 393
                   <View className='page-content'>
386
-                  	<Input className='inputName' onInput={this.onInputText.bind(this)} type='text' placeholder='请输入姓名'/>
394
+                    <Input className='inputName' onInput={this.onInputText.bind(this)} type='text' placeholder='请输入姓名' />
387 395
                     <Picker mode='selector' range={this.state.selector} onChange={this.onChange}>
388 396
                       <View className='picker'>
389 397
                         <Text>参加人数</Text>

+ 6
- 0
src/pages/activity/detail/index.scss Visa fil

@@ -13,6 +13,12 @@
13 13
   justify-content: space-between;
14 14
   align-items: center;
15 15
 }
16
+.btn-box{
17
+  padding: 50px 30px ;
18
+  display: flex;
19
+  justify-content: space-between;
20
+  align-items: center;
21
+}
16 22
 
17 23
 .share__friend,
18 24
 .creat__img {

+ 13
- 6
src/pages/activity/index.js Visa fil

@@ -20,7 +20,7 @@ export default class Index extends Component {
20 20
     hasMore: true,
21 21
     isEmpty: false,
22 22
     recordId: null,
23
-    pageIndex:1
23
+    pageIndex: 1
24 24
   }
25 25
 
26 26
   componentWillMount() {
@@ -37,24 +37,31 @@ export default class Index extends Component {
37 37
       console.log('活动列表')
38 38
     })
39 39
   }
40
+  componentDidMount() {
41
+    console.log(this.$router, "9999999999999999")
42
+  }
40 43
   componentWillUnmount() {
41 44
     const { recordId } = this.state
42 45
     updatePoint(recordId)
46
+
47
+    this.loadList(1)
48
+
43 49
   }
44 50
 
45 51
   loadList(pageNumber) {
46 52
     const { curCity: { id: cityId } } = this.props
47 53
     const payload = { pageSize: 10, pageNumber }
48
-    
54
+
49 55
     const { params: { buildingId, from } } = this.$router
50 56
     if (cityId) {
51 57
       payload.cityId = cityId
52 58
     }
53 59
     // 从个人中心过来
60
+    console.log(this.router, "from")
54 61
     if (from === 'mine') {
55 62
       payload.mine = true
56 63
     }
57
-    // 从项目详情过来
64
+    // // 从项目详情过来
58 65
     if (buildingId) {
59 66
       payload.buildingId = buildingId
60 67
     }
@@ -89,7 +96,7 @@ export default class Index extends Component {
89 96
       list: _list,
90 97
       isEmpty: total == 0,
91 98
       hasMore: _list.length >= total ? false : true,
92
-      pageIndex:1
99
+      pageIndex: 1
93 100
     })
94 101
     rest && rest()
95 102
   }
@@ -97,13 +104,13 @@ export default class Index extends Component {
97 104
   onScrollToLower = async (fn) => {
98 105
     const { list } = this.state;
99 106
     pageIndex++
100
-    const { records, list: list1, total } = await this.loadList(this.state.pageIndex+1);
107
+    const { records, list: list1, total } = await this.loadList(this.state.pageIndex + 1);
101 108
     const _list = records || list1 || []
102 109
     const newList = list.concat(_list)
103 110
     this.setState({
104 111
       list: newList,
105 112
       hasMore: newList.length >= total ? false : true,
106
-      pageIndex:this.state.pageIndex+1
113
+      pageIndex: this.state.pageIndex + 1
107 114
     });
108 115
     fn && fn();
109 116
   }

+ 8
- 3
src/pages/activity/item/index.js Visa fil

@@ -15,7 +15,7 @@ export default class Item extends Component {
15 15
     const { data, style } = this.props
16 16
     return (
17 17
       <View className="item" style={style} onClick={this.handleClick.bind(this, data)}>
18
-        <Image className="pic" mode="aspectFill" src={data.mainImg}></Image>
18
+        <Image className="pic" mode="aspectFill" src={data.mainImg || data.imgUrl}></Image>
19 19
         <View className="box">
20 20
           <View className="title">{data.title}</View>
21 21
           {
@@ -26,7 +26,7 @@ export default class Item extends Component {
26 26
             <View className={data.type == 'help' ? 'type' : 'type2'}>{data.type == 'help' ? '助力' : '拼团'}</View>
27 27
 
28 28
           }
29
-          {(data.type == 'help' || data.type == 'group') &&
29
+          {(data.type == 'help' || data.type == 'group') && data.successNum > 0 &&
30 30
             <View className="success-num">
31 31
               <View className="triangle"></View>
32 32
               <View className="text">已成功 {data.successNum}</View>
@@ -37,7 +37,12 @@ export default class Item extends Component {
37 37
           {/* <View className="time">活动开始时间:{`${dayjs(data.startDate).format('YYYY-MM-DD HH:mm:ss')}`}</View> */}
38 38
 
39 39
           <View className="left">
40
-            <View className="time">参与截止时间:{`${dayjs(data.endDate).format('YYYY年MM月DD日 HH:mm:ss')}`}</View>
40
+            {data.endDate &&
41
+              <View className="time">参与截止时间:{`${dayjs(data.endDate).format('YYYY年MM月DD日 HH:mm:ss')}`}</View>
42
+            }
43
+            {!data.endDate &&
44
+              <View className="time">参与截止时间:</View>
45
+            }
41 46
             <View className={data.activityStatus == 0 ? "btn jionin " : data.activityStatus == 1 ? "btn nostart" : data.activityStatus == 2 ? "btn jioned" : "btn"}>{data.activityStatus == 0 ? "立即参与" : data.activityStatus == 1 ? "未开始" : data.activityStatus == 2 ? "已结束" : "已参与"}</View>
42 47
           </View>
43 48
         </View>

+ 2
- 2
src/pages/activity/item/index.scss Visa fil

@@ -20,7 +20,7 @@
20 20
     left:0;
21 21
     top:0;
22 22
     color: #fff;
23
-    background:rgba(246,182,29,0.66);
23
+    background:#F6B61D;
24 24
     padding: 10px 36px;
25 25
     border-radius: 12px 0 12px 0;
26 26
     font-size: 24px;
@@ -30,7 +30,7 @@
30 30
     left:0;
31 31
     top:0;
32 32
     color: #fff;
33
-    background:rgba(187,156,121,0.66);
33
+    background:#BB9C79;
34 34
     padding: 12px 36px;
35 35
     border-radius: 12px 0 12px 0;
36 36
     font-size: 24px;

+ 1
- 1
src/pages/news/index.scss Visa fil

@@ -1,7 +1,7 @@
1 1
 @import "@styles/theme.scss";
2 2
 
3 3
 .page {
4
-  background: $page-bg;
4
+  background: #fff;
5 5
   position: relative;
6 6
 }
7 7
 .list{

+ 11
- 3
src/pages/person/favorite/index.js Visa fil

@@ -100,9 +100,17 @@ export default class Index extends Component {
100 100
   }
101 101
 
102 102
   handleActivityItemClick = (item) => {
103
-    Taro.navigateTo({
104
-      url: '/pages/activity/detail/index?id=' + item.dynamicId
105
-    })
103
+    if(item.status==0){
104
+      Taro.showToast({
105
+        title: '当前活动已失效',
106
+        icon: 'none'
107
+      })
108
+    }else{
109
+      Taro.navigateTo({
110
+        url: '/pages/activity/detail/index?id=' + item.dynamicId
111
+      })
112
+    }
113
+   
106 114
   }
107 115
 
108 116
   handleNewsItemClick = (item) => {

+ 81
- 60
src/pages/person/index.js Visa fil

@@ -137,6 +137,11 @@ export default class Person extends Component {
137 137
       url: '/pages/toolKit/index'
138 138
     })
139 139
   }
140
+  toPolicy() {
141
+    Taro.navigateTo({
142
+      url: '/pages/policy/index?from=mine'
143
+    })
144
+  }
140 145
   toFeedback() {
141 146
     Taro.navigateTo({
142 147
       url: '/pages/person/feedback/index'
@@ -229,91 +234,107 @@ export default class Person extends Component {
229 234
           </View>
230 235
         </View>
231 236
         <View>
232
-          <View onClick={this.toAgent} style=" display: flex;align-items: center;justify-content: space-between;margin: 0 20px;padding:10px 0;box-shadow:0px 1px 0px 0px rgba(0,0,0,0.12);">
233
-            <View style="display: flex;align-items: center;">
234
-              <Image style="width:22px;height:22px;margin-right:10px" src={require('@assets/mine/homepage.png')} ></Image>
235
-              <Text >我的主页</Text>
237
+          <View onClick={this.toAgent} className="menu-item-con">
238
+            <Image className="left-icon" src={require('@assets/mine/homepage.png')} ></Image>
239
+            <View className="menu-maintext">
240
+              <Text className="menu-name">我的主页</Text>
241
+              <Text className="right-icon"></Text>
236 242
             </View>
237
-            <Text style=" width:10px;height:10px;border-top: 1px solid #999;border-right: 1px solid #999;transform:rotate(45deg);"></Text>
243
+
238 244
           </View>
239
-          <View onClick={this.toAgentClient} style=" display: flex;align-items: center;justify-content: space-between;margin: 0 20px;padding:10px 0;box-shadow:0px 1px 0px 0px rgba(0,0,0,0.12);">
240
-            <View style="display: flex;align-items: center;">
241
-              <Image style="width:22px;height:22px;margin-right:10px" src={require('@assets/mine/recommend.png')} ></Image>
242
-              <Text >推荐客户</Text>
245
+          <View onClick={this.toAgentClient} className="menu-item-con">
246
+            <Image className="left-icon" src={require('@assets/mine/recommend.png')} ></Image>
247
+            <View className="menu-maintext">
248
+              <Text className="menu-name">推荐客户</Text>
249
+              <Text className="right-icon"></Text>
243 250
             </View>
244
-            <Text style=" width:10px;height:10px;border-top: 1px solid #999;border-right: 1px solid #999;transform:rotate(45deg);"></Text>
245 251
           </View>
246
-          <View onClick={this.toAgentInvitation} style=" display: flex;align-items: center;justify-content: space-between;margin: 0 20px;padding:10px 0;box-shadow:0px 1px 0px 0px rgba(0,0,0,0.12);">
247
-            <View style="display: flex;align-items: center;">
248
-              <Image style="width:22px;height:22px;margin-right:10px" src={require('@assets/mine/development.png')} ></Image>
249
-              <Text >发展经纪人</Text>
252
+          <View onClick={this.toAgentInvitation} className="menu-item-con">
253
+            <Image className="left-icon" src={require('@assets/mine/development.png')} ></Image>
254
+            <View className="menu-maintext">
255
+              <Text className="menu-name">发展经纪人</Text>
256
+              <Text className="right-icon"></Text>
250 257
             </View>
251
-            <Text style=" width:10px;height:10px;border-top: 1px solid #999;border-right: 1px solid #999;transform:rotate(45deg);"></Text>
252 258
           </View>
253 259
           <View className='line'></View>
254
-          <View onClick={this.toActivity} style=" display: flex;align-items: center;justify-content: space-between;margin: 0 20px;padding:10px 0;box-shadow:0px 1px 0px 0px rgba(0,0,0,0.12);">
255
-            <View style="display: flex;align-items: center;">
256
-              <Image style="width:22px;height:22px;margin-right:10px" src={require('@assets/mine/activities.png')} ></Image>
257
-              <Text >我的活动</Text>
260
+          <View onClick={this.toActivity} className="menu-item-con">
261
+            <Image className="left-icon" src={require('@assets/mine/activities.png')} ></Image>
262
+            <View className="menu-maintext">
263
+
264
+              <Text className="menu-name">我的活动</Text>
265
+              <Text className="right-icon"></Text>
258 266
             </View>
259
-            <Text style=" width:10px;height:10px;border-top: 1px solid #999;border-right: 1px solid #999;transform:rotate(45deg);"></Text>
267
+
260 268
           </View>
261
-          <View onClick={this.toAssemble} style=" display: flex;align-items: center;justify-content: space-between;margin: 0 20px;padding:10px 0;box-shadow:0px 1px 0px 0px rgba(0,0,0,0.12);">
262
-            <View style="display: flex;align-items: center;">
263
-              <Image style="width:22px;height:22px;margin-right:10px" src={require('@assets/mine/regiment.png')} ></Image>
264
-              <Text >我的拼团</Text>
269
+          <View onClick={this.toAssemble} className="menu-item-con">
270
+            <Image className="left-icon" src={require('@assets/mine/regiment.png')} ></Image>
271
+            <View className="menu-maintext">
272
+              <Text className="menu-name">我的拼团</Text>
273
+              <Text className="right-icon"></Text>
265 274
             </View>
266
-            <Text style=" width:10px;height:10px;border-top: 1px solid #999;border-right: 1px solid #999;transform:rotate(45deg);"></Text>
275
+
267 276
           </View>
268
-          <View onClick={this.toAssistance} style=" display: flex;align-items: center;justify-content: space-between;margin: 0 20px;padding:10px 0;box-shadow:0px 1px 0px 0px rgba(0,0,0,0.12);">
269
-            <View style="display: flex;align-items: center;">
270
-              <Image style="width:22px;height:22px;margin-right:10px" src={require('@assets/mine/help.png')} ></Image>
271
-              <Text >我的助力</Text>
277
+          <View onClick={this.toAssistance} className="menu-item-con">
278
+            <Image className="left-icon" src={require('@assets/mine/help.png')} ></Image>
279
+            <View className="menu-maintext">
280
+              <Text className="menu-name">我的助力</Text>
281
+              <Text className="right-icon"></Text>
272 282
             </View>
273
-            <Text style=" width:10px;height:10px;border-top: 1px solid #999;border-right: 1px solid #999;transform:rotate(45deg);"></Text>
283
+
274 284
           </View>
275 285
           <View className='line'></View>
276
-          <View onClick={this.toFavor} style=" display: flex;align-items: center;justify-content: space-between;margin: 0 20px;padding:10px 0;box-shadow:0px 1px 0px 0px rgba(0,0,0,0.12);">
277
-            <View style="display: flex;align-items: center;">
278
-              <Image style="width:22px;height:22px;margin-right:10px" src={require('@assets/mine/collection.png')} ></Image>
279
-              <Text >我的收藏</Text>
286
+          <View onClick={this.toFavor} className="menu-item-con">
287
+            <Image className="left-icon" src={require('@assets/mine/collection.png')} ></Image>
288
+            <View className="menu-maintext">
289
+              <Text className="menu-name">我的收藏</Text>
290
+              <Text className="right-icon"></Text>
280 291
             </View>
281
-            <Text style=" width:10px;height:10px;border-top: 1px solid #999;border-right: 1px solid #999;transform:rotate(45deg);"></Text>
292
+
282 293
           </View>
283
-          <View onClick={this.toRecord} style=" display: flex;align-items: center;justify-content: space-between;margin: 0 20px;padding:10px 0;box-shadow:0px 1px 0px 0px rgba(0,0,0,0.12);">
284
-            <View style="display: flex;align-items: center;">
285
-              <Image style="width:22px;height:22px;margin-right:10px" src={require('@assets/mine/exchange.png')} ></Image>
286
-              <Text >兑换记录</Text>
294
+          <View onClick={this.toRecord} className="menu-item-con">
295
+            <Image className="left-icon" src={require('@assets/mine/exchange.png')} ></Image>
296
+            <View className="menu-maintext">
297
+
298
+              <Text className="menu-name">兑换记录</Text>
299
+              <Text className="right-icon"></Text>
287 300
             </View>
288
-            <Text style=" width:10px;height:10px;border-top: 1px solid #999;border-right: 1px solid #999;transform:rotate(45deg);"></Text>
301
+
289 302
           </View>
290
-          <View onClick={this.toProfile} style=" display: flex;align-items: center;justify-content: space-between;margin: 0 20px;padding:10px 0;box-shadow:0px 1px 0px 0px rgba(0,0,0,0.12);">
291
-            <View style="display: flex;align-items: center;">
292
-              <Image style="width:22px;height:22px;margin-right:10px" src={require('@assets/mine/regiment.png')} ></Image>
293
-              <Text >我的资料</Text>
303
+          <View onClick={this.toProfile} className="menu-item-con">
304
+            <Image className="left-icon" src={require('@assets/mine/profile.png')} ></Image>
305
+            <View className="menu-maintext">
306
+
307
+              <Text className="menu-name">我的资料</Text>
308
+              <Text className="right-icon"></Text>
294 309
             </View>
295
-            <Text style=" width:10px;height:10px;border-top: 1px solid #999;border-right: 1px solid #999;transform:rotate(45deg);"></Text>
310
+
296 311
           </View>
297
-          <View onClick={this.toToolkit} style=" display: flex;align-items: center;justify-content: space-between;margin: 0 20px;padding:10px 0;box-shadow:0px 1px 0px 0px rgba(0,0,0,0.12);">
298
-            <View style="display: flex;align-items: center;">
299
-              <Image style="width:22px;height:22px;margin-right:10px" src={require('@assets/mine/calculator.png')} ></Image>
300
-              <Text >房贷计算器</Text>
312
+          <View onClick={this.toToolkit} className="menu-item-con">
313
+            <Image className="left-icon" src={require('@assets/mine/calculator.png')} ></Image>
314
+            <View className="menu-maintext">
315
+
316
+              <Text className="menu-name">房贷计算器</Text>
317
+              <Text className="right-icon"></Text>
301 318
             </View>
302
-            <Text style=" width:10px;height:10px;border-top: 1px solid #999;border-right: 1px solid #999;transform:rotate(45deg);"></Text>
319
+
303 320
           </View>
304
-          <View onClick={this.toToolkit} style=" display: flex;align-items: center;justify-content: space-between;margin: 0 20px;padding:10px 0;box-shadow:0px 1px 0px 0px rgba(0,0,0,0.12);">
305
-            <View style="display: flex;align-items: center;">
306
-              <Image style="width:22px;height:22px;margin-right:10px" src={require('@assets/mine/encyclopedia.png')} ></Image>
307
-              <Text >购房百科</Text>
321
+          <View onClick={this.toPolicy} className="menu-item-con">
322
+            <Image className="left-icon" src={require('@assets/mine/encyclopedia.png')} ></Image>
323
+            <View className="menu-maintext">
324
+
325
+              <Text className="menu-name">购房百科</Text>
326
+              <Text className="right-icon"></Text>
308 327
             </View>
309
-            <Text style=" width:10px;height:10px;border-top: 1px solid #999;border-right: 1px solid #999;transform:rotate(45deg);"></Text>
328
+
310 329
           </View>
311
-          <View onClick={this.toFeedback} style=" display: flex;align-items: center;justify-content: space-between;margin: 0 20px;padding:10px 0;box-shadow:0px 1px 0px 0px rgba(0,0,0,0.12);">
312
-            <View style="display: flex;align-items: center;">
313
-              <Image style="width:22px;height:22px;margin-right:10px" src={require('@assets/mine/feedback.png')} ></Image>
314
-              <Text >意见反馈</Text>
330
+          <View onClick={this.toFeedback} className="menu-item-con">
331
+            <Image className="left-icon" src={require('@assets/mine/feedback.png')} ></Image>
332
+            <View className="menu-maintext">
333
+
334
+              <Text className="menu-name">意见反馈</Text>
335
+              <Text className="right-icon"></Text>
315 336
             </View>
316
-            <Text style=" width:10px;height:10px;border-top: 1px solid #999;border-right: 1px solid #999;transform:rotate(45deg);"></Text>
337
+
317 338
           </View>
318 339
         </View>
319 340
         {/* <View className="list-item">

+ 37
- 2
src/pages/person/index.scss Visa fil

@@ -45,10 +45,44 @@
45 45
   position: relative;
46 46
   overflow: hidden;
47 47
 }
48
+.menu-item-con{
49
+  display: flex;
50
+  align-items: center;
51
+  justify-content:
52
+   space-between;
53
+   margin: 0 40px;
54
+   .menu-maintext{
55
+    display: flex;
56
+    width:90vw;
57
+    padding:24px 0;
58
+    align-items: center;
59
+    justify-content: space-between;
60
+    box-shadow:0px 1.4px 0px 0px rgba(0,0,0,0.08);
61
+    .menu-name{
62
+      font-size: 32px;
63
+      color: #333;
64
+    }
65
+    .right-icon{
66
+      width:20px;
67
+      height:20px;
68
+      border-top: 2px solid #999;
69
+      border-right: 2px solid #999;
70
+      transform:rotate(45deg);
71
+    }
72
+  }
73
+
74
+  
75
+  .left-icon{
76
+    width:46px;
77
+    height:42px;
78
+    margin-right:20px;
79
+  }
80
+}
81
+
48 82
 
49 83
 .info {
50 84
   position: relative;
51
-  height: 356px;
85
+  height: 346px;
52 86
   overflow: hidden;
53 87
   .qiandao-con {
54 88
     position: absolute;
@@ -57,7 +91,8 @@
57 91
     display: flex;
58 92
     justify-content: space-between;
59 93
     align-items: center;
60
-    padding: 22px 40px;
94
+    padding: 0 40px;
95
+    height: 88px;
61 96
     background:rgba(255,255,255,0.22);
62 97
     .qiandao-text{
63 98
       font-size: 28px;

+ 3
- 3
src/pages/project/banner/index.js Visa fil

@@ -2,7 +2,7 @@ import Taro, { Component } from '@tarojs/taro'
2 2
 import { View, Swiper, SwiperItem, Image } from '@tarojs/components'
3 3
 // import { cdn } from '@constants/api'
4 4
 import './index.scss'
5
-
5
+import emptyImg  from '@assets/empty.png'
6 6
 export default class SwiperBanner extends Component {
7 7
   static defaultProps = {
8 8
     list: [],
@@ -25,7 +25,7 @@ export default class SwiperBanner extends Component {
25 25
           circular
26 26
           autoplay
27 27
           indicatorDots={indicatorDots}
28
-          indicatorActiveColor='rgb(178, 42, 49)'
28
+          indicatorActiveColor='rgb(256,256,256)'
29 29
         >
30 30
           {list.map((item, index) => (
31 31
             <SwiperItem
@@ -37,7 +37,7 @@ export default class SwiperBanner extends Component {
37 37
                 mode="widthFix"
38 38
                 style={style}
39 39
                 className='home-banner__swiper-item-img'
40
-                src={item.image || item.url}
40
+                src={item.image || item.url ||item.img||emptyImg }
41 41
               />
42 42
             </SwiperItem>
43 43
           ))}

+ 169
- 132
src/pages/project/detail/index.js Visa fil

@@ -1,7 +1,6 @@
1 1
 import Taro, { Component } from '@tarojs/taro';
2 2
 
3 3
 import './index.scss'
4
-// import WxParse from '../wxParse/wxParse'
5 4
 import Banner from '../banner'
6 5
 import Poster from './poster'
7 6
 import ActivityItem from '../../activity/item'
@@ -13,7 +12,7 @@ import {
13 12
   cancelFavorProject
14 13
 } from '@services/item'
15 14
 import { getMiniQrcode, savePoint, updatePoint } from '@services/common'
16
-import { queryNewsList } from '@services/news'
15
+import { queryNewsList, queryHelpGroup } from '@services/news'
17 16
 import { queryActivityList } from '@services/activity'
18 17
 import dayjs from 'dayjs'
19 18
 import 'dayjs/locale/zh-cn' // 按需加载
@@ -24,6 +23,7 @@ import { connect } from '@tarojs/redux'
24 23
 import { dispatchProjectDetail } from '@actions/project'
25 24
 import getUserPhone from '@utils/getUserPhone'
26 25
 import { ROLE_CODE } from '@constants/user'
26
+const buildBg = require('@assets/buildbg.png')
27 27
 
28 28
 @connect(
29 29
   ({ user, project }) => ({ ...user, ...project }),
@@ -43,6 +43,8 @@ export default class Index extends Component {
43 43
     posterData: {},
44 44
     newsList: [],
45 45
     activityList: [],
46
+    helpList: [],
47
+    groupList: [],
46 48
     statusOpts: ['待定', '在建', '在售'],
47 49
     circumOpts: [
48 50
       {
@@ -81,6 +83,7 @@ export default class Index extends Component {
81 83
         this.loadDetail()
82 84
         this.loadNewsData()
83 85
         this.loadActivityData()
86
+        this.loadHelpGroupList()
84 87
 
85 88
         addItemUv(id)
86 89
         // 埋点
@@ -105,6 +108,26 @@ export default class Index extends Component {
105 108
     const { recordId } = this.state
106 109
     recordId && updatePoint(recordId)
107 110
   }
111
+  loadHelpGroupList() {
112
+    const { buildingId } = this.state
113
+    queryHelpGroup({ buildingId: buildingId }).then(res => {
114
+      console.log(res, "buildingId")
115
+      const helpList = []
116
+      const groupList = []
117
+      res.map(item => {
118
+        if (item.type == 1) {
119
+          helpList.push(item)
120
+        } else {
121
+          groupList.push(item)
122
+        }
123
+      })
124
+      this.setState({
125
+        helpList,
126
+        groupList
127
+      })
128
+    }
129
+    )
130
+  }
108 131
 
109 132
   loadDetail() {
110 133
     const { buildingId, circumOpts } = this.state
@@ -142,7 +165,7 @@ export default class Index extends Component {
142 165
 
143 166
   loadActivityData() {
144 167
     const { buildingId } = this.state
145
-    const payload = { pageSize: 2, pageNumber: 1, buildingId }
168
+    const payload = { pageSize: 999, pageNumber: 1, buildingId }
146 169
     queryActivityList(payload).then(res => {
147 170
       this.setState({
148 171
         activityList: res.list || []
@@ -401,9 +424,9 @@ export default class Index extends Component {
401 424
     })
402 425
   }
403 426
 
404
-  handActivityItemClick(item) {
427
+  handActivityItemClick(id) {
405 428
     Taro.navigateTo({
406
-      url: '/pages/activity/detail/index?id=' + item.dynamicId + '&buildingId=' + item.buildingId
429
+      url: '/pages/activity/detail/index?id=' + id
407 430
     })
408 431
   }
409 432
 
@@ -510,30 +533,30 @@ export default class Index extends Component {
510 533
               <View className="type-intro__list">
511 534
                 {
512 535
                   buildingProjectType.map(item => (
513
-                    <View className='type-intro__item' key={item.buildingId}>
514
-                      <Text className='type-status'>{statusOpts[status]}</Text>
515
-                      <Icon className="iconfont icon-jinrongxianxingge-" onClick={this.handleToolsClick}></Icon>
516
-
517
-                      <View className='row' style="margin-top:0">
518
-                        <Text className='row-label'>项目类型:</Text>
519
-                        <Text className='row-txt black'>{item.buildingTypeName}</Text>
520
-                      </View>
521
-                      <View className='row'>
522
-                        <Text className='row-label'>项目参考价格:</Text>
523
-                        {
524
-                          item.price ? <Text className='row-txt'>约{item.price}元/m²</Text> : <Text className='row-txt'>待定</Text>
525
-                        }
526
-                      </View>
527
-                      <View className='row'>
528
-                        <Text className='row-label'>产权:</Text>
529
-                        <Text className='row-txt'>{item.rightsYear}年</Text>
530
-                        <View className='row-right'>
531
-                          <Text className='row-label'>装修:</Text>
532
-                          <Text className='row-txt'>{item.decoration}</Text>
536
+                    <View className='type-intro__item' key={item.buildingId} style={`background: url(${buildBg}) no-repeat center;background-size: 100% 100%;`}>
537
+
538
+                      <View >
539
+                        <Text className='type-status'>{statusOpts[status]}</Text>
540
+                        {/* <Icon className="iconfont icon-jinrongxianxingge-" onClick={this.handleToolsClick}></Icon> */}
541
+                        <View className='row' style="margin-top:0">
542
+                          <Text className='row-label'>项目类型:</Text>
543
+                          <Text className='row-txt black'>{item.buildingTypeName}</Text>
544
+                        </View>
545
+                        <View className='row'>
546
+                          <Text className='row-label'>项目参考价格:</Text>
547
+                          {
548
+                            item.price ? <Text className='row-txt'>约{item.price}元/m²</Text> : <Text className='row-txt'>待定</Text>
549
+                          }
550
+                        </View>
551
+                        <View className='row'>
552
+                          <Text className='row-label'>产权:</Text>
553
+                          <Text className='row-txt'>{item.rightsYear}年</Text>
554
+                          <View className='row-right'>
555
+                            <Text className='row-label'>装修:</Text>
556
+                            <Text className='row-txt'>{item.decoration}</Text>
557
+                          </View>
533 558
                         </View>
534 559
                       </View>
535
-
536
-
537 560
                     </View>
538 561
                   ))
539 562
                 }
@@ -545,59 +568,7 @@ export default class Index extends Component {
545 568
     )
546 569
   }
547 570
 
548
-  renderHouseTypeList() {
549
-    const { statusOpts } = this.state
550
-    const { projectDetail: { buildingApartment } } = this.props
551
-    const list = buildingApartment.filter(item => item.apartmentType === 'apart')
552
-    let imgUrls = list.reduce((prev, cur) => {
553
-      prev = prev.concat(cur.buildingImgList)
554
-      return prev
555
-    }, [])
556
-    imgUrls = imgUrls.map(item => item.url)
557
-    return (
558
-      <Block>
559
-        {
560
-          list.length > 0 && (
561
-            <View className='house-type'>
562
-              <View className='house-type__title'>户型介绍({list.length})</View>
563
-              <ScrollView scrollX>
564
-
565
-                <View className='house-type__list'>
566
-                  {list.map(item => (
567
-                    <View className='item' key={item.apartmentId}>
568
-                      {
569
-                        item && (
570
-                          <View className='house__img-info'>
571
-                            <Image className='house__img' src={item.buildingImgList[0].url} mode="widthFix" onClick={this.handlePreviewHxImage.bind(this, item.buildingImgList[0].url, imgUrls)}></Image>
572
-                            <View className='house-type__state'>{statusOpts[item.marketStatus - 1]}</View>
573
-                          </View>
574
-
575 571
 
576
-                        )
577
-                      }
578
-                      {/* <View className='house__img__len'>共{item.buildingImgList.length}张</View> */}
579
-
580
-                      <View className="rest-info">
581
-                        <View className='house-type__name'><Text style="color:#FA5431;margin-right:10px">{item.buildingArea}</Text>{item.apartmentName}</View>
582
-                        <View className='construction__area'>
583
-                          <Text>建面{item.buildingArea}m²</Text>
584
-                          
585
-                        {
586
-                          item.insideArea ? <Text className='sleeve__surface__txt'>套内{item.insideArea}m²</Text> : <Text className='sleeve__surface__txt'>套内待定</Text>
587
-                        }
588
-                        </View>
589
-                      </View>
590
-                    </View>
591
-                  ))}
592
-
593
-                </View>
594
-              </ScrollView>
595
-            </View>
596
-          )
597
-        }
598
-      </Block>
599
-    )
600
-  }
601 572
   renderPhotoAlbum() {
602 573
     const { projectDetail: { buildingApartment } } = this.props
603 574
     const list = buildingApartment.filter(item => item.apartmentType === 'photo')
@@ -654,7 +625,6 @@ export default class Index extends Component {
654 625
             {
655 626
               panel.content.map((text, index) => (
656 627
                 <View className="row" key={index}>
657
-                  {/* <Text className="dian">·</Text> */}
658 628
                   {text}</View>
659 629
               ))
660 630
             }
@@ -727,64 +697,106 @@ export default class Index extends Component {
727 697
     )
728 698
   }
729 699
 
730
- 
700
+
731 701
   renderHelp() {
732
-    const { newsList } = this.state
702
+    const { helpList } = this.state
733 703
     return (
734 704
       <Block>
735
-        {
736
-          newsList.length > 0 && (
737
-            <View className="activity">
738
-              <View className="title">助力活动</View>
739
-              <Image src={require('@assets/shop/banner1.jpg')} className="activity-img"></Image>
705
+        {helpList.length > 0 &&
706
+          <View className="activity">
707
+            <View className="title">助力活动</View>
708
+            <View style={{ position: 'relative' }}>
709
+              <Banner
710
+                style={{ height: '130px' }}
711
+                indicatorDots={false}
712
+                list={helpList}
713
+                onClick={this.handleHelpClick}>
714
+              </Banner>
740 715
             </View>
741
-          )
716
+          </View>
742 717
         }
743 718
       </Block>
744 719
     )
745 720
   }
721
+
722
+  handleHelpClick(item) {
723
+    Taro.navigateTo({
724
+      url: '/pages/activity/detail/assistance?id=' + item.activityId
725
+    })
726
+  }
727
+  handleGroupClick(item) {
728
+    Taro.navigateTo({
729
+      url: '/pages/activity/detail/assemble?id=' + item.activityId
730
+    })
731
+  }
746 732
   renderGroup() {
747
-    const { newsList } = this.state
733
+    const { groupList } = this.state
748 734
     return (
749 735
       <Block>
750
-        {
751
-          newsList.length > 0 && (
752
-            <View className="activity">
753
-              <View className="title">拼团活动</View>
754
-              <Image src={require('@assets/shop/banner1.jpg')} className="activity-img"></Image>
736
+        {groupList.length > 0 &&
737
+          <View className="activity">
738
+            <View className="title">拼团活动</View>
739
+            <View
740
+              style={{ position: 'relative' }}>
741
+              <Banner
742
+                style={{ height: '130px' }}
743
+                indicatorDots={false}
744
+                list={groupList}
745
+                onClick={this.handleGroupClick}>
746
+              </Banner>
755 747
             </View>
756
-          )
748
+          </View>
757 749
         }
758 750
       </Block>
759 751
     )
760 752
   }
761
-  renderNews() {
762
-    const { newsList } = this.state
753
+
754
+  renderHouseTypeList() {
755
+    const { statusOpts } = this.state
756
+    const { projectDetail: { buildingApartment } } = this.props
757
+    const list = buildingApartment.filter(item => item.apartmentType === 'apart')
758
+    let imgUrls = list.reduce((prev, cur) => {
759
+      prev = prev.concat(cur.buildingImgList)
760
+      return prev
761
+    }, [])
762
+    imgUrls = imgUrls.map(item => item.url)
763 763
     return (
764 764
       <Block>
765 765
         {
766
-          newsList.length > 0 && (
767
-            <View className="section news">
768
-              <View className="section-head">
769
-                <Text className="section-head__title">新鲜资讯</Text>
770
-                <View className="section-head__more" onClick={this.handleNewsMoreClick}>
771
-                  更多资讯<Text className="iconfont icon-more"></Text>
772
-                </View>
773
-              </View>
774
-              <View className="section-content">
775
-                {
776
-                  newsList.map(item => (
777
-                    <View className="news-item" key={item.newsId} onClick={this.handNewsItemClick.bind(this, item.newsId)}>
778
-                      <Image src={item.newsImg} className="news-item__pic"></Image>
779
-                      <View className="news-item__title">{item.newsName}</View>
766
+          list.length > 0 && (
767
+            <View className='house-type'>
768
+              <View className='house-type__title'>户型介绍({list.length})</View>
769
+              <ScrollView scrollX>
770
+
771
+                <View className='house-type__list'>
772
+                  {list.map(item => (
773
+                    <View className='item' key={item.apartmentId}>
774
+                      {
775
+                        item && (
776
+                          <View className='house__img-info'>
777
+                            <Image className='house__img' src={item.buildingImgList[0].url} mode="widthFix" onClick={this.handlePreviewHxImage.bind(this, item.buildingImgList[0].url, imgUrls)}></Image>
778
+                            <View className='house-type__state'>{statusOpts[item.marketStatus - 1]}</View>
779
+                          </View>
780
+                        )
781
+                      }
782
+                      <View className="rest-info">
783
+                        <View className='house-type__name'><Text style="color:#FA5431;margin-right:10px">{item.buildingArea}</Text>{item.apartmentName}</View>
784
+                        <View className='construction__area'>
785
+                          <Text>建面{item.buildingArea}m²</Text>
786
+                          {
787
+                            item.insideArea ? <Text>套内{item.insideArea}m²</Text> : <Text>套内待定</Text>
788
+                          }
789
+                        </View>
790
+                      </View>
780 791
                     </View>
781
-                  ))
782
-                }
783
-              </View>
792
+                  ))}
793
+                </View>
794
+              </ScrollView>
784 795
             </View>
785 796
           )
786 797
         }
787 798
       </Block>
799
+
788 800
     )
789 801
   }
790 802
   renderActivities() {
@@ -793,31 +805,56 @@ export default class Index extends Component {
793 805
       <Block>
794 806
         {
795 807
           activityList.length > 0 && (
796
-            <View className="section activity">
808
+            <View className="house-type">
797 809
               <View className="section-head">
798 810
                 <Text className="section-head__title">热门活动</Text>
799 811
                 <View className="section-head__more" onClick={this.handleActivityMoreClick}>
800 812
                   更多活动<Text className="iconfont icon-more"></Text>
801 813
                 </View>
802 814
               </View>
803
-              <View className="section-content" style="height:200px">
804
-                {
805
-                  activityList.map(item => (
806
-                    <View className="news-item" key={item.dynamicId} onClick={this.handActivityItemClick.bind(item)}>
807
-                      <Image src={item.imgUrl} className="news-item__pic"></Image>
808
-                      <View className="news-item__title">{item.title}</View>
809
-                    </View>
810
-                    // <ActivityItem
811
-                    //   data={item}
812
-                    //   style={{
813
-                    //     marginBottom: 0
814
-                    //   }}
815
-                    //   key={item.dynamicId}
816
-                    //   onClick={this.handActivityItemClick}>
817
-                    // </ActivityItem>
818
-                  ))
819
-                }
815
+              <ScrollView scrollX>
816
+                <View className="house-type__list" style="margin-top:10px">
817
+                  {
818
+                    activityList.map(item => (
819
+                      <View className="news-item" key={item.dynamicId} onClick={this.handActivityItemClick.bind(this, item.dynamicId)}>
820
+                        <Image src={item.imgUrl} className="news-item__pic"></Image>
821
+                        <View className="news-item__title">{item.title}</View>
822
+                      </View>
823
+                    ))
824
+                  }
825
+                </View>
826
+              </ScrollView>
827
+            </View>
828
+          )
829
+        }
830
+      </Block>
831
+    )
832
+  }
833
+  renderNews() {
834
+    const { newsList } = this.state
835
+    return (
836
+      <Block>
837
+        {
838
+          newsList.length > 0 && (
839
+            <View className="house-type">
840
+              <View className="section-head">
841
+                <Text className="section-head__title">新鲜资讯</Text>
842
+                <View className="section-head__more" onClick={this.handleNewsMoreClick}>
843
+                  更多资讯<Text className="iconfont icon-more"></Text>
844
+                </View>
820 845
               </View>
846
+              <ScrollView scrollX>
847
+                <View className="house-type__list" style="margin-top:10px">
848
+                  {
849
+                    newsList.map(item => (
850
+                      <View className="news-item" key={item.newsId} onClick={this.handNewsItemClick.bind(this, item.newsId)}>
851
+                        <Image src={item.newsImg} className="news-item__pic"></Image>
852
+                        <View className="news-item__title">{item.newsName}</View>
853
+                      </View>
854
+                    ))
855
+                  }
856
+                </View>
857
+              </ScrollView>
821 858
             </View>
822 859
           )
823 860
         }

+ 15
- 14
src/pages/project/detail/index.scss Visa fil

@@ -23,12 +23,11 @@
23 23
     margin-bottom: 70px;
24 24
     border-top-left-radius: 28px;
25 25
     border-top-right-radius: 28px;
26
-    // margin-top: -50px;
27 26
   }
28 27
 }
29 28
 .activity{
30 29
   background: white;
31
-  padding: 30px 0;
30
+  padding: 40px 0;
32 31
   margin-top: 20px;
33 32
   .title {
34 33
     font-size: 40px;
@@ -36,10 +35,6 @@
36 35
     margin: 10px 0 40px 35px;
37 36
     
38 37
   }
39
-  .activity-img{
40
-    width: 100%;
41
-    height: 260px;
42
-  }
43 38
 }
44 39
 .section {
45 40
   background: white;
@@ -129,8 +124,8 @@
129 124
     background:rgba(248,248,248,1);
130 125
     border-radius:12px;
131 126
     text-align: center;
132
-    font-weight: bold;
133 127
     color: $primary-color;
128
+    font-weight: 500;
134 129
     font-size: 34px;
135 130
     margin-top: 40px;
136 131
     line-height: 1.1;
@@ -327,7 +322,7 @@
327 322
     position: relative;
328 323
     width: 100%;
329 324
     background: #fff;
330
-    padding: 30px 40px 60px 40px;
325
+    padding: 30px 40px 40px 40px;
331 326
     border-top-left-radius: 28px;
332 327
     border-top-right-radius: 28px;
333 328
 
@@ -428,13 +423,13 @@
428 423
     }
429 424
 
430 425
     .type-intro {
431
-      margin: 30px 0;
432 426
       width: 100%;
433 427
 
434 428
       &__list {
435 429
         display: flex;
436 430
         padding: 30px 4px;
437 431
       }
432
+      
438 433
 
439 434
       &__item {
440 435
         padding: 20px 86px 20px 30px;
@@ -443,7 +438,14 @@
443 438
         margin-right: 30px;
444 439
         position: relative;
445 440
         font-size: 32px;
446
-
441
+        .build-bg{
442
+          position: absolute;
443
+          width: 100%;
444
+          height: 100%;
445
+          top:0;
446
+          left:0;
447
+          
448
+        }
447 449
         .row {
448 450
           margin-top: 20px;
449 451
           display: flex;
@@ -596,7 +598,7 @@
596 598
       background:rgba(248,248,248,1);
597 599
       border-radius:12px;
598 600
       text-align: center;
599
-      font-weight: bold;
601
+      font-weight: 500;
600 602
       color: $primary-color;
601 603
       font-size: 34px;
602 604
       margin-top: 40px;
@@ -735,7 +737,7 @@
735 737
     color: white;
736 738
     position: absolute;
737 739
     right: 5%;
738
-    bottom: 30%;
740
+    bottom: 30px;
739 741
   }
740 742
 }
741 743
 
@@ -745,8 +747,7 @@
745 747
   width: 100%;
746 748
   padding: 40px;
747 749
   background: #fff;
748
-  top: 30px;
749
-  margin-bottom: 60px;
750
+  margin: 20px 0;
750 751
 
751 752
   .house-type__title {
752 753
     width: 100%;

+ 67
- 179
src/pages/project/index.js Visa fil

@@ -4,10 +4,11 @@ import ProjectItem from './item'
4 4
 import Banner from './banner'
5 5
 import ActivityItem from '../activity/item'
6 6
 
7
+
7 8
 import ready from '@utils/ready'
8 9
 
9 10
 import { queryBanners, savePoint } from '@services/common'
10
-import { queryNewsList } from '@services/news'
11
+import { queryNewsList, queryHelpGroup } from '@services/news'
11 12
 import { queryActivityList } from '@services/activity'
12 13
 import { dispatchCitySelected } from '@actions/city'
13 14
 import { ROLE_CODE } from '@constants/user'
@@ -34,6 +35,7 @@ export default class Index extends Component {
34 35
     maskBanner: '',
35 36
     shareImg: 'https://estateagents.oss-cn-shanghai.aliyuncs.com/miniapp/upload/images/1565358322510-share.jpg',
36 37
     bannerList: [],
38
+    helpGroupList: [],
37 39
     newsList: [],
38 40
     activityList: [],
39 41
     recordId: null,
@@ -103,6 +105,7 @@ export default class Index extends Component {
103 105
 
104 106
   loadData() {
105 107
     this.loadBannerList()
108
+    this.loadHelpGroupList()
106 109
     this.loadNewsList()
107 110
     this.loadActivityList()
108 111
     this.loadList()
@@ -138,6 +141,8 @@ export default class Index extends Component {
138 141
     this.setState({
139 142
       visBanner: false
140 143
     })
144
+
145
+
141 146
     queryBanners('banner', payload).then(res => {
142 147
       this.setState({
143 148
         visBanner: true,
@@ -146,6 +151,18 @@ export default class Index extends Component {
146 151
     })
147 152
   }
148 153
 
154
+  loadHelpGroupList() {
155
+    queryHelpGroup().then(res => {
156
+      console.log(res, "res")
157
+      this.setState({
158
+
159
+        helpGroupList: res || []
160
+      })
161
+    }
162
+    )
163
+  }
164
+
165
+
149 166
   loadNewsList() {
150 167
     const { curCity } = this.props
151 168
     const payload = {
@@ -207,7 +224,6 @@ export default class Index extends Component {
207 224
     })
208 225
   }
209 226
 
210
-
211 227
   //   转发
212 228
   onShareAppMessage = () => {
213 229
     const {
@@ -235,17 +251,22 @@ export default class Index extends Component {
235 251
     })
236 252
   }
237 253
 
238
-  goPerson() {
239
-    Taro.navigateTo({
240
-      url: `/pages/person/index`
241
-    })
242
-  }
243
-
244 254
   handleBannerClick(item) {
245 255
     Taro.navigateTo({
246 256
       url: `/pages/project/detail/index?id=${item.buildingId}`
247 257
     })
248 258
   }
259
+  handleHelpGroupClick(item) {
260
+    if (item.type == 1) {
261
+      Taro.navigateTo({
262
+        url: '/pages/activity/detail/assistance?id=' + item.activityId
263
+      })
264
+    } else {
265
+      Taro.navigateTo({
266
+        url: '/pages/activity/detail/assemble?id=' + item.activityId
267
+      })
268
+    }
269
+  }
249 270
 
250 271
   handleMaskClose() {
251 272
     this.setState({
@@ -276,40 +297,8 @@ export default class Index extends Component {
276 297
     Taro.navigateTo({
277 298
       url: '/pages/project/detail/index?id=' + data.buildingId
278 299
     })
279
-    // App.zhuge.track('点击首页banner')
280 300
   }
281 301
 
282
-  handleToolsClick() {
283
-    // App.zhuge.track('进入房贷计算器')
284
-    Taro.navigateTo({
285
-      url: `/pages/toolKit/index`
286
-    })
287
-  }
288
-
289
-  handleNewsMoreClick() {
290
-    Taro.navigateTo({
291
-      url: `/pages/news/index`
292
-    })
293
-  }
294
-
295
-  handNewsItemClick(id) {
296
-    Taro.navigateTo({
297
-      url: '/pages/news/detail/index?id=' + id
298
-    })
299
-  }
300
-
301
-  handleActivityItemClick(item) {
302
-    // App.zhuge.track('点击活动')
303
-    Taro.navigateTo({
304
-      url: `/pages/activity/detail/index?id=${item.dynamicId}&buildingId=${item.buildingId}`
305
-    })
306
-  }
307
-
308
-  handleActivityMoreClick(item) {
309
-    Taro.navigateTo({
310
-      url: `/pages/activity/index`
311
-    })
312
-  }
313 302
 
314 303
   handleLocationClick() {
315 304
     Taro.navigateTo({
@@ -328,11 +317,7 @@ export default class Index extends Component {
328 317
       url: '/pages/project/list/index'
329 318
     })
330 319
   }
331
-  purchasingPolicy = () => {
332
-    Taro.navigateTo({
333
-      url: `/pages/policy/index`
334
-    })
335
-  }
320
+
336 321
   toRecomonedPage() {
337 322
     const {
338 323
       userInfo: { person: { personType } }
@@ -353,52 +338,21 @@ export default class Index extends Component {
353 338
       url: `/pages/project/map/index`
354 339
     })
355 340
   }
356
-  renderActivities() {
357
-    const { activityList } = this.state
358
-    return (
359
-      <Block>
360
-        {/* {
361
-          activityList.length > 0 && (
362
-            <View className="section activity">
363
-              <View className="section-head">
364
-                <Text className="section-head__title">热门活动</Text>
365
-                <View className="section-head__more" onClick={this.handleActivityMoreClick}>
366
-                  更多活动<Text className="iconfont icon-more"></Text>
367
-                </View>
368
-              </View>
369
-              <View className="section-content">
370
-                {
371
-                  activityList.map(item => (
372
-                    <ActivityItem
373
-                      data={item}
374
-                      style={{
375
-                        marginBottom: 0
376
-                      }}
377
-                      key={item.dynamicId}
378
-                      onClick={this.handleActivityItemClick.bind(this, item)}>
379
-                    </ActivityItem>
380
-                  ))
381
-                }
382
-              </View>
383
-            </View>
384
-          )
385
-        } */}
386
-      </Block>
387
-    )
388
-  }
341
+
389 342
 
390 343
   renderProjectList() {
391 344
     const { proList: { records } } = this.props
345
+    const { helpGroupList } = this.state
392 346
     return (
393 347
       <Block>
394 348
         {
395 349
           records.length > 0 && (
396
-            < View className="section houses" >
350
+            < View className="houses" >
397 351
               <View className="section-head">
398
-              <View>
399
-                <Text className="section-head__title">全部楼盘
352
+                <View style="display:flex;align-items:center">
353
+                  <Text className="section-head__title" onClick={this.handleProItemClick}>全部楼盘
400 354
                 </Text>
401
-                <Image src={require('@assets/index/map.png')} onClick={this.toMapHouse} className='map-img'></Image>
355
+                  <Image src={require('@assets/index/map.png')} onClick={this.toMapHouse} className='map-img'></Image>
402 356
                   <Text className='map-txt' onClick={this.toMapHouse}>地图看房</Text>
403 357
                 </View>
404 358
                 <View className="section-head__more" onClick={this.handleProItemClick}>
@@ -417,7 +371,25 @@ export default class Index extends Component {
417 371
             </View >
418 372
           )
419 373
         }
420
-        <Image className="advertisement" src={require('@assets/shop/banner1.jpg')}></Image>
374
+        {
375
+          helpGroupList.length > 0 &&
376
+          <View
377
+            style={{
378
+              position: 'relative', padding: '20px 20px 0 20px'
379
+            }}>
380
+
381
+            <Banner
382
+              style={{
383
+                borderRadius: '6px',
384
+                height: '88px'
385
+              }}
386
+              indicatorDots={false}
387
+              list={helpGroupList}
388
+              onClick={this.handleHelpGroupClick}>
389
+            </Banner>
390
+          </View>
391
+        }
392
+
421 393
         <View className="last-text">已经到底了~</View>
422 394
       </Block>
423 395
     )
@@ -440,35 +412,6 @@ export default class Index extends Component {
440 412
     )
441 413
   }
442 414
 
443
-  renderNews() {
444
-    const { newsList } = this.state
445
-    return (
446
-      <Block>
447
-        {
448
-          newsList.length > 0 && (
449
-            <View className="section news">
450
-              <View className="section-head">
451
-                <Text className="section-head__title">新鲜资讯</Text>
452
-                <View className="section-head__more" onClick={this.handleNewsMoreClick}>
453
-                  更多资讯<Text className="iconfont icon-more"></Text>
454
-                </View>
455
-              </View>
456
-              <View className="section-content">
457
-                {
458
-                  newsList.map(item => (
459
-                    <View className="news-item" key={item.newsId} onClick={this.handNewsItemClick.bind(this, item.newsId)}>
460
-                      <Image src={item.newsImg} mode="aspectFill" className="news-item__pic"></Image>
461
-                      <View className="news-item__title">{item.newsName}</View>
462
-                    </View>
463
-                  ))
464
-                }
465
-              </View>
466
-            </View>
467
-          )
468
-        }
469
-      </Block>
470
-    )
471
-  }
472 415
 
473 416
   render() {
474 417
     const { curCity } = this.props
@@ -492,24 +435,26 @@ export default class Index extends Component {
492 435
                     this.state.visBanner && (
493 436
                       <Banner
494 437
                         style={{
495
-                          borderRadius: '3px',
496 438
                           height: '250px'
497 439
                         }}
498
-                        indicatorDots={false}
440
+                        indicatorDots={true}
499 441
                         list={this.state.bannerList}
500 442
                         onClick={this.handleBannerClick}>
501 443
                       </Banner>
502 444
                     )
503 445
                   }
504 446
                 </View>
505
-                <View className="search" onClick={this.handleToHouseList}>
506
-                  <Text className="search-icon icon-sousuo iconfont"></Text>
507
-                  <Input className="search-input" placeholder="输入你想查询的楼盘"></Input>
508
-                </View>
509
-                <View className="location" onClick={this.handleLocationClick}>
510
-                  <Text className="location-icon iconfont icon-daohangdizhi"></Text>
511
-                  <Text className="location-text">{curCity.id ? curCity.name : '正在定位'}</Text>
447
+                <View className="top-box">
448
+                  <View className="search" onClick={this.handleToHouseList}>
449
+                    <Text className="search-icon icon-sousuo iconfont"></Text>
450
+                    <Input className="search-input" placeholder="输入你想查询的楼盘"></Input>
451
+                  </View>
452
+                  <View className="location" onClick={this.handleLocationClick}>
453
+                    <Text className="location-icon iconfont icon-daohangdizhi"></Text>
454
+                    <Text className="location-text">{curCity.id ? curCity.name : '正在定位'}</Text>
455
+                  </View>
512 456
                 </View>
457
+
513 458
                 {
514 459
                   (personType !== ROLE_CODE['CONSULTANT']) && (
515 460
                     <View className='section sectionn-customer' >
@@ -524,68 +469,11 @@ export default class Index extends Component {
524 469
                     </View>
525 470
                   )
526 471
                 }
527
-                {/* 工具箱 */}
528
-                {/* <View className="tools">
529
-                  <View className="section-head">
530
-                    <Text className="section-head__title">橙蕉</Text>
531
-                    <View className="section-head__more">更多服务</View>
532
-                  </View>
533
-                  <View className='tools-main'>
534
-                    <View className='tools-item' onClick={this.handleProItemClick}>
535
-                      <Image src={require('@assets/loupan.png')} className='tools-item-img'></Image>
536
-                      <Text className='tools-item-txt'>楼盘展示</Text>
537
-                    </View> */}
538
-                {/* <View className='tools-item' onClick={this.purchasingPolicy}>
539
-                      <Image src={require('@assets/jianli.png')} className='tools-item-img'></Image>
540
-                      <Text className='tools-item-txt'>购房政策</Text>
541
-                    </View> */}
542
-                {/* <View className='tools-item' onClick={this.handleToolsClick}>
543
-                      <Image src={require('@assets/jisuanqi.png')} className='tools-item-img'></Image>
544
-                      <Text className='tools-item-txt'>房贷计算</Text>
545
-                    </View>
546
-                    <View className='tools-item' onClick={this.toMapHouse}>
547
-                      <Image src={require('@assets/didian.png')} className='tools-item-img'></Image>
548
-                      <Text className='tools-item-txt'>地图看房</Text>
549
-                    </View>
550
-                  </View>
551
-                </View> */}
552 472
 
553 473
 
554
-              </View>
555
-              {/* 资讯 */}
556
-              {/* {
557
-                newsList.length > 0 && (<View className='section sectionn-news' onClick={this.handleNewsMoreClick}>
558
-                  <Image src={require('@assets/zixun.png')} className='sectionn-news_img' mode="widthFix"></Image>
559
-                  <View className='sectionn-news-list'>
560
-                    <Swiper
561
-                      className='test-h'
562
-                      indicatorColor='#999'
563
-                      indicatorActiveColor='#333'
564
-                      vertical={vertical}
565
-                      circular
566
-                      indicatorDots={indicatorDots}
567
-                      autoplay>
568
-                      {
569
-                        newsList.map(item => (
570
-                          <SwiperItem key={item.newsId}>
571
-                            <Text className='sectionn-news_txt'>{item.newsName}</Text>
572
-                          </SwiperItem>
573
-                        ))
574
-                      }
575
-                    </Swiper>
576
-                  </View>
577
-                </View>)
578
-              } */}
579
-
580
-              {/* 推荐客户 */}
581
-
582 474
 
475
+              </View>
583 476
 
584
-              {/* 热门活动 */}
585
-              {this.renderActivities()}
586
-
587
-              {/* 新鲜资讯 */}
588
-              {/* {this.renderNews()} */}
589 477
 
590 478
               {/* 推荐楼盘 */}
591 479
               {this.renderProjectList()}

+ 72
- 56
src/pages/project/index.scss Visa fil

@@ -12,62 +12,70 @@
12 12
   justify-content: space-between;
13 13
   align-items: center;
14 14
 }
15
-
16
-.search {
17
-  width: 66%;
18
-  height: 60px;
19
-  background:rgba(161,161,161,0.2);
20
-  -webkit-box-pack: start;
21
-  -webkit-justify-content: flex-start;
22
-  -ms-flex-pack: start;
23
-  justify-content: flex-start;
15
+.top-box{
16
+  display: flex;
17
+  width: 100%;
18
+  align-items: center;
19
+  justify-content: space-between;
24 20
   position: absolute;
25
-  left: 6%;
26 21
   top: 5%;
27
-  justify-content: flex-start;
28
-  border-radius: 6px;
29
-  @extend .flex;
30
-  justify-content: flex-start;
31
-
32
-  &-icon {
33
-    font-size: 24px;
34
-    color: rgb(209, 204, 204);
35
-    font-weight: bold;
36
-    margin: 0 10px 0 10px;
22
+  left: 0;
23
+  padding: 0 60px;
24
+  .location {
25
+    @extend .flex;
26
+    justify-content: center;
27
+    padding: 13px 14px;
28
+    background:rgba(161,161,161,0.2);
29
+    border-radius:12px;
30
+    
31
+  
32
+    &-text {
33
+      font-size: 25px;
34
+      padding-left: 13px;
35
+      color: rgba(255, 255, 255, 1);
36
+      @include text-ellipsis; 
37
+      width: 100px;
38
+    }
39
+  
40
+    &-icon {
41
+      color: rgb(209, 204, 204);
42
+      font-size: 16px;
43
+      font-weight: bold;
44
+      display: block;
45
+      margin-top: 10px;
46
+      animation: bigger 1s ease 3 both;
47
+    }
37 48
   }
49
+  
50
+  .search {
38 51
 
39
-  &-input {
40
-    font-size: 24px;
41
-    line-height: 60px;
42
-    color: #A2A2A2;
52
+    height: 60px;
53
+    background:rgba(161,161,161,0.2);
54
+    -webkit-box-pack: start;
55
+    -webkit-justify-content: flex-start;
56
+    -ms-flex-pack: start;
57
+    border-radius: 12px;
58
+    @extend .flex;
59
+    justify-content: flex-start;
60
+    width: 440px;
61
+  
62
+    &-icon {
63
+      font-size: 24px;
64
+      color: rgb(209, 204, 204);
65
+      font-weight: bold;
66
+      margin: 0 10px 0 10px;
67
+    }
68
+  
69
+    &-input {
70
+      font-size: 24px;
71
+      line-height: 60px;
72
+      color: #A2A2A2;
73
+    }
43 74
   }
44 75
 }
45 76
 
46
-.location {
47
-  @extend .flex;
48
-  justify-content: center;
49
-  position: absolute;
50
-  right: 6%;
51
-  top: 5%;
52
-  padding: 13px 14px;
53
-  background:rgba(161,161,161,0.2);
54
-  border-radius:6px;
55
-
56
-  &-text {
57
-    font-size: 25px;
58
-    padding-left: 13px;
59
-    color: rgba(255, 255, 255, 1);
60
-  }
61 77
 
62
-  &-icon {
63
-    color: rgb(209, 204, 204);
64
-    font-size: 16px;
65
-    font-weight: bold;
66
-    display: block;
67
-    margin-top: 10px;
68
-    animation: bigger 1s ease 3 both;
69
-  }
70
-}
78
+
71 79
 
72 80
 
73 81
 
@@ -79,7 +87,7 @@
79 87
     @extend .flex;
80 88
 
81 89
     &__title {
82
-      font-size: 32px;
90
+      font-size: 40px;
83 91
       font-weight: bold;
84 92
       // font-family: PingFangSC;
85 93
     }
@@ -145,7 +153,7 @@
145 153
     padding: 0px 20px;
146 154
 
147 155
     .section-content_img{
148
-      width: 240px;
156
+      width: 204px;
149 157
       height: 132px;
150 158
     }
151 159
     .logo_img{
@@ -379,15 +387,23 @@
379 387
 
380 388
 .houses {
381 389
   box-shadow:0px 2px 12px 2px rgba(29,29,29,0.09);
390
+  background: white;
391
+  padding: 30px 40px 20px 40px;
392
+  .section-content{
393
+    .item:last-of-type{
394
+      border:none;
395
+      padding-bottom: 20px;
396
+    }
397
+  }
382 398
   
383 399
   .map-img{
384
-    width: 22px;
385
-    height: 22px;
386
-    margin: 0 20px 0 36px;
400
+    width: 28px;
401
+    height: 28px;
402
+    margin: 0 8px 0 38px;
387 403
   }
388 404
   .map-txt{
389 405
     color: $primary-color;
390
-    font-size: 26px;
406
+    font-size: 28px;
391 407
   }
392 408
 }
393 409
 .advertisement{
@@ -400,8 +416,8 @@
400 416
   font-size: 28px;
401 417
   color: #dcdcdc;
402 418
   text-align: center;
403
-  line-height: 120px;
404
-  // box-shadow:0px -20px 8px -10px rgba(29,29,29,0.1) inset;
419
+  margin-bottom: 60px;
420
+  margin-top: 40px;
405 421
 }
406 422
 @keyframes moveY {
407 423
   0% {

+ 0
- 1
src/pages/project/item/index.js Visa fil

@@ -42,7 +42,6 @@ export default class Index extends Component {
42 42
 
43 43
         <View className='item__bottom'>
44 44
           <View className='item__bottom__left'>
45
-            {/* <Text className='iconfont icon-fenxiang'></Text> */}
46 45
             <Image src={require('@assets/index/share.png')} className='share-img'></Image>
47 46
             <Text className='item__bottom__sharenum'>{shareList.total}次分享</Text>
48 47
           </View>

+ 3
- 1
src/pages/project/item/index.scss Visa fil

@@ -3,7 +3,7 @@
3 3
 
4 4
 .item {
5 5
   position: relative;
6
-  padding: 40px 0 40px;
6
+  padding: 30px 0;
7 7
   border-bottom: 1px solid $border-color-light;
8 8
 
9 9
 //&:last-child {
@@ -140,6 +140,8 @@
140 140
     .see__img {
141 141
       height: 56px;
142 142
       margin-left: 20px;
143
+      display: flex;
144
+      align-items: center;
143 145
 
144 146
       .userImg {
145 147
         width: 56px;

+ 2
- 2
src/pages/project/list/index.scss Visa fil

@@ -7,9 +7,9 @@
7 7
 }
8 8
 
9 9
 .list-view {
10
-  padding-top: 220px;
10
+  padding-top: 210px;
11 11
 }
12 12
 
13 13
 .list {
14
-  padding: 50px;
14
+  padding: 0 40px;
15 15
 }

+ 112
- 49
src/pages/shop/index.js Visa fil

@@ -9,6 +9,7 @@ import Banner from './banner'
9 9
 import ready from '@utils/ready'
10 10
 // import { ROLE_CODE } from '@constants/user'
11 11
 import { queryBanners } from '@services/common'
12
+import { getGoodsBuilding, getGoodsList } from '@services/item'
12 13
 import { connect } from '@tarojs/redux'
13 14
 import * as actions from '@actions/shop'
14 15
 // import { queryUserInfo, doUserSignin } from '@services/user'
@@ -32,14 +33,17 @@ export default class Shop extends Component {
32 33
       'https://estateagents.oss-cn-shanghai.aliyuncs.com/images/banner/5.jpg'
33 34
     ],
34 35
     user: {},
35
-    cityName: ''
36
+    cityName: '',
37
+    goodsBuilding: [],
38
+    goodsList: [],
36 39
   }
37 40
 
38 41
   componentDidShow() {
39 42
     Taro.showLoading()
40 43
     ready.queue(() => {
41 44
       this.loadBannerList()
42
-      this.loadList()
45
+      this.loadGoodsBuilding()
46
+
43 47
       //    this.loadCity()
44 48
       // this.loadUserInfo()
45 49
     })
@@ -86,22 +90,64 @@ export default class Shop extends Component {
86 90
     })
87 91
   }
88 92
 
89
-  onSearch(val) {
90
-    // App.zhuge.track('搜索商品', {
91
-    //   '商品名称': val
92
-    // })
93
-    this.setState({
94
-      keywords: val,
95
-    }, this.loadList)
96
-  }
93
+  // onSearch(val) {
94
+  //   // App.zhuge.track('搜索商品', {
95
+  //   //   '商品名称': val
96
+  //   // })
97
+  //   this.setState({
98
+  //     keywords: val,
99
+  //   }, this.loadList)
100
+  // }
97 101
 
98 102
   loadList() {
99
-    // const payload = { buildingId: '369b7d7e5bc6e6b91f2e8f5e775035e2' }
103
+
100 104
     Taro.showLoading()
101
-    this.props.dispatchGoodsList().then(res => {
105
+    const params = {
106
+      pageNum: '1',
107
+      pageSize: '9999',
108
+      buildingId: this.state.goodsBuilding[0].buildingId
109
+    }
110
+    console.log(params, "params")
111
+    getGoodsList(params).then(res => {
112
+      this.setState({
113
+        goodsList: res.records || []
114
+      })
102 115
       Taro.hideLoading()
103 116
     })
104 117
   }
118
+  loadGoodsBuilding() {
119
+    getGoodsBuilding().then(res => {
120
+
121
+      res.map(item => {
122
+        item.title = item.buildingName
123
+
124
+      })
125
+      this.setState({
126
+        goodsBuilding: res || []
127
+
128
+      }, () => {
129
+        this.loadList()
130
+      }
131
+      )
132
+    })
133
+  }
134
+
135
+  handleClick(value) {
136
+
137
+    const payload = {
138
+      pageNum: '1',
139
+      pageSize: '9999',
140
+      buildingId: this.state.goodsBuilding[value].buildingId
141
+    }
142
+    getGoodsList(payload).then(res => {
143
+      this.setState({
144
+        goodsList: res.records || []
145
+      })
146
+    })
147
+    this.setState({
148
+      current: value
149
+    })
150
+  }
105 151
 
106 152
   onViewDetail(item) {
107 153
     Taro.navigateTo({
@@ -155,50 +201,67 @@ export default class Shop extends Component {
155 201
     current: 0,
156 202
   }
157 203
 
158
-  handleClick(value) {
159
-    this.setState({
160
-      current: value
161
-    })
162
-  }
204
+
163 205
 
164 206
   renderGoods() {
165 207
     const { goods: { records = [] } } = this.props
208
+    const { goodsList, goodsBuilding, current } = this.state
166 209
 
167 210
     return (
168 211
 
212
+
213
+
169 214
       <View className="list__wrap">
170
-        <AtTabs  current={this.state.current} tabList={[{ title: '热门活动' }, { title: '最新资讯' }]} onClick={this.handleClick.bind(this)}>
171
-          <AtTabsPane  current={this.state.current} index={0} >
172
-            <View >
173
-
174
-              {
175
-                records.map(item => (
176
-                  <View className="item" key={item.goodsId} onClick={this.onViewDetail.bind(this, item)}>
177
-                    <Image className="item__img" src={item.imgUrl} />
178
-                    {/* <View className='item__exchange'>立即兑换</View> */}
179
-                    <View className="item__title">{item.goodsName}</View>
180
-                    <View className="item__des">
181
-                      <View>
182
-                        剩余数量{item.inventory}
183
-                      </View>
184
-                      <View >
185
-                        <Text className="item__jifen">{item.pointPrice}</Text>积分
186
-                </View>
215
+        {
216
+
217
+          goodsBuilding && goodsBuilding.length < 2 &&
218
+          <View>
219
+            <View className="hot_title">热门商品</View>
220
+            {
221
+              goodsList.map(item => (
222
+                <View className="item" key={item.goodsId} onClick={this.onViewDetail.bind(this, item)}>
223
+                  <Image className="item__img" src={item.imgUrl} />
224
+                  <View className="item__title">{item.goodsName}</View>
225
+                  <View className="item__des">
226
+                    <View>
227
+                      剩余数量{item.inventory}
187 228
                     </View>
188
-
189
-                    {/* <Image className="item__hot" mode="aspectFit" src={require('@assets/shop/hot.png')}></Image> */}
229
+                    <View >
230
+                      <Text className="item__jifen">{item.pointPrice}</Text>积分
231
+                </View>
190 232
                   </View>
191
-                ))
192
-              }
193
-
194
-            </View>
195
-          </AtTabsPane>
196
-          <AtTabsPane current={this.state.current} index={1}>
197
-            <View >
198
-              123
233
+                </View>
234
+              ))
235
+            }
199 236
           </View>
200
-          </AtTabsPane>
201
-        </AtTabs>
237
+        }
238
+        {
239
+          goodsBuilding && goodsBuilding.length > 2 &&
240
+          <AtTabs scroll tabDirection='horizontal' current={current} tabList={goodsBuilding} onClick={this.handleClick.bind(this)}>
241
+            <AtTabsPane current={current}  >
242
+              <View>
243
+                {
244
+                  goodsList.map(item => (
245
+                    <View className="item" key={item.goodsId} onClick={this.onViewDetail.bind(this, item)}>
246
+                      <Image className="item__img" src={item.imgUrl} />
247
+                      <View className="item__title">{item.goodsName}</View>
248
+                      <View className="item__des">
249
+                        <View>
250
+                          剩余数量{item.inventory}
251
+                        </View>
252
+                        <View >
253
+                          <Text className="item__jifen">{item.pointPrice}</Text>积分
254
+                </View>
255
+                      </View>
256
+
257
+                    </View>
258
+                  ))
259
+                }
260
+
261
+              </View>
262
+            </AtTabsPane>
263
+          </AtTabs>
264
+        }
202 265
       </View>
203 266
 
204 267
 
@@ -221,7 +284,7 @@ export default class Shop extends Component {
221 284
           }}>
222 285
           <View className="user_box">
223 286
             <View className="user_con">
224
-            <Image className="bg" src={require('@assets/shop/background.jpg')} ></Image>
287
+              <Image className="bg" src={require('@assets/shop/background.jpg')} ></Image>
225 288
               <Image className="user__left__headimg" src={person.avatarurl} />
226 289
               <View className='user__left__name'>{person.nickname}</View>
227 290
               <View className="qiandao__btn" onClick={this.doSign}>签到</View>
@@ -238,7 +301,7 @@ export default class Shop extends Component {
238 301
                     <Image className="message__left__img" src={require('@assets/shop/liebiao.png')} />
239 302
                     <View className='message__left__word'>积分明细</View>
240 303
                   </View>
241
-                  
304
+
242 305
                 </View>
243 306
                 {/* <View className='message__right' onClick={this.handleLocationClick.bind(this)}>
244 307
                 <Image className="message__right__img" src={require('@assets/shop/address.png')} />
@@ -249,7 +312,7 @@ export default class Shop extends Component {
249 312
           </View>
250 313
 
251 314
 
252
-          {/* <View className="hot_title">热门商品</View> */}
315
+
253 316
           <Banner list={this.state.bannerList} indicatorDots={false}></Banner>
254 317
 
255 318
           {this.renderGoods()}

+ 5
- 4
src/pages/shop/index.scss Visa fil

@@ -38,6 +38,7 @@
38 38
     left:0;
39 39
     width: 100%;
40 40
     height: 100%;
41
+    border-radius: 12px;
41 42
 
42 43
   }
43 44
 
@@ -143,10 +144,9 @@
143 144
 .list__wrap {
144 145
   margin-top: 20px;
145 146
   overflow: hidden;
146
-  padding: 20px 30px;
147
+  padding: 20px;
147 148
   background-color: #fff;
148 149
   .at-tabs__item{
149
-    display: block;
150 150
     flex: none;
151 151
     font-size: 34px;
152 152
     font-weight: 600;
@@ -164,9 +164,10 @@
164 164
 
165 165
   .item {
166 166
     background: white;
167
-    width: 320px;
167
+    width: 335px;
168 168
     position: relative;
169
-    margin: 15px 0;
169
+    display: inline-block;
170
+    margin: 15px 10px;
170 171
     height: 440px;
171 172
     box-shadow:0px 6px 10px 0px rgba(0,0,0,0.12);
172 173
     border-radius:12px;

+ 17
- 0
src/services/item.js Visa fil

@@ -7,6 +7,8 @@ import {
7 7
   API_ITEMS_SHARE,
8 8
   API_ITEMS_TYPE,
9 9
   API_PROJECT_FAVOR,
10
+  API_GOODS_BUILDING,
11
+  API_GOODS_LIST
10 12
 } from '@constants/api'
11 13
 
12 14
 /**
@@ -14,6 +16,21 @@ import {
14 16
  * @param {*} payload 
15 17
  */
16 18
 export const getItemList = payload => fetch({ url: API_ITEMS_LIST, payload })
19
+/**
20
+ * 获取楼盘商品列表
21
+ * @param {*} payload 
22
+ */
23
+export const getGoodsBuilding = payload => fetch({ url: API_GOODS_BUILDING, payload })
24
+/**
25
+ * 获取楼盘商品列表
26
+ * @param {*} payload 
27
+ */
28
+export const getGoodsList = payload => fetch({ url: API_GOODS_LIST, payload })
29
+/**
30
+ * 商品列表
31
+ * @param {*} payload
32
+ */
33
+
17 34
 
18 35
 /**
19 36
  * 获取项目详情

+ 8
- 1
src/services/news.js Visa fil

@@ -3,7 +3,8 @@ import {
3 3
   API_NEWS_LIST,
4 4
   API_NEWS_FAVOR,
5 5
   API_NEWS_UV,
6
-  API_NEWS_SHARE
6
+  API_NEWS_SHARE,
7
+  API_ACTIVITY_GROUP
7 8
 } from '@constants/api'
8 9
 
9 10
 /**
@@ -30,6 +31,12 @@ export const queryNewsList = payload => fetch({ url: API_NEWS_LIST, payload })
30 31
  */
31 32
 export const queryNewsDetail = id => fetch({ url: `${API_NEWS_LIST}/${id}` })
32 33
 
34
+/**
35
+ * 首页获取助力拼团 
36
+ * @param {*} payload 
37
+ */
38
+export const queryHelpGroup = payload => fetch({ url: API_ACTIVITY_GROUP, payload })
39
+
33 40
 
34 41
 /**
35 42
  *资讯收藏