...
|
...
|
@@ -27,7 +27,7 @@ import ProductCategoryList from '../brandStore/brandStoreSubView/Cells/ProductCa |
|
|
import LoadingIndicator from '../../../common/components/LoadingIndicator';
|
|
|
import LoadMoreIndicator from '../../../common/components/LoadMoreIndicator';
|
|
|
import BrandProductListCell from '../../../common/components/ListCell/ProductListCell';
|
|
|
|
|
|
import Toast from 'react-native-smart-toast'
|
|
|
|
|
|
export default class BrandStore extends Component {
|
|
|
constructor(props) {
|
...
|
...
|
@@ -43,15 +43,13 @@ export default class BrandStore extends Component { |
|
|
});
|
|
|
}
|
|
|
|
|
|
|
|
|
componentDidMount() {
|
|
|
|
|
|
}
|
|
|
|
|
|
componentWillUnmount() {
|
|
|
|
|
|
componentDidUpdate() {
|
|
|
let needShowToast = this.props.receiveCouponResult.isNeedShow;
|
|
|
let showToastMessage = this.props.receiveCouponResult.showMessage;
|
|
|
if (needShowToast) {
|
|
|
this._showToast && this._showToast(showToastMessage);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
_onPressProductFilter(value){
|
|
|
|
|
|
if(value === 'filter'){
|
...
|
...
|
@@ -65,6 +63,27 @@ export default class BrandStore extends Component { |
|
|
|
|
|
}
|
|
|
|
|
|
_showToast(message){
|
|
|
this.props.resetReceiveCouponResult && this.props.resetReceiveCouponResult();
|
|
|
this._toast && this._toast.show({
|
|
|
position: Toast.constants.gravity.center,
|
|
|
duration: 255,
|
|
|
children: message,
|
|
|
animationEnd : () => {
|
|
|
this._toast._toastAnimationToggle = setTimeout(
|
|
|
() => {
|
|
|
this._toast.hide({
|
|
|
duration: 0,
|
|
|
animationEnd: () => {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
1000
|
|
|
);
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
|
|
|
renderSectionHeader(sectionData, sectionID) {
|
|
|
switch(sectionID) {
|
|
|
case 'brandReource': {
|
...
|
...
|
@@ -213,6 +232,7 @@ export default class BrandStore extends Component { |
|
|
categoryFilterList,
|
|
|
filterCategoryDetailFilterList,
|
|
|
filterNameFactors,
|
|
|
receiveCouponResult,
|
|
|
} = this.props;
|
|
|
|
|
|
let {
|
...
|
...
|
@@ -288,7 +308,7 @@ export default class BrandStore extends Component { |
|
|
}}
|
|
|
/>
|
|
|
|
|
|
{productList.isFilter ?
|
|
|
{productList.isFilter ?
|
|
|
<ProductCategoryList
|
|
|
categoryFilterList={categoryFilterList}
|
|
|
filterCategoryDetailFilterList={filterCategoryDetailFilterList}
|
...
|
...
|
@@ -296,7 +316,7 @@ export default class BrandStore extends Component { |
|
|
filterNameFactors={filterNameFactors}
|
|
|
onPressProductFilterRightItem={this.props.onPressProductFilterRightItem}/> : null}
|
|
|
|
|
|
{productList.isMoreFilter ?
|
|
|
{productList.isMoreFilter ?
|
|
|
<BrandProductMoreFilter
|
|
|
productList={productList}
|
|
|
onPressCloseMoreFilter={this.props.onPressCloseMoreFilter}
|
...
|
...
|
@@ -305,10 +325,14 @@ export default class BrandStore extends Component { |
|
|
<LoadingIndicator
|
|
|
isVisible={isFetching}
|
|
|
/>
|
|
|
<Toast
|
|
|
ref={ component => this._toast = component }
|
|
|
marginTop={64}>
|
|
|
Unable to connect to apple store
|
|
|
</Toast>
|
|
|
</View>
|
|
|
);
|
|
|
}
|
|
|
|
|
|
}
|
|
|
let {width, height} = Dimensions.get('window');
|
|
|
let rowWidth = Math.ceil(137.5 * width / 320);
|
...
|
...
|
|