diff --git a/src/app/admin/activate/activate-list/activate-list.component.html b/src/app/admin/activate/activate-list/activate-list.component.html
index 10cc440..b1b9c1c 100644
--- a/src/app/admin/activate/activate-list/activate-list.component.html
+++ b/src/app/admin/activate/activate-list/activate-list.component.html
@@ -90,6 +90,8 @@
编辑
{{data.status === 1 ? '禁用': '启用'}}
+
+ 中奖记录
diff --git a/src/app/admin/activate/activate-list/activate-list.component.ts b/src/app/admin/activate/activate-list/activate-list.component.ts
index 0bd1752..6590426 100644
--- a/src/app/admin/activate/activate-list/activate-list.component.ts
+++ b/src/app/admin/activate/activate-list/activate-list.component.ts
@@ -96,7 +96,14 @@ export class ActivateListComponent implements OnInit {
}).then(r => console.log(r));
}
-
+ // 跳转中奖记录
+ public jumpLotteryRecord(id: number): void {
+ this.router.navigate(['/admin/activate/activate-lottery-record'], {
+ queryParams: {
+ activityId: id
+ }
+ }).then(r => console.log(r));
+ }
}
diff --git a/src/app/admin/activate/activate-lottery-record/activate-lottery-record.component.html b/src/app/admin/activate/activate-lottery-record/activate-lottery-record.component.html
new file mode 100644
index 0000000..9a288e8
--- /dev/null
+++ b/src/app/admin/activate/activate-lottery-record/activate-lottery-record.component.html
@@ -0,0 +1,72 @@
+
+
+
+
+
+
+
+
+
共计 {{dataObject.total?dataObject.total:0}} 条数据
+
+
+
+
+
+
+
+ 用户手机号 |
+ 用户昵称 |
+ 中奖名称 |
+ 中奖时间 |
+
+
+
+
+
+ {{data.userPhone}} |
+ {{data.userName}} |
+ {{data.awardName}} |
+ {{data.winLotteryTime | date: 'yyyy-MM-dd HH:mm'}} |
+
+
+
+
+
diff --git a/src/app/admin/activate/activate-lottery-record/activate-lottery-record.component.scss b/src/app/admin/activate/activate-lottery-record/activate-lottery-record.component.scss
new file mode 100644
index 0000000..e69de29
diff --git a/src/app/admin/activate/activate-lottery-record/activate-lottery-record.component.spec.ts b/src/app/admin/activate/activate-lottery-record/activate-lottery-record.component.spec.ts
new file mode 100644
index 0000000..fc02252
--- /dev/null
+++ b/src/app/admin/activate/activate-lottery-record/activate-lottery-record.component.spec.ts
@@ -0,0 +1,25 @@
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { ActivateLotteryRecordComponent } from './activate-lottery-record.component';
+
+describe('ActivateLotteryRecordComponent', () => {
+ let component: ActivateLotteryRecordComponent;
+ let fixture: ComponentFixture;
+
+ beforeEach(async(() => {
+ TestBed.configureTestingModule({
+ declarations: [ ActivateLotteryRecordComponent ]
+ })
+ .compileComponents();
+ }));
+
+ beforeEach(() => {
+ fixture = TestBed.createComponent(ActivateLotteryRecordComponent);
+ component = fixture.componentInstance;
+ fixture.detectChanges();
+ });
+
+ it('should create', () => {
+ expect(component).toBeTruthy();
+ });
+});
diff --git a/src/app/admin/activate/activate-lottery-record/activate-lottery-record.component.ts b/src/app/admin/activate/activate-lottery-record/activate-lottery-record.component.ts
new file mode 100644
index 0000000..732d1ca
--- /dev/null
+++ b/src/app/admin/activate/activate-lottery-record/activate-lottery-record.component.ts
@@ -0,0 +1,80 @@
+import { Component, OnInit } from '@angular/core';
+import {FormBuilder, FormGroup} from "_@angular_forms@9.0.7@@angular/forms";
+import {ActivateService} from "../../../services/activate.service";
+import {IconService} from "../../../services/icon.service";
+import {NzMessageService} from "_ng-zorro-antd@9.3.0@ng-zorro-antd";
+import { Params, ActivatedRoute } from '@angular/router';
+
+@Component({
+ selector: 'app-activate-lottery-record',
+ templateUrl: './activate-lottery-record.component.html',
+ styleUrls: ['./activate-lottery-record.component.scss']
+})
+export class ActivateLotteryRecordComponent implements OnInit {
+
+ FILE_URL;
+ dataObject: any = {};
+ tableLoading = true;
+ searchForm: FormGroup;
+ pageNum: number;
+ whereObject: any = {};
+ activityId;
+
+ constructor(
+ private form: FormBuilder,
+ private activate: ActivateService,
+ private iconService: IconService,
+ private activatedRoute: ActivatedRoute,
+ private message: NzMessageService,
+ ) {
+ }
+
+ ngOnInit(): void {
+ this.searchForm = this.form.group({
+ userPhone: [null],
+ awardName: [null],
+ });
+
+ this.activatedRoute.queryParams.subscribe((queryParams: Params) => {
+ if (queryParams['activityId']) {
+ this.activityId = queryParams['activityId'];
+ this.requestData(1);
+ }
+ });
+ }
+
+ /**
+ * 请求数据
+ */
+ requestData(pageNum) {
+ this.tableLoading = true;
+ this.whereObject['activityId'] = this.activityId;
+ this.whereObject['pageNum'] = pageNum;
+ this.whereObject['pageSize'] = 10;
+ this.activate.getWinLotteryList(this.whereObject, data => {
+ if (data['return_code'] === '000000') {
+ this.dataObject = data['return_data'];
+ } else {
+ this.message.warning('获取失败!');
+ }
+ this.tableLoading = false;
+ });
+ }
+
+ /**
+ * 搜索
+ * @param whereObject
+ */
+ search(whereObject: object) {
+ this.whereObject = whereObject;
+ this.requestData(1);
+ }
+
+ /**
+ * 重置
+ */
+ public resetForm(): void {
+ this.searchForm.reset();
+ }
+
+}
diff --git a/src/app/admin/activate/activate-routing.module.ts b/src/app/admin/activate/activate-routing.module.ts
index d43caee..ef35985 100644
--- a/src/app/admin/activate/activate-routing.module.ts
+++ b/src/app/admin/activate/activate-routing.module.ts
@@ -2,11 +2,13 @@ import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import {ActivateListComponent} from './activate-list/activate-list.component';
import {ActivateEditComponent} from './activate-edit/activate-edit.component';
+import { ActivateLotteryRecordComponent } from './activate-lottery-record/activate-lottery-record.component';
const routes: Routes = [
{ path: 'activate-list', component: ActivateListComponent },
{ path: 'activate-edit', component: ActivateEditComponent},
+ { path: 'activate-lottery-record', component: ActivateLotteryRecordComponent},
];
@NgModule({
diff --git a/src/app/admin/activate/activate.module.ts b/src/app/admin/activate/activate.module.ts
index 810b342..c452a70 100644
--- a/src/app/admin/activate/activate.module.ts
+++ b/src/app/admin/activate/activate.module.ts
@@ -10,10 +10,11 @@ import {FormsModule, ReactiveFormsModule} from '_@angular_forms@9.0.7@@angular/f
import {BreadcrumbModule} from '../../common/breadcrumb/breadcrumb.module';
import {RegionSelectorModule} from '../../common/region-selector/region-selector.module';
import {AppCommonModule} from "../../app-common.module";
+import { ActivateLotteryRecordComponent } from './activate-lottery-record/activate-lottery-record.component';
@NgModule({
- declarations: [ActivateListComponent, ActivateEditComponent],
+ declarations: [ActivateListComponent, ActivateEditComponent, ActivateLotteryRecordComponent],
imports: [
CommonModule,
ActivateRoutingModule,
diff --git a/src/app/services/activate.service.ts b/src/app/services/activate.service.ts
index f1c51bb..1180b0b 100644
--- a/src/app/services/activate.service.ts
+++ b/src/app/services/activate.service.ts
@@ -54,6 +54,19 @@ export class ActivateService {
});
}
+ /**
+ * @Author Sum1Dream
+ * @methodName getWinLotteryList
+ * @Description //查询活动中奖记录
+ * @Date 17:54 2021/9/30
+ * @Param mod
+ **/
+ public getWinLotteryList(param: object, callBack) {
+ this.http.get(environment.baseUrl + 'activity/getWinLotteryList?' + this.common.getWhereCondition(param)).subscribe(data => {
+ callBack(data);
+ });
+ }
+
/**
* @Author Sum1Dream
* @methodName editActivityInfo