...
|
...
|
@@ -10,7 +10,8 @@ export default class MyCoupon extends Component { |
|
|
constructor() {
|
|
|
super(...arguments);
|
|
|
this.state = {
|
|
|
couponList: []
|
|
|
couponList: [],
|
|
|
complete: false
|
|
|
};
|
|
|
}
|
|
|
|
...
|
...
|
@@ -22,7 +23,7 @@ export default class MyCoupon extends Component { |
|
|
|
|
|
async getCouponList() {
|
|
|
let couponList = await model.myCouponList();
|
|
|
this.setState({couponList});
|
|
|
this.setState({couponList, complete: true});
|
|
|
};
|
|
|
|
|
|
showNote = (value) => {
|
...
|
...
|
@@ -35,7 +36,8 @@ export default class MyCoupon extends Component { |
|
|
};
|
|
|
|
|
|
render() {
|
|
|
let {couponList} = this.state;
|
|
|
let {couponList, complete} = this.state;
|
|
|
if (!complete) return;
|
|
|
return (
|
|
|
<View className={couponList && couponList.length ? 'page bg' : 'page'}>
|
|
|
<View className='title'>优惠券</View>
|
...
|
...
|
|