From 4ad143dc99978fa9e41b6f701045ffa30a479632 Mon Sep 17 00:00:00 2001 From: zhangmeng <494089941@qq.com> Date: Mon, 31 May 2021 10:33:30 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=96=B0=E5=8F=91=E7=A5=A8?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E7=9B=B8=E5=85=B3=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/constants/api_v2.dart | 2 +- lib/pages/user/invoice/invoice_presenter.dart | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/constants/api_v2.dart b/lib/constants/api_v2.dart index 5d84429..493b387 100644 --- a/lib/constants/api_v2.dart +++ b/lib/constants/api_v2.dart @@ -141,7 +141,7 @@ class _InvoiceAoi { String get invoiceList => '/v2/app/order/invoice_user_list'; ///添加常用开票抬头(包括修改功能) - String get addInvocieTitle => '/v2/app/add_invoice_title'; + String get addInvocieTitle => '/v2/app/order/add_invoice_title'; ///用户申请开票 String get applyInvoice => '/v2/app/order/apply_invoice'; diff --git a/lib/pages/user/invoice/invoice_presenter.dart b/lib/pages/user/invoice/invoice_presenter.dart index 7751681..3db4405 100644 --- a/lib/pages/user/invoice/invoice_presenter.dart +++ b/lib/pages/user/invoice/invoice_presenter.dart @@ -51,7 +51,7 @@ class InvoicePresenter { 'uid': UserManager.instance.user.info.id, //用户id 'type': type, "name": name, - "default": defaultValue, + "defaultValue": defaultValue, }; if (type == 1) { param.putIfAbsent('taxnum', () => taxNum); @@ -59,7 +59,7 @@ class InvoicePresenter { param.putIfAbsent('address', () => addr); param.putIfAbsent('bank', () => bankNum); } - await HttpManager.post(InvoiceApi.addLetterHead, param);//暂时用老接口 + await HttpManager.post(APIV2.invoiceApi.addInvocieTitle, param); } Future updateLetterHead( @@ -78,7 +78,7 @@ class InvoicePresenter { 'id': id, 'type': type, "name": name, - "default": defaultValue, + "defaultValue": defaultValue, }; if (type == 1) { param.putIfAbsent('taxnum', () => taxNum); @@ -104,7 +104,7 @@ class InvoicePresenter { }) async { ResultData resultData = await HttpManager.post(APIV2.invoiceApi.applyInvoice, { 'user_id': UserManager.instance.user.info.id, - 'order_id': ids.first, //暂时只能传一个 + 'order_id': ids, 'buyer_name': buyername, 'tax_num': taxnum, 'address': addr, @@ -124,7 +124,7 @@ class InvoicePresenter { Future> getBillList() async { ResultData resultData = await HttpManager.post(APIV2.invoiceApi.invoiceRecord, { - 'userId': UserManager.instance.user.info.id, + 'uid': UserManager.instance.user.info.id, // 'page': page, }); return resultData.data['data'] == null