Browse Source

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

许静 5 years ago
parent
commit
e55c63c3c2

+ 2
- 2
config/dev.js View File

9
     WSS_HOST: '"wss://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.131:8080"',
13
+    WSS_HOST: '"ws://192.168.0.131:8080"',
14
   },
14
   },
15
   weapp: {},
15
   weapp: {},
16
   h5: {}
16
   h5: {}

+ 5
- 9
src/pages/project/banner/index.js View File

13
       height: '200px'
13
       height: '200px'
14
     },
14
     },
15
     onClick: function () { },
15
     onClick: function () { },
16
-    current: 0,
16
+   
17
   }
17
   }
18
 
18
 
19
   changeCurrent (event) {
19
   changeCurrent (event) {
20
-    console.log(event.detail.current)
20
+   
21
     const current = event.detail.current
21
     const current = event.detail.current
22
-    this.setState(
23
-      {
24
-        current: current
25
-      }
26
-    )
22
+   
27
     this.props.onChange(current)
23
     this.props.onChange(current)
28
-    // event.detail = {current, source}
24
+  
29
   }
25
   }
30
 
26
 
31
   onBannerClick (item) {
27
   onBannerClick (item) {
42
           onChange={this.changeCurrent.bind(this)}
38
           onChange={this.changeCurrent.bind(this)}
43
           indicatorDots={indicatorDots}
39
           indicatorDots={indicatorDots}
44
           indicatorActiveColor='rgb(256,256,256)'
40
           indicatorActiveColor='rgb(256,256,256)'
45
-        >{console.log(current)}
41
+        >
46
           {list.map((item, index) => (
42
           {list.map((item, index) => (
47
             <SwiperItem
43
             <SwiperItem
48
               key={index}
44
               key={index}

+ 41
- 26
src/pages/project/detail/index.js View File

69
     recordId: null,
69
     recordId: null,
70
     posterShow: 'none',
70
     posterShow: 'none',
71
     current: 1,
71
     current: 1,
72
+    btnstate: true,
72
   }
73
   }
73
 
74
 
74
   componentWillMount () {
75
   componentWillMount () {
606
               <View className='photos__type__title'>相册</View>
607
               <View className='photos__type__title'>相册</View>
607
               <ScrollView scrollX>
608
               <ScrollView scrollX>
608
                 <View className='photos__type__content'>
609
                 <View className='photos__type__content'>
609
-                  <View className='photos__type__list'>
610
-                    <Image className='photos__img' src={getThumbnail(imgList[0].url)} mode="widthFix" onClick={this.toViewAlbum}></Image>
611
-                    <View className='photos__img__len'>共{imgList.length}张</View>
610
+                  <View className='photos__type__list'>11
611
+                    {/* <Image className='photos__img' src={getThumbnail(imgList[0].url)} mode="widthFix" onClick={this.toViewAlbum}></Image>
612
+                    <View className='photos__img__len'>共{imgList.length}张</View> */}
612
                   </View>
613
                   </View>
613
                 </View>
614
                 </View>
614
               </ScrollView>
615
               </ScrollView>
886
 
887
 
887
   renderVideo () {
888
   renderVideo () {
888
     return (
889
     return (
889
-      <Video
890
+      <View style={{
891
+        height: '278px'
892
+      }}>123
893
+      {/* <Video
890
         style={{
894
         style={{
891
           height: '278px'
895
           height: '278px'
892
         }}
896
         }}
893
-      ></Video>
897
+      ></Video> */}
898
+      </View>
894
     )
899
     )
895
   }
900
   }
896
 
901
 
897
   changeCurrent (current) {
902
   changeCurrent (current) {
898
-    console.log('value:', current)
903
+    // console.log('value:', current)
899
     this.setState({
904
     this.setState({
900
       current: current + 1
905
       current: current + 1
901
     })
906
     })
904
 
909
 
905
 
910
 
906
   render () {
911
   render () {
907
-    const { posterStatus, posterData, loaded } = this.state
912
+    const { posterStatus, posterData, loaded, btnstate } = this.state
908
     const { projectDetail } = this.props
913
     const { projectDetail } = this.props
909
     const { uvList = {} } = projectDetail
914
     const { uvList = {} } = projectDetail
910
     const { total = 0, records = [] } = uvList
915
     const { total = 0, records = [] } = uvList
916
           loaded && (
921
           loaded && (
917
             <View className='detail'>
922
             <View className='detail'>
918
               <Notice></Notice>
923
               <Notice></Notice>
919
-              <View
920
-                className="pro__banner"
921
-                onClick={this.previewImage.bind(this, projectDetail.buildingImg)}>
922
-                {1 && <View> <Banner
923
-                  list={projectDetail.buildingImg}
924
-                  indicatorDots={false}
925
-                  // current
926
-                  onChange={this.changeCurrent.bind(this)}
927
-                  style={{
928
-                    height: '278px'
929
-                  }}
930
-
931
-                ></Banner>
932
-                  <Text className="pro__banner-text">{this.current}/{(projectDetail.buildingImg && projectDetail.buildingImg.length) || 0}</Text></View>}
933
-
934
-                <View className='media-btn'>
935
-                  <View className='video-btn' >视频</View>
936
-                  <View className='img-btn' >图片</View>
924
+              {btnstate && (
925
+                <View
926
+                  className="pro__banner"
927
+                  onClick={this.previewImage.bind(this, projectDetail.buildingImg)}>
928
+                  <Banner
929
+                    list={projectDetail.buildingImg}
930
+                    indicatorDots={false}
931
+                    // current
932
+                    onChange={this.changeCurrent.bind(this)}
933
+                    style={{
934
+                      height: '278px'
935
+                    }}
936
+
937
+                  ></Banner>
938
+                  <Text className="pro__banner-text">{this.current}/{(projectDetail.buildingImg && projectDetail.buildingImg.length) || 0}</Text>
937
                 </View>
939
                 </View>
938
-              </View>
940
+              )}
941
+
942
+              {!btnstate && this.renderVideo()}
943
+
944
+              
945
+              {!btnstate && (<View className='media-btn'>
946
+                <View className='video-btn' onClick={() => this.setState({ btnstate: true })} style={{ background: ' rgba(187, 156, 121, 1)', color: 'rgba(255, 255, 255, 1)' }} >视频</View>
947
+                <View className='img-btn'>图片</View>
948
+              </View>)}
949
+
950
+              {btnstate && (<View className='media-btn'>
951
+                <View className='video-btn'  >视频</View>
952
+                <View className='img-btn' onClick={() => this.setState({ btnstate: false })} style={{ background: ' rgba(187, 156, 121, 1)', color: 'rgba(255, 255, 255, 1)' }}>图片</View>
953
+              </View>)}
939
 
954
 
940
 
955
 
941
               <ScrollView
956
               <ScrollView

+ 5
- 4
src/pages/project/detail/index.scss View File

26
     font-weight: 400;
26
     font-weight: 400;
27
     text-align: center;
27
     text-align: center;
28
     line-height: 64px;
28
     line-height: 64px;
29
-
29
+    color: rgba(53, 53, 53, 1);
30
     display: flex;;
30
     display: flex;;
31
     .video-btn {
31
     .video-btn {
32
       width: 92px;
32
       width: 92px;
33
       height: 64px;
33
       height: 64px;
34
-      background: rgba(187, 156, 121, 1);
35
       border-radius: 12px 0px 0px 12px;
34
       border-radius: 12px 0px 0px 12px;
36
-      color: rgba(255, 255, 255, 1);
35
+  
36
+    
37
     }
37
     }
38
 
38
 
39
     .img-btn {
39
     .img-btn {
40
       width: 92px;
40
       width: 92px;
41
       height: 64px;
41
       height: 64px;
42
-      color: rgba(53, 53, 53, 1);
42
+      border-radius: 0px 12px 12px 0px;
43
     }
43
     }
44
+
44
   }
45
   }
45
 
46
 
46
 
47