周立森 5 years ago
parent
commit
6095fc8376
2 changed files with 13 additions and 13 deletions
  1. 12
    12
      src/pages/project/banner/index.js
  2. 1
    1
      src/pages/project/detail/index.js

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

@@ -13,21 +13,21 @@ export default class SwiperBanner extends Component {
13 13
       height: '200px'
14 14
     },
15 15
     onClick: function () { },
16
-   
16
+
17 17
   }
18 18
 
19 19
   changeCurrent (event) {
20
-    const { isChange } = this.props
20
+    // const { isChange } = this.props
21 21
     const current = event.detail.current
22
-    console.log(isChange,'4444444')
23
-    if(isChange){
24 22
 
25
-       this.props.onChange(current)
26
-    }
27
-    
28
-  // this.props.onChange||C
29
-   
30
-  
23
+    // if(isChange){
24
+
25
+    //    this.props.onChange(current)
26
+    // } 
27
+
28
+  this.props.onChange &&  this.props.onChange(current)
29
+
30
+
31 31
   }
32 32
 
33 33
   onBannerClick (item) {
@@ -36,7 +36,7 @@ export default class SwiperBanner extends Component {
36 36
   render () {
37 37
     const { list, style, indicatorDots, current } = this.props
38 38
 
39
-    console.log('banner',list)
39
+    console.log('banner', list)
40 40
     return (
41 41
       <View className='home-banner' style={style}>
42 42
         <Swiper
@@ -49,7 +49,7 @@ export default class SwiperBanner extends Component {
49 49
         >
50 50
           {list.map((item, index) => (
51 51
             <SwiperItem
52
-              key={index+'swiper'}
52
+              key={index + 'swiper'}
53 53
               onClick={this.onBannerClick.bind(this, item)}
54 54
               className='home-banner__swiper-item'
55 55
             >

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

@@ -1071,7 +1071,7 @@ videoContext.poster = undefined
1071 1071
                     list={projectDetail.buildingImg}
1072 1072
                     indicatorDots={false}
1073 1073
                     // current
1074
-                    isChange = {true}
1074
+                    // isChange = {true}
1075 1075
                     onChange={this.changeCurrent.bind(this)}
1076 1076
                     style={{
1077 1077
                       height: '600rpx'