Browse Source

Merge branch 'v3.5.1' of http://git.ycjcjy.com/zhiyuxing/miniapp-v3 into v3.5.1

张延森 5 years ago
parent
commit
efb3faea43

+ 4
- 4
config/dev.js View File

@@ -5,12 +5,12 @@ module.exports = {
5 5
   defineConstants: {
6 6
     // HOST: '"http://47.101.36.130:8085"',//测试
7 7
     // WSS_HOST: '"wss://47.101.36.130:8085"',
8
-    HOST:  '"https://dev.jinchengjiaye.com"',//测试
9
-    WSS_HOST: '"wss://dev.jinchengjiaye.com"',
8
+    // HOST:  '"https://dev.jinchengjiaye.com"',//测试
9
+    // WSS_HOST: '"wss://dev.jinchengjiaye.com"',
10 10
     // HOST: '"https://lt.pawoma.cn"',
11 11
     // WSS_HOST: '"wss://lt.pawoma.cn"',
12
-    // HOST: '"http://192.168.0.84:8080"',
13
-    // WSS_HOST: '"ws://192.168.0.84:8080"',
12
+    HOST: '"http://192.168.0.84:8080"',
13
+    WSS_HOST: '"ws://192.168.0.84:8080"',
14 14
   },
15 15
   weapp: {},
16 16
   h5: {}

+ 13
- 6
src/pages/project/album/index.js View 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'>

+ 20
- 54
src/pages/project/detail/index.js View File

@@ -172,7 +172,7 @@ export default class Index extends Component {
172 172
     queryActivityList(payload).then(res => {
173 173
       console.log(res, 'Activity')
174 174
       this.setState({
175
-        activityList: res || []
175
+        activityList: res.list || []
176 176
       })
177 177
     })
178 178
   }
@@ -245,9 +245,10 @@ export default class Index extends Component {
245 245
     })
246 246
   }
247 247
 
