| @@ -21,7 +21,7 @@ import DeviceInfo from "react-native-device-info"; | |||
| import * as Animatable from 'react-native-animatable'; | |||
| import Swiper from 'react-native-swiper'; | |||
| import Carousel from 'react-native-snap-carousel'; | |||
| import {BoxShadow} from 'react-native-shadow'; | |||
| // import {BoxShadow} from 'react-native-shadow'; | |||
| import StarRatingBar from 'react-native-star-rating-view/StarRatingBar'; | |||
| var testMac = 'FF:FF:FF:FF:FF:FF' | |||
| @@ -129,7 +129,8 @@ export default class MyPage extends Component { | |||
| openRankList: false,//开启播放排名 | |||
| }; | |||
| this.setAdSwiperItemDom = this.setAdSwiperItemDom.bind(this); | |||
| /* this.codePushUpdate = this.codePushUpdate.bind(this); | |||
| this.startAd = this.startAd.bind(this); | |||
| this.showErrMsg = this.showErrMsg.bind(this); */ | |||
| @@ -332,7 +333,7 @@ codePushStatusDidChange(syncStatus) { | |||
| } | |||
| //aaa | |||
| // this.setState({adType: num }) | |||
| this.setState({adType: 2 }) | |||
| this.setState({adType: 1 }) | |||
| adDataList.map(item => { | |||
| item.starNum = 3.4; | |||
| item.logoUrl = item.coverImg; | |||
| @@ -344,6 +345,14 @@ codePushStatusDidChange(syncStatus) { | |||
| this.setState({ | |||
| merchantRankList: arr | |||
| }) | |||
| //aaa | |||
| if (this.state.adType == 1 && this.state.hasRankList) { | |||
| let obj = { | |||
| hasRank: true, | |||
| } | |||
| adDataBgList.push(obj) | |||
| } | |||
| } | |||
| @@ -553,6 +562,8 @@ rankDom() { | |||
| } | |||
| } else if (this.state.adType == 2) { | |||
| animation = 'fadeIn'; | |||
| } else if (this.state.adType == 1) { | |||
| animation = ''; | |||
| } | |||
| rankDomStack.push(this.rankItemDom(item,index,animation)); | |||
| @@ -687,12 +698,20 @@ getContentView() { | |||
| } | |||
| } | |||
| setAdSwiperItemDom(item) { | |||
| console.log(item) | |||
| let contentItem = item.item; | |||
| return ( | |||
| <View style={styles.onlyAdSwiperItem}> | |||
| <Image source={{uri: contentItem.coverImg}} resizeMode='stretch' style={styles.onlyAdTypeItemImg} /> | |||
| </View> | |||
| ) | |||
| if (this.state.hasRankList && contentItem.hasRank != undefined && contentItem.hasRank) { | |||
| return ( | |||
| this.renderRankDom() | |||
| ) | |||
| } else { | |||
| return ( | |||
| <View style={styles.onlyAdSwiperItem}> | |||
| <Image source={{uri: contentItem.coverImg}} resizeMode='stretch' style={styles.onlyAdTypeItemImg} /> | |||
| </View> | |||
| ) | |||
| } | |||
| } | |||
| setSwiperItemDom(item) { | |||
| let contentItem = item.item; | |||
| @@ -717,7 +736,7 @@ setSwiperItemDom(item) { | |||
| } | |||
| return ( | |||
| <View style={styles.carouselItemWrap}> | |||
| <BoxShadow setting={shadowOpt}> | |||
| {/* <BoxShadow setting={shadowOpt}> */} | |||
| <View> | |||
| <View style={styles.contentItemTopForAd} key={index}> | |||
| <Image source={curLogo} resizeMode='center' style={styles.contentItemUpLayerLogo} /> | |||
| @@ -747,7 +766,7 @@ setSwiperItemDom(item) { | |||
| </View> | |||
| </View> | |||
| </BoxShadow> | |||
| {/* </BoxShadow> */} | |||
| </View> | |||
| ) | |||
| } | |||