Authored by 陈林

Merge branch 'V1217_Date' into V1230_Date

... ... @@ -97,11 +97,14 @@ export default class productCell extends Component {
}
}else {
let highPrice = data && parseInt(data.get('highPrice'));
let lowPrice = data && parseInt(data.get('lowPrice'));
let cutPrice = highPrice - lowPrice;
return (
<View style={styles.actionContainer}>
<View style={styles.cutActionContainer}>
<Image source={require('../../images/cutPriceBg.png')} style={styles.cutPriceBg}></Image>
<Text style={styles.cutPrice}>-¥{data && data.get('lowPrice')}</Text>
<Text style={styles.cutPrice}>-¥{cutPrice}</Text>
</View>
</View>
)
... ...
... ... @@ -11,6 +11,8 @@ import HaggleList from '../components/HaggleList'
import LoadingIndicator from '../../common/components/LoadingIndicator';
import { TipsAlertItem, TipsAlert } from '../../common/components/YH_TipsAlert';
import { YHAlert, YHAlertItem } from '../components/cell/YH_Alert.js';
import DeviceInfo from 'react-native-device-info';
import Prompt from '../../common/components/Prompt';
const actions = [
allianceActions,
... ... @@ -38,7 +40,7 @@ function mapDispatchToProps(dispatch) {
class HaggleListContainer extends Component {
constructor(props) {
super(props);
this.state = {showAlert:false, productItem:null};
this.state = {showAlert:false, productItem:null, showVersionAlert:false};
this._onEndReached = this._onEndReached.bind(this);
this._onPressProduct = this._onPressProduct.bind(this);
this._jumpHaggleDetail = this._jumpHaggleDetail.bind(this);
... ... @@ -47,6 +49,7 @@ class HaggleListContainer extends Component {
this._timerStop = this._timerStop.bind(this);
this._resourceJumpWithUrl = this._resourceJumpWithUrl.bind(this);
this._onRefresh = this._onRefresh.bind(this);
this._onPromptHidden = this._onPromptHidden.bind(this);
}
componentDidMount() {
... ... @@ -124,7 +127,17 @@ class HaggleListContainer extends Component {
}
_onPromptHidden() {
this.setState({showVersionAlert:false});
}
_onPressProduct(product) {
let app_version = DeviceInfo.getVersion();
if (Platform.OS === 'ios' && app_version === '6.8.3') {
this.setState({showVersionAlert:true});
return;
}
let {categoryType} = this.props.haggle;
let that = this;
... ... @@ -182,6 +195,13 @@ class HaggleListContainer extends Component {
onRefresh={this._onRefresh}
/>
<LoadingIndicator isVisible={isFetching && !isPullToRefresh}/>
{this.state.showVersionAlert ? <Prompt
text={'您的版本不支持该功能,请更新版本!'}
duration={1600}
onPromptHidden={this._onPromptHidden}
/> : null}
</View>
);
}
... ...