|
@@ -101,30 +101,6 @@ class OrderListViewController: UIViewController {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- /// 订单列表
|
|
|
|
- ///
|
|
|
|
- /// - Parameter page: <#page description#>
|
|
|
|
- func orderPurchaseOrderListApiAll(page:Int = 1) {
|
|
|
|
-
|
|
|
|
- SwiftMoyaNetWorkServiceOrder.shared().orderPurchaseOrderListApi(page: page, status: -1) {
|
|
|
|
- [weak self] (orderListModel) -> (Void) in
|
|
|
|
- let orderListModel = orderListModel as? OrderListModel
|
|
|
|
- if orderListModel?.pagination?.currentPage ?? 1 <= orderListModel?.pagination?.totalPages ?? 1 {
|
|
|
|
- if orderListModel?.pagination?.currentPage == 1{
|
|
|
|
- self?.orderModelArray.removeAll()
|
|
|
|
- self?.orderListView.tableView.resetNoMoreData()
|
|
|
|
- }
|
|
|
|
- self?.orderModelArray = (self?.orderModelArray)! + (orderListModel?.data!)!
|
|
|
|
- self?.orderListView.tableView.reloadData()
|
|
|
|
- if self?.orderModelArray.isEmpty ?? true {
|
|
|
|
- self?.orderListView.tableView.isHiddenFooter(true)
|
|
|
|
- }
|
|
|
|
- }else {
|
|
|
|
- self?.orderListView.tableView.endFooterNoMoreData()
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
func setButton(button:UIButton,orderModel:OrderModel) {
|
|
func setButton(button:UIButton,orderModel:OrderModel) {
|
|
if let setButtonBlock = setButtonBlock {
|
|
if let setButtonBlock = setButtonBlock {
|
|
setButtonBlock(button,orderModel)
|
|
setButtonBlock(button,orderModel)
|