周立森 5 anni fa
parent
commit
a4268c052f

+ 13
- 6
src/pages/project/album/index.js Vedi File

@@ -24,9 +24,15 @@ export default class Index extends Component {
24 24
 
25 25
 
26 26
   componentWillMount () {
27
-    const { id = '369b7d7e5bc6e6b91f2e8f5e775035e2' } = this.$router.params
28
-    const { projectDetail: { buildingId }, dispatchProjectDetail } = this.props
29 27
 
28
+
29
+    const { id = '369b7d7e5bc6e6b91f2e8f5e775035e2', current } = this.$router.params
30
+    const { projectDetail: { buildingId }, dispatchProjectDetail } = this.props
31
+    if (current) {
32
+      this.setState({
33
+        current,
34
+      })
35
+    }
30 36
     if (!buildingId) {
31 37
       dispatchProjectDetail(id)
32 38
     }
@@ -59,14 +65,17 @@ export default class Index extends Component {
59 65
     const { projectDetail: { buildingApartment = [] } } = this.props
60 66
     const list = buildingApartment.filter(item => item.apartmentType === 'photo')
61 67
     const listimg = list.filter(item => item.buildingImgList.length > 0)
62
-    console.log(listimg, '--------------')
68
+
63 69
     const { current } = this.state
64 70
     const imgList = (listimg[current] || {}).buildingImgList || []
71
+
65 72
     let _photosImgs = imgList.map(img => img.url)
66 73
 
67 74
     return (
68 75
       <View className='photos'>
69 76
         <View className="around-tab">
77
+          {console.log(listimg, '-----listimg---------')}
78
+          {console.log(imgList, '-------imgList-------')}
70 79
           {listimg.map((item, index) => {
71 80
             const { apartmentName } = item || {}
72 81
             const buildingImgList = item.buildingImgList || []
@@ -76,15 +85,13 @@ export default class Index extends Component {
76 85
             return (
77 86
               <View
78 87
                 key={current}
79
-                className={`around-tab__item ${current === index ? 'active' : ''}`}
88
+                className={`around-tab__item ${current == index ? 'active' : ''}`}
80 89
                 onClick={() => this.setState({ current: index })}
81 90
               >
82 91
                 {buildingImgList.length > 0 && <View className="around-tab-text"> {`${apartmentName}(${buildingImgList.length})`} </View>}
83 92
               </View>
84 93
             )
85 94
 
86
-
87
-
88 95
           })}
89 96
         </View>
90 97
         <View className='photos__item'>

+ 17
- 51
src/pages/project/detail/index.js Vedi File

@@ -159,7 +159,7 @@ export default class Index extends Component {
159 159
     queryActivityList(payload).then(res => {
160 160
       console.log(res,'Activity')
161 161
       this.setState({
162
-        activityList: res || []
162
+        activityList: res.list || []
163 163
       })
164 164
     })
165 165
   }
@@ -232,9 +232,10 @@ export default class Index extends Component {
232 232
     })
233 233
   }
234 234
 
235
-  toViewAlbum() {
235
+  toViewAlbum (index){
236 236
     const { buildingId } = this.state
237
-    this.navigateTo(`/pages/project/album/index?id=${buildingId}`)
237
+    console.log('1111111',index)
238
+    this.navigateTo(`/pages/project/album/index?id=${buildingId}&current=${index}` )
238 239
   }
239 240
 
240 241
   onViewFans() {
@@ -601,7 +602,7 @@ export default class Index extends Component {
601 602
             <View className='photos__type'>
602 603
               <View className='photos__type__title'>相册</View>
603 604
               <ScrollView scrollX>
604
-                <View className='photos__type__content' onClick={this.toViewAlbum}>
605
+                <View className='photos__type__content' >
605 606
 
606 607
                   <View className="around-tab">
607 608
                     {listimg.map((item, index) => {
@@ -612,19 +613,21 @@ export default class Index extends Component {
612 613
                       console.log(buildingImgUrl, 'buildingImgUrl')
613 614
 
614 615
                       // if (buildingImgUrl != null) {
615
-                      return (<View key={index + "listimg"}>
616
+                      return ( <View key={index + "listimg"}>
616 617
                         {buildingImgUrl != null && (<View
617 618
                           style={{ marginRight: '8px' }}
619
+                          
618 620
                         >
619 621
 
620 622
                           <View>
621
-                            <Image className='albumimg' src={getThumbnail(buildingImgList[0].url)} ></Image>
623
+                            <Image className='albumimg' src={getThumbnail(buildingImgList[0].url)} onClick={()=>this.toViewAlbum(index)}></Image>
622 624
                             <View style={{ width: '218rpx', display: 'flex', justifyContent: 'center' }} >
623 625
                               <View style={{ overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap' }}> {apartmentName}  </View>
624 626
                               <View> ({buildingImgList.length})</View>
625 627
                             </View>
626 628
                           </View>
627
-                        </View>)}</View>
629
+                        </View>)}
630
+                        </View>
628 631
                       )
629 632
                       // }
630 633
 
@@ -841,37 +844,19 @@ export default class Index extends Component {
841 844
     )
842 845
   }
843 846
   renderActivities() {
844
-    // renderGroup () {
845
-    //   const { groupList } = this.state
846
-    //   return (
847
-    //     <Block>
848
-    //       {groupList.length > 0 &&
849
-    //         <View className="activity">
850
-    //           <View className="title">拼团活动</View>
851
-    //           <View
852
-    //             style={{ position: 'relative' }}>
853
-    //             <HelpGroupBanner
854
-    //               style={{ height: '250rpx' }}
855
-    //               indicatorDots={false}
856
-    //               list={groupList}
857
-    //               onClick={this.handleGroupClick}>
858
-    //             </HelpGroupBanner>
859
-    //           </View>
860
-    //         </View>
861
-    //       }
862
-    //     </Block>
863
-    //   )
864
-    // }
847
+
848
+ 
865 849
     const { activityList } = this.state
850
+   
866 851
     return (
867 852
       <Block>
868 853
         {
869 854
           activityList.length > 0 && (
870 855
             <View className="activity" >
871
-              {console.log(activityList, '----activityList-----')}
856
+           
872 857
               <View className="section-head">
873
-                 <Text className="section-head__title">热门活动</Text>
874
-                 <View className="section-head__more" onClick={this.handleActivityMoreClick}>
858
+                 <Text className="section-head__title" style={{margin: '10rpx 0 40rpx 35rpx'}}>热门活动</Text>
859
+                 <View className="section-head__more"  style={{marginRight: '20rpx'}} onClick={this.handleActivityMoreClick}>
875 860
                    更多活动<Text className="iconfont icon-more"></Text>
876 861
                  </View>
877 862
                </View>
@@ -889,26 +874,7 @@ export default class Index extends Component {
889 874
 
890 875
               </View>
891 876
             </View>
892
-            // <View classN                                                                                                                                                                                                                                                                                                                                                                                                                                                    ame="house-type">
893
-            //   <View className="section-head">
894
-            //     <Text className="section-head__title">热门活动</Text>
895
-            //     <View className="section-head__more" onClick={this.handleActivityMoreClick}>
896
-            //       更多活动<Text className="iconfont icon-more"></Text>
897
-            //     </View>
898
-            //   </View>
899
-            //   <ScrollView scrollX>
900
-            //     <View className="house-type__list" style="margin-top:10px">
901
-            //       {
902
-            //         activityList.map(item => (
903
-            //           <View className="news-item" key={item.dynamicId} onClick={this.handActivityItemClick.bind(this, item.dynamicId)}>
904
-            //             <Image mode="widthFix" src={getThumbnail(item.imgUrl)} className="news-item__pic"></Image>
905
-            //             <View className="news-item__title">{item.title}</View>
906
-            //           </View>
907
-            //         ))
908
-            //       }
909
-            //     </View>
910
-            //   </ScrollView>
911
-            // </View>
877
+      
912 878
           )
913 879
         }
914 880
       </Block>

+ 1
- 1
src/pages/shop/record/index.js Vedi File

@@ -74,7 +74,7 @@ export default class Index extends Component {
74 74
 									<Image className="botttom_img" mode="aspectFill" src={item.image} />
75 75
 									<View className="bottom-right">
76 76
 										<View className="bottom-right-top">
77
-											<View className="product-name">{item.targetName}</View>
77
+											<View className="product-name" style={{ overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap',width:'300rpx' }}>{item.targetName}</View>
78 78
 											<View className="product-score">{item.points}积分</View>
79 79
 										</View>
80 80
 										<View className="bottom-right-down">领取地址:{item.address}</View>

+ 1
- 0
src/pages/shop/record/index.scss Vedi File

@@ -61,6 +61,7 @@
61 61
 					width: 100%;
62 62
 					display: flex;
63 63
 					justify-content: space-between;
64
+			
64 65
 					.product-score{
65 66
 						color:rgba(255,59,51,1);
66 67
 					}