Преглед изворни кода

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

张延森 пре 5 година
родитељ
комит
efb3faea43

+ 4
- 4
config/dev.js Прегледај датотеку

5
   defineConstants: {
5
   defineConstants: {
6
     // HOST: '"http://47.101.36.130:8085"',//测试
6
     // HOST: '"http://47.101.36.130:8085"',//测试
7
     // WSS_HOST: '"wss://47.101.36.130:8085"',
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
     // HOST: '"https://lt.pawoma.cn"',
10
     // HOST: '"https://lt.pawoma.cn"',
11
     // WSS_HOST: '"wss://lt.pawoma.cn"',
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
   weapp: {},
15
   weapp: {},
16
   h5: {}
16
   h5: {}

+ 13
- 6
src/pages/project/album/index.js Прегледај датотеку

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

+ 20
- 54
src/pages/project/detail/index.js Прегледај датотеку

172
     queryActivityList(payload).then(res => {
172
     queryActivityList(payload).then(res => {
173
       console.log(res, 'Activity')
173
       console.log(res, 'Activity')
174
       this.setState({
174
       this.setState({
175
-        activityList: res || []
175
+        activityList: res.list || []
176
       })
176
       })
177
     })
177
     })
178
   }
178
   }
245
     })
245
     })
246
   }
246
   }
247
 
247
 
248
-  toViewAlbum() {
248
+  toViewAlbum (index){
249
     const { buildingId } = this.state
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
   onViewFans() {
254
   onViewFans() {
624
             <View className='photos__type'>
625
             <View className='photos__type'>
625
               <View className='photos__type__title'>相册</View>
626
               <View className='photos__type__title'>相册</View>
626
               <ScrollView scrollX>
627
               <ScrollView scrollX>
627
-                <View className='photos__type__content' onClick={this.toViewAlbum}>
628
+                <View className='photos__type__content' >
628
 
629
 
629
                   <View className="around-tab">
630
                   <View className="around-tab">
630
                     {listimg.map((item, index) => {
631
                     {listimg.map((item, index) => {
635
                       console.log(buildingImgUrl, 'buildingImgUrl')
636
                       console.log(buildingImgUrl, 'buildingImgUrl')
636
 
637
 
637
                       // if (buildingImgUrl != null) {
638
                       // if (buildingImgUrl != null) {
638
-                      return (<View key={index + "listimg"}>
639
+                      return ( <View key={index + "listimg"}>
639
                         {buildingImgUrl != null && (<View
640
                         {buildingImgUrl != null && (<View
640
                           style={{ marginRight: '8px' }}
641
                           style={{ marginRight: '8px' }}
642
+                          
641
                         >
643
                         >
642
 
644
 
643
                           <View>
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
                             <View style={{ width: '218rpx', display: 'flex', justifyContent: 'center' }} >
647
                             <View style={{ width: '218rpx', display: 'flex', justifyContent: 'center' }} >
646
                               <View style={{ overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap' }}> {apartmentName}  </View>
648
                               <View style={{ overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap' }}> {apartmentName}  </View>
647
                               <View> ({buildingImgList.length})</View>
649
                               <View> ({buildingImgList.length})</View>
648
                             </View>
650
                             </View>
649
                           </View>
651
                           </View>
650
-                        </View>)}</View>
652
+                        </View>)}
653
+                        </View>
651
                       )
654
                       )
652
                       // }
655
                       // }
653
 
656
 
864
     )
867
     )
865
   }
868
   }
866
   renderActivities() {
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
     const { activityList } = this.state
872
     const { activityList } = this.state
873
+   
889
     return (
874
     return (
890
       <Block>
875
       <Block>
891
         {
876
         {
892
           activityList.length > 0 && (
877
           activityList.length > 0 && (
893
             <View className="activity" >
878
             <View className="activity" >
894
-              {console.log(activityList, '----activityList-----')}
879
+           
895
               <View className="section-head">
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
               <View
886
               <View
902
                 style={{ position: 'relative' }}>
887
                 style={{ position: 'relative' }}>
903
                 <HelpGroupBanner
888
                 <HelpGroupBanner
912
 
897
 
913
               </View>
898
               </View>
914
             </View>
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
       </Block>
903
       </Block>

+ 21
- 21
src/pages/shop/index.js Прегледај датотеку

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

+ 1
- 1
src/pages/shop/record/index.js Прегледај датотеку

74
 									<Image className="botttom_img" mode="aspectFill" src={item.image} />
74
 									<Image className="botttom_img" mode="aspectFill" src={item.image} />
75
 									<View className="bottom-right">
75
 									<View className="bottom-right">
76
 										<View className="bottom-right-top">
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
 											<View className="product-score">{item.points}积分</View>
78
 											<View className="product-score">{item.points}积分</View>
79
 										</View>
79
 										</View>
80
 										<View className="bottom-right-down">领取地址:{item.address}</View>
80
 										<View className="bottom-right-down">领取地址:{item.address}</View>

+ 1
- 0
src/pages/shop/record/index.scss Прегледај датотеку

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