diff --git a/src/app/admin/recharge-order/order-list/order-list.component.ts b/src/app/admin/recharge-order/order-list/order-list.component.ts index 91786f8..bedb2be 100644 --- a/src/app/admin/recharge-order/order-list/order-list.component.ts +++ b/src/app/admin/recharge-order/order-list/order-list.component.ts @@ -48,16 +48,18 @@ export class OrderListComponent implements OnInit , OnDestroy { this.init(); this.timer = setInterval(() => { // 设置定时刷新事件,每隔1分钟刷新 this.recharge.countOrder(data => { - this.getRequest(true, this.searchForm.value); - this.notification.info( - '充值订单', - '您有' + data['return_data'] + '条未充值的订单,请尽快充值,点击可查看未充值订单!' - ).onClick.subscribe(() => { - this.searchForm.value.status = 2; + if (data['return_data'] > 0) { this.getRequest(true, this.searchForm.value); - }); + this.notification.info( + '充值订单', + '您有' + data['return_data'] + '条未充值的订单,请尽快充值,点击可查看未充值订单!' + ).onClick.subscribe(() => { + this.searchForm.value.status = 2; + this.getRequest(true, this.searchForm.value); + }); + } }); - }, 10000); + }, 5000); } // 销毁