diff --git a/src/app/admin/agent/agent-edit/agent-edit.component.html b/src/app/admin/agent/agent-edit/agent-edit.component.html
index 211b79d..5fca4b1 100644
--- a/src/app/admin/agent/agent-edit/agent-edit.component.html
+++ b/src/app/admin/agent/agent-edit/agent-edit.component.html
@@ -49,6 +49,18 @@
+
+
+ 代理商类型
+
+
+
+
+
+
+
+
+
代理商地址
diff --git a/src/app/admin/agent/agent-edit/agent-edit.component.ts b/src/app/admin/agent/agent-edit/agent-edit.component.ts
index 69a99ee..44d3e95 100644
--- a/src/app/admin/agent/agent-edit/agent-edit.component.ts
+++ b/src/app/admin/agent/agent-edit/agent-edit.component.ts
@@ -43,7 +43,7 @@ export class AgentEditComponent implements OnInit {
loginName: [null, [Validators.required, ValidatorsService.maxLength(20)]],
password: [null, [Validators.required]],
agentName: [null, [Validators.required]],
- type: [1],
+ type: [null, [Validators.required]],
agentUser: [null, [Validators.required, ValidatorsService.maxLength(50)]],
agentPhone: [null, [Validators.required, ValidatorsService.maxLength(50)]],
agentAddress: [null, [Validators.required, ValidatorsService.maxLength(80)]],
diff --git a/src/app/admin/agent/agent-list/agent-list.component.html b/src/app/admin/agent/agent-list/agent-list.component.html
index 082eecd..cc26920 100644
--- a/src/app/admin/agent/agent-list/agent-list.component.html
+++ b/src/app/admin/agent/agent-list/agent-list.component.html
@@ -34,6 +34,17 @@
+
+
+ 代理商类型
+
+
+
+
+
+
+
+
@@ -75,6 +86,7 @@
编号 |
代理商名称 |
代理商地址 |
+ 邀请链接 |
联系人 |
联系方式 |
创建时间 |
@@ -86,6 +98,7 @@
{{i + 1}} |
{{data.agentName}} |
{{data.agentAddress}} |
+ {{inviteUrl + data.id}} |
{{data.agentUser}} |
{{data.agentPhone}} |
{{data.createTime | date: 'yyyy-MM-dd HH:mm'}} |
@@ -95,6 +108,7 @@
- 分发卡券
+ - 生成二维码
- 绑定优惠券
- 优惠券列表
- 分发列表
diff --git a/src/app/admin/agent/agent-list/agent-list.component.ts b/src/app/admin/agent/agent-list/agent-list.component.ts
index 389b346..3c9d9e7 100644
--- a/src/app/admin/agent/agent-list/agent-list.component.ts
+++ b/src/app/admin/agent/agent-list/agent-list.component.ts
@@ -18,6 +18,8 @@ import {CouponService} from '../../../services/coupon.service';
export class AgentListComponent implements OnInit {
WEB_SERVE_URL = environment.imageUrl;
+ FILE_URL = environment.baseUrl;
+ inviteUrl = environment.inviteUrl;
searchForm: FormGroup; // 搜索框
validateForm: FormGroup; // 搜索框
validateFormDistribute: FormGroup; // 搜索框
@@ -70,7 +72,7 @@ export class AgentListComponent implements OnInit {
agentName: [null],
agentPhone: [null],
status: [null],
- type: [1],
+ type: [null],
});
this.validateForm = this.form.group({
discountId: [null, [Validators.required]],
@@ -306,5 +308,15 @@ export class AgentListComponent implements OnInit {
handleCancelListShow() {
this.isVisibleShow = false;
}
+
+ public generateAgentQrCode(id: number): void {
+ this.agent.generateRechargeAgentQrCode(id, data => {
+ if (data['return_code'] === '000000') {
+ window.location.href = this.FILE_URL + data['return_data'];
+ } else {
+ this.message.error(data['return_msg']);
+ }
+ });
+ }
}
diff --git a/src/environments/environment.prod.ts b/src/environments/environment.prod.ts
index 186a848..c33db19 100644
--- a/src/environments/environment.prod.ts
+++ b/src/environments/environment.prod.ts
@@ -3,4 +3,5 @@ export const environment = {
baseUrl: 'https://hsg.dctpay.com/brest/', // 正式环境服务器地址(请求数据地址)
imageUrl: 'https://hsg.dctpay.com/filesystem/',
key: 'https://hsg.dctpay.com/phone-recharge-H5/index.html?codeValue=',
+ inviteUrl: 'https://hsg.dctpay.com/wx/?action=ic&id=',
};
diff --git a/src/environments/environment.test.ts b/src/environments/environment.test.ts
index 8b919a7..48a753d 100644
--- a/src/environments/environment.test.ts
+++ b/src/environments/environment.test.ts
@@ -3,4 +3,5 @@ export const environment = {
baseUrl: 'https://hsgcs.dctpay.com/brest/', // 测试环境服务器地址(请求数据地址)
imageUrl: 'https://hsgcs.dctpay.com/filesystem/',
key: 'https://hsgcs.dctpay.com/phone-recharge-H5/index.html?codeValue=',
+ inviteUrl: 'https://hsgcs.dctpay.com/wx/?action=ic&id=',
};
diff --git a/src/environments/environment.ts b/src/environments/environment.ts
index 350d219..c9df98d 100644
--- a/src/environments/environment.ts
+++ b/src/environments/environment.ts
@@ -9,6 +9,7 @@ export const environment = {
// baseUrl: 'https://hsgcs.dctpay.com/brest/', // 测试环境服务器地址(请求数据地址)
// imageUrl: 'https://hsgcs.dctpay.com/filesystem/',
key: 'https://hsgcs.dctpay.com/phone-recharge-H5/index.html?codeValue=',
+ inviteUrl: 'https://hsgcs.dctpay.com/wx/?action=ic&id=',
};
/*