| @@ -627,6 +627,8 @@ getAdView(){ | |||||
| </ImageBackground> | </ImageBackground> | ||||
| ); | ); | ||||
| } else if (this.state.adType == 2) { | } else if (this.state.adType == 2) { | ||||
| let curWidthNum = 394*PixelRatio.get(); | |||||
| return ( | return ( | ||||
| // <ImageBackground style={styles.adTypeBg} source={require('./image/ad1.jpg')}> | // <ImageBackground style={styles.adTypeBg} source={require('./image/ad1.jpg')}> | ||||
| <ImageBackground style={styles.adTypeBg} resizeMode="stretch" source={{ uri: this.state.curCoverImgUrl}}> | <ImageBackground style={styles.adTypeBg} resizeMode="stretch" source={{ uri: this.state.curCoverImgUrl}}> | ||||
| @@ -640,8 +642,8 @@ getAdView(){ | |||||
| ref={'carousel'} | ref={'carousel'} | ||||
| data={adDataList} | data={adDataList} | ||||
| renderItem={this.setSwiperItemDom} | renderItem={this.setSwiperItemDom} | ||||
| sliderWidth={394*PixelRatio.get()} | |||||
| itemWidth={394*PixelRatio.get()} | |||||
| sliderWidth={curWidthNum} | |||||
| itemWidth={curWidthNum} | |||||
| itemHeight={134} | itemHeight={134} | ||||
| sliderHeight={134} | sliderHeight={134} | ||||
| activeSlideOffset={0} | activeSlideOffset={0} | ||||
| @@ -1175,8 +1177,8 @@ MyPage = CodePush(codePushOptions)(MyPage); | |||||
| contentItemTopForAd:{ | contentItemTopForAd:{ | ||||
| flex: 1, | flex: 1, | ||||
| width: 1127/PixelRatio.get(), | |||||
| // width: '100%', | |||||
| // width: 1127/PixelRatio.get(), | |||||
| width: '100%', | |||||
| height:'100%', | height:'100%', | ||||
| paddingLeft: 22/PixelRatio.get(), | paddingLeft: 22/PixelRatio.get(), | ||||
| paddingRight: 26/PixelRatio.get(), | paddingRight: 26/PixelRatio.get(), | ||||