From 91aea05052c12ef253cfe85613d1f6b7af61941d Mon Sep 17 00:00:00 2001 From: Sum1Dream <418471657@qq.com> Date: Wed, 5 Jan 2022 11:48:23 +0800 Subject: [PATCH] 1 --- .../order/order-coupon/order-coupon.component.html | 9 +++++++++ .../order/order-coupon/order-coupon.component.ts | 12 ++++++++---- src/app/services/agent.service.ts | 6 ++++-- src/environments/environment.ts | 8 ++++---- 4 files changed, 25 insertions(+), 10 deletions(-) diff --git a/src/app/admin/order/order-coupon/order-coupon.component.html b/src/app/admin/order/order-coupon/order-coupon.component.html index 65a1c97..a194e33 100644 --- a/src/app/admin/order/order-coupon/order-coupon.component.html +++ b/src/app/admin/order/order-coupon/order-coupon.component.html @@ -3,6 +3,15 @@
+ + 卡券类型 + + + + + + +
销售总额: ¥{{countData['salesCountPrice']}}
剩余总额: ¥{{countData['surplusCountPrice']}}
diff --git a/src/app/admin/order/order-coupon/order-coupon.component.ts b/src/app/admin/order/order-coupon/order-coupon.component.ts index 4646120..bf686a9 100644 --- a/src/app/admin/order/order-coupon/order-coupon.component.ts +++ b/src/app/admin/order/order-coupon/order-coupon.component.ts @@ -27,7 +27,7 @@ export class OrderCouponComponent implements OnInit { loading = true; isVisible = false; id; - + type = 1; countData = {}; constructor( private form: FormBuilder, @@ -40,13 +40,17 @@ export class OrderCouponComponent implements OnInit { } ngOnInit(): void { - this.agent.getAgentCount(data => { - this.countData = data['return_data']; - }); this.searchForm = this.form.group({ status: [null], salesCode: [null], }); + this.getAgentCount(this.type); + } + + public getAgentCount(type) { + this.agent.getAgentCount(type , data => { + this.countData = data['return_data']; + }); } // 查询列表 diff --git a/src/app/services/agent.service.ts b/src/app/services/agent.service.ts index 0980aff..cef3b22 100644 --- a/src/app/services/agent.service.ts +++ b/src/app/services/agent.service.ts @@ -170,10 +170,12 @@ export class AgentService { /** * 代理商统计 * + * @param type 类型 * @param callBack 回调 */ - public getAgentCount(callBack) { - this.http.get(environment.baseUrl + 'highCouponAgent/getAgentCount').subscribe(data => { + public getAgentCount(type , callBack) { + console.log(type); + this.http.get(environment.baseUrl + 'highCouponAgent/getAgentCount?type=' + type).subscribe(data => { callBack(data); }); } diff --git a/src/environments/environment.ts b/src/environments/environment.ts index a2d6d6f..5a795b3 100644 --- a/src/environments/environment.ts +++ b/src/environments/environment.ts @@ -4,10 +4,10 @@ export const environment = { production: false, - baseUrl: 'http://localhost:9302/brest/', // 测试环境服务器地址(请求数据地址) - imageUrl: 'http://localhost:9302/filesystem/', - // baseUrl: 'https://hsgcs.dctpay.com/brest/', // 测试环境服务器地址(请求数据地址) - // imageUrl: 'https://hsgcs.dctpay.com/filesystem/', + // baseUrl: 'http://localhost:9302/brest/', // 测试环境服务器地址(请求数据地址) + // imageUrl: 'http://localhost:9302/filesystem/', + baseUrl: 'https://hsg.dctpay.com/brest/', // 测试环境服务器地址(请求数据地址) + imageUrl: 'https://hsg.dctpay.com/filesystem/', key: 'https://hsgcs.dctpay.com/phone-recharge-H5/index.html?codeValue=', inviteUrl: 'https://hsgcs.dctpay.com/wx/?action=ic&id=', };