周立森 5 年前
父节点
当前提交
6095fc8376
共有 2 个文件被更改,包括 13 次插入13 次删除
  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 查看文件

13
       height: '200px'
13
       height: '200px'
14
     },
14
     },
15
     onClick: function () { },
15
     onClick: function () { },
16
-   
16
+
17
   }
17
   }
18
 
18
 
19
   changeCurrent (event) {
19
   changeCurrent (event) {
20
-    const { isChange } = this.props
20
+    // const { isChange } = this.props
21
     const current = event.detail.current
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
   onBannerClick (item) {
33
   onBannerClick (item) {
36
   render () {
36
   render () {
37
     const { list, style, indicatorDots, current } = this.props
37
     const { list, style, indicatorDots, current } = this.props
38
 
38
 
39
-    console.log('banner',list)
39
+    console.log('banner', list)
40
     return (
40
     return (
41
       <View className='home-banner' style={style}>
41
       <View className='home-banner' style={style}>
42
         <Swiper
42
         <Swiper
49
         >
49
         >
50
           {list.map((item, index) => (
50
           {list.map((item, index) => (
51
             <SwiperItem
51
             <SwiperItem
52
-              key={index+'swiper'}
52
+              key={index + 'swiper'}
53
               onClick={this.onBannerClick.bind(this, item)}
53
               onClick={this.onBannerClick.bind(this, item)}
54
               className='home-banner__swiper-item'
54
               className='home-banner__swiper-item'
55
             >
55
             >

+ 1
- 1
src/pages/project/detail/index.js 查看文件

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