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

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

许静 пре 5 година
родитељ
комит
e55c63c3c2

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

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

+ 5
- 9
src/pages/project/banner/index.js Прегледај датотеку

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

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

@@ -69,6 +69,7 @@ export default class Index extends Component {
69 69
     recordId: null,
70 70
     posterShow: 'none',
71 71
     current: 1,
72
+    btnstate: true,
72 73
   }
73 74
 
74 75
   componentWillMount () {
@@ -606,9 +607,9 @@ export default class Index extends Component {
606 607
               <View className='photos__type__title'>相册</View>
607 608
               <ScrollView scrollX>
608 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 613
                   </View>
613 614
                 </View>
614 615
               </ScrollView>
@@ -886,16 +887,20 @@ export default class Index extends Component {
886 887
 
887 888
   renderVideo () {
888 889
     return (
889
-      <Video
890
+      <View style={{
891
+        height: '278px'
892
+      }}>123
893
+      {/* <Video
890 894
         style={{
891 895
           height: '278px'
892 896
         }}
893
-      ></Video>
897
+      ></Video> */}
898
+      </View>
894 899
     )
895 900
   }
896 901
 
897 902
   changeCurrent (current) {
898
-    console.log('value:', current)
903
+    // console.log('value:', current)
899 904
     this.setState({
900 905
       current: current + 1
901 906
     })
@@ -904,7 +909,7 @@ export default class Index extends Component {
904 909
 
905 910
 
906 911
   render () {
907
-    const { posterStatus, posterData, loaded } = this.state
912
+    const { posterStatus, posterData, loaded, btnstate } = this.state
908 913
     const { projectDetail } = this.props
909 914
     const { uvList = {} } = projectDetail
910 915
     const { total = 0, records = [] } = uvList
@@ -916,26 +921,36 @@ export default class Index extends Component {
916 921
           loaded && (
917 922
             <View className='detail'>
918 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 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 956
               <ScrollView

+ 5
- 4
src/pages/project/detail/index.scss Прегледај датотеку

@@ -26,21 +26,22 @@
26 26
     font-weight: 400;
27 27
     text-align: center;
28 28
     line-height: 64px;
29
-
29
+    color: rgba(53, 53, 53, 1);
30 30
     display: flex;;
31 31
     .video-btn {
32 32
       width: 92px;
33 33
       height: 64px;
34
-      background: rgba(187, 156, 121, 1);
35 34
       border-radius: 12px 0px 0px 12px;
36
-      color: rgba(255, 255, 255, 1);
35
+  
36
+    
37 37
     }
38 38
 
39 39
     .img-btn {
40 40
       width: 92px;
41 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