248
-  toViewAlbum() {
248
+  toViewAlbum (index){
249 249
     const { buildingId } = this.state
250
-    this.navigateTo(`/pages/project/album/index?id=${buildingId}`)
250
+    console.log('1111111',index)
251
+    this.navigateTo(`/pages/project/album/index?id=${buildingId}&current=${index}` )
251 252
   }
252 253
 
253 254
   onViewFans() {
@@ -624,7 +625,7 @@ export default class Index extends Component {
624 625
             <View className='photos__type'>
625 626
               <View className='photos__type__title'>相册</View>
626 627
               <ScrollView scrollX>
627
-                <View className='photos__type__content' onClick={this.toViewAlbum}>
628
+                <View className='photos__type__content' >
628 629
 
629 630
                   <View className="around-tab">
630 631
                     {listimg.map((item, index) => {
@@ -635,19 +636,21 @@ export default class Index extends Component {
635 636
                       console.log(buildingImgUrl, 'buildingImgUrl')
636 637
 
637 638
                       // if (buildingImgUrl != null) {
638
-                      return (<View key={index + "listimg"}>
639
+                      return ( <View key={index + "listimg"}>
639 640
                         {buildingImgUrl != null && (<View
640 641
                           style={{ marginRight: '8px' }}
642
+                          
641 643
                         >
642 644
 
643 645
                           <View>
644
-                            <Image className='albumimg' src={getThumbnail(buildingImgList[0].url)} ></Image>
646
+                            <Image className='albumimg' src={getThumbnail(buildingImgList[0].url)} onClick={()=>this.toViewAlbum(index)}></Image>
645 647
                             <View style={{ width: '218rpx', display: 'flex', justifyContent: 'center' }} >
646 648
                               <View style={{ overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap' }}> {apartmentName}  </View>
647 649
                               <View> ({buildingImgList.length})</View>
648 650
                             </View>
649 651
                           </View>
650
-                        </View>)}</View>
652
+                        </View>)}
653
+                        </View>
651 654
                       )
652 655
                       // }
653 656
 
@@ -864,40 +867,22 @@ export default class Index extends Component {
864 867
     )
865 868
   }
866 869
   renderActivities() {
867
-    // renderGroup () {
868
-    //   const { groupList } = this.state
869
-    //   return (
870
-    //     <Block>
871
-    //       {groupList.length > 0 &&
872
-    //         <View className="activity">
873
-    //           <View className="title">拼团活动</View>
874
-    //           <View
875
-    //             style={{ position: 'relative' }}>
876
-    //             <HelpGroupBanner
877
-    //               style={{ height: '250rpx' }}
878
-    //               indicatorDots={false}
879
-    //               list={groupList}
880
-    //               onClick={this.handleGroupClick}>
881
-    //             </HelpGroupBanner>
882
-    //           </View>
883
-    //         </View>
884
-    //       }
885
-    //     </Block>
886
-    //   )
887
-    // }
870
+
871
+ 
888 872
     const { activityList } = this.state
873
+   
889 874
     return (
890 875
       <Block>
891 876
         {
892 877
           activityList.length > 0 && (
893 878
             <View className="activity" >
894
-              {console.log(activityList, '----activityList-----')}
879
+           
895 880
               <View className="section-head">
896
-                <Text className="section-head__title">热门活动</Text>
897
-                <View className="section-head__more" onClick={this.handleActivityMoreClick}>
898
-                  更多活动<Text className="iconfont icon-more"></Text>
899
-                </View>
900
-              </View>
881
+                 <Text className="section-head__title" style={{margin: '10rpx 0 40rpx 35rpx'}}>热门活动</Text>
882
+                 <View className="section-head__more"  style={{marginRight: '20rpx'}} onClick={this.handleActivityMoreClick}>
883
+                   更多活动<Text className="iconfont icon-more"></Text>
884
+                 </View>
885
+               </View>
901 886
               <View
902 887
                 style={{ position: 'relative' }}>
903 888
                 <HelpGroupBanner
@@ -912,26 +897,7 @@ export default class Index extends Component {
912 897
 
913 898
               </View>
914 899
             </View>
915
-            // <View classN                                                                                                                                                                                                                                                                                                                                                                                                                                                    ame="house-type">
916
-            //   <View className="section-head">
917
-            //     <Text className="section-head__title">热门活动</Text>
918
-            //     <View className="section-head__more" onClick={this.handleActivityMoreClick}>
919
-            //       更多活动<Text className="iconfont icon-more"></Text>
920
-            //     </View>
921
-            //   </View>
922
-            //   <ScrollView scrollX>
923
-            //     <View className="house-type__list" style="margin-top:10px">
924
-            //       {
925
-            //         activityList.map(item => (
926
-            //           <View className="news-item" key={item.dynamicId} onClick={this.handActivityItemClick.bind(this, item.dynamicId)}>
927
-            //             <Image mode="widthFix" src={getThumbnail(item.imgUrl)} className="news-item__pic"></Image>
928
-            //             <View className="news-item__title">{item.title}</View>
929
-            //           </View>
930
-            //         ))
931
-            //       }
932
-            //     </View>
933
-            //   </ScrollView>
934
-            // </View>
900
+      
935 901
           )
936 902
         }
937 903
       </Block>

+ 21
- 21
src/pages/shop/index.js View File

@@ -3,7 +3,7 @@ import { getWindowHeight } from '@utils/style'
3 3
 import { AtTabs, AtTabsPane } from 'taro-ui'
4 4
 import "taro-ui/dist/style/components/tabs.scss"
5 5
 import './index.scss'
6
-import {getThumbnail } from '@utils/tools'
6
+import { getThumbnail } from '@utils/tools'
7 7
 // import Search from '@components/search'
8 8
 import Banner from './banner'
9 9
 import ready from '@utils/ready'
@@ -37,10 +37,10 @@ export default class Shop extends Component {
37 37
     goodsList: [],
38 38
     user: {},
39 39
     current: 0,
40
-    points:0
40
+    points: 0
41 41
   }
42 42
 
43
-  componentDidShow() {
43
+  componentDidShow () {
44 44
 
45 45
     Taro.showLoading()
46 46
     ready.queue(() => {
@@ -53,7 +53,7 @@ export default class Shop extends Component {
53 53
     Taro.hideLoading()
54 54
   }
55 55
 
56
-  loadBannerList() {
56
+  loadBannerList () {
57 57
     const payload = {
58 58
       showPosition: 'mall',
59 59
       cityId: this.props.curCity.id
@@ -65,7 +65,7 @@ export default class Shop extends Component {
65 65
     })
66 66
   }
67 67
 
68
-  loadList() {
68
+  loadList () {
69 69
 
70 70
 
71 71
     Taro.showLoading()
@@ -88,7 +88,7 @@ export default class Shop extends Component {
88 88
     })
89 89
   }
90 90
 
91
-  loadGoodsBuilding() {
91
+  loadGoodsBuilding () {
92 92
     const payload = {
93 93
 
94 94
       cityId: this.props.curCity.id
@@ -115,7 +115,7 @@ export default class Shop extends Component {
115 115
     })
116 116
   }
117 117
 
118
-  handleClick(value) {
118
+  handleClick (value) {
119 119
 
120 120
     this.setState({
121 121
       current: value
@@ -136,32 +136,32 @@ export default class Shop extends Component {
136 136
 
137 137
   }
138 138
 
139
-  onViewDetail(item) {
139
+  onViewDetail (item) {
140 140
     Taro.navigateTo({
141 141
       url: `/pages/shop/detail/index?id=${item.goodsId}`
142 142
     })
143 143
   }
144 144
 
145
-  goPointRecords() {
145
+  goPointRecords () {
146 146
     const { person: { points } } = this.props.userInfo
147 147
     Taro.navigateTo({
148 148
       url: `/pages/shop/integralDetail/index?points=` + points
149 149
     })
150 150
   }
151 151
 
152
-  goPointRule() {
152
+  goPointRule () {
153 153
     Taro.navigateTo({
154 154
       url: `/pages/shop/rule/index`
155 155
     })
156 156
   }
157 157
 
158
-  handleLocationClick() {
158
+  handleLocationClick () {
159 159
     Taro.navigateTo({
160 160
       url: `/pages/city/index`
161 161
     })
162 162
   }
163 163
 
164
-  doSign() {
164
+  doSign () {
165 165
     const { user: { id, havaSigned } } = this.state
166 166
     if (havaSigned) {
167 167
       return
@@ -183,7 +183,7 @@ export default class Shop extends Component {
183 183
     })
184 184
   }
185 185
 
186
-  loadUserInfo() {
186
+  loadUserInfo () {
187 187
     // debugger
188 188
     queryUserInfo().then(user => {
189 189
       console.log(user, "user")
@@ -196,14 +196,14 @@ export default class Shop extends Component {
196 196
     })
197 197
   }
198 198
 
199
-  renderLogin() {
199
+  renderLogin () {
200 200
     return <Authorize></Authorize>
201 201
   }
202 202
   handleBannerClick = (item) => {
203 203
     console.log(this, "this")
204 204
     this.redirectTo(item)
205 205
   }
206
-  redirectTo({ targetId, contentType, buildingId } = {}) {
206
+  redirectTo ({ targetId, contentType, buildingId } = {}) {
207 207
     switch (contentType) {
208 208
       // 项目
209 209
       case 'project':
@@ -248,7 +248,7 @@ export default class Shop extends Component {
248 248
     }
249 249
   }
250 250
 
251
-  renderGoods() {
251
+  renderGoods () {
252 252
     const { goods: { records = [] } } = this.props
253 253
     const { goodsList, goodsBuilding, current } = this.state
254 254
 
@@ -261,9 +261,9 @@ export default class Shop extends Component {
261 261
             {
262 262
               goodsList.length &&
263 263
               goodsList.map(item => (
264
-                
264
+
265 265
                 <View className="item" key={item.goodsId} onClick={this.onViewDetail.bind(this, item)}>
266
-                  {console.log(item,'--item---')}
266
+                  {console.log(item, '--item---')}
267 267
                   <Image className="item__img" mode="aspectFill" src={item.imgUrl} />
268 268
                   <View className="item__title">{item.goodsName}</View>
269 269
                   <View className="item__des">
@@ -288,7 +288,7 @@ export default class Shop extends Component {
288 288
         {
289 289
           goodsBuilding && goodsBuilding.length >= 2 &&
290 290
           <View className="list__wrap">
291
-            <View className="hot_title" style={{marginBottom:'0'}}>热门商品</View>
291
+            <View className="hot_title" style={{ marginBottom: '0' }}>热门商品</View>
292 292
             <AtTabs scroll tabDirection='horizontal' current={current} tabList={goodsBuilding} onClick={this.handleClick.bind(this)}>
293 293
 
294 294
               {goodsBuilding.map((l_item, index) => (
@@ -330,7 +330,7 @@ export default class Shop extends Component {
330 330
     )
331 331
   }
332 332
 
333
-  renderDetail() {
333
+  renderDetail () {
334 334
     const { user, points } = this.state
335 335
     const { userInfo: { person }, curCity } = this.props
336 336
     const { bannerList = [] } = this.state
@@ -389,7 +389,7 @@ export default class Shop extends Component {
389 389
     );
390 390
   }
391 391
 
392
-  render() {
392
+  render () {
393 393
     const { person: { phone, tel } } = this.props.userInfo
394 394
 
395 395
     return (

+ 1
- 1
src/pages/shop/record/index.js View 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 View 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
 					}