diff options
author | 2020-09-08 09:50:48 +0800 | |
---|---|---|
committer | 2020-09-08 10:03:42 +0800 | |
commit | 43cb242d5a78e86786d4274fc539d81680fc15c4 (patch) | |
tree | e4635ef8ee1c7bc7102f6333e3ed2488b27b8cab /usecaseui-portal/src/app/views/services/slicing-management/csmf-slicing-business-management/business-order | |
parent | 926b57b4d540c73f1930e6d2d2070e5ac6939e5d (diff) |
feat: Optimize the public request method of axios
Change-Id: Iab9e86c66628c9a0c39e0a9ed56607417805c9d4
Issue-ID: USECASEUI-444
Signed-off-by: cyuamber <xuranyjy@chinamobile.com>
Diffstat (limited to 'usecaseui-portal/src/app/views/services/slicing-management/csmf-slicing-business-management/business-order')
-rw-r--r-- | usecaseui-portal/src/app/views/services/slicing-management/csmf-slicing-business-management/business-order/business-order.component.ts | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/usecaseui-portal/src/app/views/services/slicing-management/csmf-slicing-business-management/business-order/business-order.component.ts b/usecaseui-portal/src/app/views/services/slicing-management/csmf-slicing-business-management/business-order/business-order.component.ts index c624c64c..cac2bb29 100644 --- a/usecaseui-portal/src/app/views/services/slicing-management/csmf-slicing-business-management/business-order/business-order.component.ts +++ b/usecaseui-portal/src/app/views/services/slicing-management/csmf-slicing-business-management/business-order/business-order.component.ts @@ -193,20 +193,14 @@ export class BusinessOrderComponent implements OnInit { let paramsObj = { slicing_order_info: this.slicing_order_info }; - console.log(paramsObj, "-----paramsObj"); this.isSpinning = true; - this.myhttp.csmfSlicingPurchase(paramsObj).subscribe(res => { - const {result_header: {result_code}} = res; - this.isSpinning = false; - if (+result_code === 200) { - this.handleCancel(); - }else{ - this.message.error(res.result_header.result_message) - } - }, (err) => { - this.message.error(err); + let csmfSlicingPurchaseFailedCallback = () => { this.handleCancel(); this.isSpinning = false; + } + this.myhttp.csmfSlicingPurchase(paramsObj, csmfSlicingPurchaseFailedCallback).then(res => { + this.isSpinning = false; + this.handleCancel(); }) } } |