Authored by 于良

领券中心优化 review by shixiang

... ... @@ -140,12 +140,13 @@ export default class CouponCenter extends Component {
{this.props.showSuccessTip ? <Prompt
icon={require('../../images/hud_success.png')}
text={'领取成功'}
duration={800}
onPromptHidden={this.props.onPromptHidden}
/> : null}
{this.props.showNetErrorTip ? <Prompt
text={desc}
duration={3000}
duration={800}
onPromptHidden={this.props.onNetPromptHidden}
/> : null}
... ...
... ... @@ -51,12 +51,12 @@ class CouponCenterContainer extends Component {
this._onPromptHidden = this._onPromptHidden.bind(this);
this._onNetPromptHidden = this._onNetPromptHidden.bind(this);
this.subscription = NativeAppEventEmitter.addListener(
'UserDidLoginEvent',
(reminder) => {
this.props.actions.couponCenter(true);
}
);
// this.subscription = NativeAppEventEmitter.addListener(
// 'UserDidLoginEvent',
// (reminder) => {
// this.props.actions.couponCenter(true);
// }
// );
}
componentDidMount() {
... ... @@ -64,7 +64,7 @@ class CouponCenterContainer extends Component {
}
componentWillUnmount() {
this.subscription && this.subscription.remove();
// this.subscription && this.subscription.remove();
}
_onPressBanner(url) {
... ...
... ... @@ -232,7 +232,7 @@ export function getCoupon(couponID) {
.catch(error => {
ReactNative.NativeModules.YH_CommonHelper.login()
.then(uid => {
getCoupon(couponID, uid);
})
.catch(error => {
... ...
... ... @@ -201,7 +201,7 @@ let styles = StyleSheet.create({
backgroundColor: '#ff9e0d',
},
nameContainer: {
justifyContent: 'center',
// justifyContent: 'center',
marginTop: nameMarginTop,
width: rowWidth,
height: nameHeight,
... ... @@ -229,7 +229,7 @@ let styles = StyleSheet.create({
},
deleteLine: {
position: 'absolute',
top: (16 / 2) - 0.5,
top: (16 / 2) - 0.8,
left: 0,
right: 0,
height: 1,
... ...