From 90413c20fc24ac7da5d66f8c0cebd3d3e9460301 Mon Sep 17 00:00:00 2001
From: YUANYE <418471657@qq.com>
Date: Wed, 23 Jun 2021 16:28:30 +0800
Subject: [PATCH 1/3] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BF=AEi=E8=AF=A5?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/app/admin/navigation/navigation.component.html | 3 ++-
src/app/admin/navigation/navigation.component.ts | 11 +++++++++++
.../recharge-order/order-list/order-list.component.ts | 10 ++++++----
.../recharge-order/price-list/price-list.component.ts | 6 +++---
src/app/admin/recharge-order/recharge-order.module.ts | 4 ++--
src/app/services/commons.service.ts | 8 ++++++++
src/app/services/recharge.service.ts | 2 +-
src/environments/environment.ts | 2 +-
8 files changed, 34 insertions(+), 12 deletions(-)
diff --git a/src/app/admin/navigation/navigation.component.html b/src/app/admin/navigation/navigation.component.html
index c3c9d4c..417bc13 100644
--- a/src/app/admin/navigation/navigation.component.html
+++ b/src/app/admin/navigation/navigation.component.html
@@ -28,7 +28,8 @@
[nzType]="isCollapsed ? 'menu-unfold' : 'menu-fold'"
>
-
+ 系统开关:
+
{{userInfo.secUser.userName}}
diff --git a/src/app/admin/navigation/navigation.component.ts b/src/app/admin/navigation/navigation.component.ts
index 2ddbb59..bcb4e16 100644
--- a/src/app/admin/navigation/navigation.component.ts
+++ b/src/app/admin/navigation/navigation.component.ts
@@ -6,6 +6,7 @@ import {NzMessageService} from 'ng-zorro-antd';
import {Router} from '@angular/router';
import {IconService} from '../../services/icon.service';
import {RechargeService} from '../../services/recharge.service';
+import {CommonsService} from '../../services/commons.service';
@Component({
selector: 'app-navigation',
@@ -18,10 +19,12 @@ export class NavigationComponent implements OnInit {
userInfo: any;
menuList: any;
routeName: string;
+ switchValue = false;
constructor(
private storage: LocalStorageService,
private loginService: LoginService,
private message: NzMessageService,
+ private commonsService: CommonsService,
private iconService: IconService,
private router: Router,
) { }
@@ -29,6 +32,9 @@ export class NavigationComponent implements OnInit {
ngOnInit(): void {
this.routeName = this.storage.get(ROUTENAME) == null ? 'index' : this.storage.get(ROUTENAME);
this.userInfo = this.storage.getList(ADMIN_INFO_OBJECT);
+ this.commonsService.mappingSysNameOl('RECHARGE', data => {
+ this.switchValue = data['return_data'][0]['codeValue'] === '1';
+ });
this.menuList = this.storage.getList(ADMIN_INFO_OBJECT)['menuList']; // 定义菜单数据
}
@@ -62,4 +68,9 @@ export class NavigationComponent implements OnInit {
history.back();
}
+ clickSwitch(): void {
+ this.switchValue = !this.switchValue;
+ console.log(this.switchValue);
+ }
+
}
diff --git a/src/app/admin/recharge-order/order-list/order-list.component.ts b/src/app/admin/recharge-order/order-list/order-list.component.ts
index 4afeb15..fe9831d 100644
--- a/src/app/admin/recharge-order/order-list/order-list.component.ts
+++ b/src/app/admin/recharge-order/order-list/order-list.component.ts
@@ -1,14 +1,15 @@
import {Component, OnDestroy, OnInit} from '@angular/core';
import {environment} from '../../../../environments/environment';
-import {FormBuilder, FormGroup, Validators} from '_@angular_forms@9.0.7@@angular/forms';
+
import {DiscountService} from '../../../services/discount.service';
import {CouponService} from '../../../services/coupon.service';
import {IconService} from '../../../services/icon.service';
-import {NzMessageService} from '_ng-zorro-antd@9.3.0@ng-zorro-antd';
-import {Router} from '_@angular_router@9.0.7@@angular/router';
+
import {CommonsService} from '../../../services/commons.service';
import {RechargeService} from '../../../services/recharge.service';
-import {NzNotificationService} from "ng-zorro-antd";
+import {NzMessageService, NzNotificationService} from 'ng-zorro-antd';
+import {FormBuilder, FormGroup, Validators} from '@angular/forms';
+import {Router} from '@angular/router';
@Component({
selector: 'app-order-list',
@@ -47,6 +48,7 @@ export class OrderListComponent implements OnInit , OnDestroy {
this.init();
this.timer = setInterval(() => { // 设置定时刷新事件,每隔1分钟刷新
this.recharge.countOrder(data => {
+ this.getRequest(true, this.searchForm.value);
this.notification.info(
'充值订单',
'您有' + data['return_data'] + '条未充值的订单,请尽快充值,点击可查看未充值订单!'
diff --git a/src/app/admin/recharge-order/price-list/price-list.component.ts b/src/app/admin/recharge-order/price-list/price-list.component.ts
index 87fb051..9f82506 100644
--- a/src/app/admin/recharge-order/price-list/price-list.component.ts
+++ b/src/app/admin/recharge-order/price-list/price-list.component.ts
@@ -1,13 +1,13 @@
import {Component, OnInit} from '@angular/core';
import {environment} from '../../../../environments/environment';
-import {FormBuilder, FormGroup, Validators} from '_@angular_forms@9.0.7@@angular/forms';
+import {FormBuilder, FormGroup, Validators} from '@angular/forms';
import {DiscountService} from '../../../services/discount.service';
import {CouponService} from '../../../services/coupon.service';
import {IconService} from '../../../services/icon.service';
-import {NzMessageService} from '_ng-zorro-antd@9.3.0@ng-zorro-antd';
-import {Router} from '_@angular_router@9.0.7@@angular/router';
+import {Router} from '@angular/router';
import {CommonsService} from '../../../services/commons.service';
import {RechargeService} from '../../../services/recharge.service';
+import {NzMessageService} from 'ng-zorro-antd';
@Component({
selector: 'app-price-list',
diff --git a/src/app/admin/recharge-order/recharge-order.module.ts b/src/app/admin/recharge-order/recharge-order.module.ts
index cf95675..2b993a9 100644
--- a/src/app/admin/recharge-order/recharge-order.module.ts
+++ b/src/app/admin/recharge-order/recharge-order.module.ts
@@ -4,9 +4,9 @@ import { CommonModule } from '@angular/common';
import { RechargeOrderRoutingModule } from './recharge-order-routing.module';
import { OrderListComponent } from './order-list/order-list.component';
import { PriceListComponent } from './price-list/price-list.component';
-import {NgZorroAntdModule} from '_ng-zorro-antd@9.3.0@ng-zorro-antd';
+import {NgZorroAntdModule} from 'ng-zorro-antd';
import {SeparateModule} from '../../common/separate/separate.module';
-import {FormsModule, ReactiveFormsModule} from '_@angular_forms@9.0.7@@angular/forms';
+import {FormsModule, ReactiveFormsModule} from '@angular/forms';
import {BreadcrumbModule} from '../../common/breadcrumb/breadcrumb.module';
import {RegionSelectorModule} from '../../common/region-selector/region-selector.module';
import {AppCommonModule} from '../../app-common.module';
diff --git a/src/app/services/commons.service.ts b/src/app/services/commons.service.ts
index dcce117..2bb81aa 100644
--- a/src/app/services/commons.service.ts
+++ b/src/app/services/commons.service.ts
@@ -167,6 +167,14 @@ export class CommonsService {
});
}
+ public mappingSysNameOl(codeType: string , callback): any {
+ this.http.get(environment.baseUrl + '/common/mappingSysNameOl?codeType=' + codeType).subscribe( data => {
+ callback(data);
+ });
+ }
+
+
+
/**
*
* 获取全部职位类型
diff --git a/src/app/services/recharge.service.ts b/src/app/services/recharge.service.ts
index 1f78061..47516e6 100644
--- a/src/app/services/recharge.service.ts
+++ b/src/app/services/recharge.service.ts
@@ -1,5 +1,5 @@
import { Injectable } from '@angular/core';
-import {HttpClient} from '_@angular_common@9.0.7@@angular/common/http';
+import {HttpClient} from '@angular/common/http';
import {CommonsService} from './commons.service';
import {environment} from '../../environments/environment';
diff --git a/src/environments/environment.ts b/src/environments/environment.ts
index 532a068..0d20ac6 100644
--- a/src/environments/environment.ts
+++ b/src/environments/environment.ts
@@ -6,7 +6,7 @@ export const environment = {
production: false,
baseUrl: 'http://localhost:9302/brest/', // 测试环境服务器地址(请求数据地址)
imageUrl: 'http://localhost:9302/filesystem/',
- // baseUrl: 'https://hsgcs.dctpay.com/brest/', // 正式环境服务器地址(请求数据地址)
+ // baseUrl: 'https://hsgcs.dctpay.com/brest/', // 测试环境服务器地址(请求数据地址)
// imageUrl: 'https://hsgcs.dctpay.com/filesystem/',
};
From e976ba5a4d48880a3e8845a09d0f3a374ae129a8 Mon Sep 17 00:00:00 2001
From: YUANYE <418471657@qq.com>
Date: Wed, 23 Jun 2021 17:59:18 +0800
Subject: [PATCH 2/3] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/app/admin/navigation/navigation.component.ts | 10 ++++++++--
.../recharge-order/order-list/order-list.component.ts | 2 +-
.../order-statistical/order-statistical.component.ts | 2 +-
.../recharge-order/user-edit/user-edit.component.ts | 6 +++---
.../user-statistical/user-statistical.component.ts | 9 +++++----
src/app/admin/recharge-order/user/user.component.ts | 6 +++---
src/app/services/commons.service.ts | 8 ++++++--
7 files changed, 27 insertions(+), 16 deletions(-)
diff --git a/src/app/admin/navigation/navigation.component.ts b/src/app/admin/navigation/navigation.component.ts
index bcb4e16..fde458f 100644
--- a/src/app/admin/navigation/navigation.component.ts
+++ b/src/app/admin/navigation/navigation.component.ts
@@ -33,7 +33,7 @@ export class NavigationComponent implements OnInit {
this.routeName = this.storage.get(ROUTENAME) == null ? 'index' : this.storage.get(ROUTENAME);
this.userInfo = this.storage.getList(ADMIN_INFO_OBJECT);
this.commonsService.mappingSysNameOl('RECHARGE', data => {
- this.switchValue = data['return_data'][0]['codeValue'] === '1';
+ this.switchValue = data['return_data']['codeValue'] === '1';
});
this.menuList = this.storage.getList(ADMIN_INFO_OBJECT)['menuList']; // 定义菜单数据
}
@@ -70,7 +70,13 @@ export class NavigationComponent implements OnInit {
clickSwitch(): void {
this.switchValue = !this.switchValue;
- console.log(this.switchValue);
+ this.commonsService.updateDictionary('RECHARGE' , this.switchValue === true ? '1' : '0' , data => {
+ if (data['return_code'] === '000000') {
+ this.message.success(data['return_data']);
+ } else {
+ this.message.error(data['return_msg']);
+ }
+ });
}
}
diff --git a/src/app/admin/recharge-order/order-list/order-list.component.ts b/src/app/admin/recharge-order/order-list/order-list.component.ts
index 7306fb7..91786f8 100644
--- a/src/app/admin/recharge-order/order-list/order-list.component.ts
+++ b/src/app/admin/recharge-order/order-list/order-list.component.ts
@@ -57,7 +57,7 @@ export class OrderListComponent implements OnInit , OnDestroy {
this.getRequest(true, this.searchForm.value);
});
});
- }, 60000);
+ }, 10000);
}
// 销毁
diff --git a/src/app/admin/recharge-order/order-statistical/order-statistical.component.ts b/src/app/admin/recharge-order/order-statistical/order-statistical.component.ts
index db730e4..aeb87a0 100644
--- a/src/app/admin/recharge-order/order-statistical/order-statistical.component.ts
+++ b/src/app/admin/recharge-order/order-statistical/order-statistical.component.ts
@@ -1,8 +1,8 @@
import { Component, OnInit } from '@angular/core';
import {RechargeService} from '../../../services/recharge.service';
-import {FormBuilder, FormGroup} from '_@angular_forms@9.0.7@@angular/forms';
import {NzMessageService} from 'ng-zorro-antd';
import {environment} from '../../../../environments/environment';
+import {FormBuilder, FormGroup} from '@angular/forms';
@Component({
selector: 'app-order-statistical',
diff --git a/src/app/admin/recharge-order/user-edit/user-edit.component.ts b/src/app/admin/recharge-order/user-edit/user-edit.component.ts
index 21a7873..539340b 100644
--- a/src/app/admin/recharge-order/user-edit/user-edit.component.ts
+++ b/src/app/admin/recharge-order/user-edit/user-edit.component.ts
@@ -1,10 +1,10 @@
import { Component, OnInit } from '@angular/core';
-import {FormBuilder, FormGroup, Validators} from '_@angular_forms@9.0.7@@angular/forms';
+import {FormBuilder, FormGroup, Validators} from '@angular/forms';
import {environment} from '../../../../environments/environment';
import {AgentService} from '../../../services/agent.service';
-import {NzMessageService} from '_ng-zorro-antd@9.3.0@ng-zorro-antd';
-import {ActivatedRoute} from '_@angular_router@9.0.7@@angular/router';
import {ValidatorsService} from '../../../services/validators.service';
+import {NzMessageService} from 'ng-zorro-antd';
+import {ActivatedRoute} from '@angular/router';
@Component({
selector: 'app-user-edit',
diff --git a/src/app/admin/recharge-order/user-statistical/user-statistical.component.ts b/src/app/admin/recharge-order/user-statistical/user-statistical.component.ts
index f61e91e..bcb41a6 100644
--- a/src/app/admin/recharge-order/user-statistical/user-statistical.component.ts
+++ b/src/app/admin/recharge-order/user-statistical/user-statistical.component.ts
@@ -1,8 +1,9 @@
import { Component, OnInit } from '@angular/core';
-import {FormBuilder, FormGroup} from "_@angular_forms@9.0.7@@angular/forms";
-import {environment} from "../../../../environments/environment";
-import {RechargeService} from "../../../services/recharge.service";
-import {NzMessageService} from "_ng-zorro-antd@9.3.0@ng-zorro-antd";
+import {FormBuilder, FormGroup} from '@angular/forms';
+import {NzMessageService} from 'ng-zorro-antd';
+import {RechargeService} from '../../../services/recharge.service';
+import {environment} from '../../../../environments/environment';
+
@Component({
selector: 'app-user-statistical',
diff --git a/src/app/admin/recharge-order/user/user.component.ts b/src/app/admin/recharge-order/user/user.component.ts
index 9258774..596d1c0 100644
--- a/src/app/admin/recharge-order/user/user.component.ts
+++ b/src/app/admin/recharge-order/user/user.component.ts
@@ -1,13 +1,13 @@
import { Component, OnInit } from '@angular/core';
import {environment} from '../../../../environments/environment';
-import {FormBuilder, FormGroup, Validators} from '_@angular_forms@9.0.7@@angular/forms';
import {AgentService} from '../../../services/agent.service';
import {DiscountService} from '../../../services/discount.service';
import {CouponService} from '../../../services/coupon.service';
import {IconService} from '../../../services/icon.service';
-import {NzMessageService} from '_ng-zorro-antd@9.3.0@ng-zorro-antd';
-import {Router} from '_@angular_router@9.0.7@@angular/router';
import {CommonsService} from '../../../services/commons.service';
+import {NzMessageService} from 'ng-zorro-antd';
+import {FormBuilder, FormGroup} from '@angular/forms';
+import {Router} from '@angular/router';
@Component({
selector: 'app-user',
diff --git a/src/app/services/commons.service.ts b/src/app/services/commons.service.ts
index 2bb81aa..4614bdb 100644
--- a/src/app/services/commons.service.ts
+++ b/src/app/services/commons.service.ts
@@ -168,12 +168,16 @@ export class CommonsService {
}
public mappingSysNameOl(codeType: string , callback): any {
- this.http.get(environment.baseUrl + '/common/mappingSysNameOl?codeType=' + codeType).subscribe( data => {
+ this.http.get(environment.baseUrl + '/common/getDictionaryByCodeTypeOl?codeType=' + codeType).subscribe( data => {
callback(data);
});
}
-
+ public updateDictionary(codeType: string , codeValue: string , callback): any {
+ this.http.get(environment.baseUrl + '/common/updateDictionary?codeType=' + codeType + '&codeValue=' + codeValue).subscribe( data => {
+ callback(data);
+ });
+ }
/**
*
From 40902424fb45b5128069c119c851d418e2706faf Mon Sep 17 00:00:00 2001
From: YUANYE <418471657@qq.com>
Date: Wed, 23 Jun 2021 18:05:37 +0800
Subject: [PATCH 3/3] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../order-list/order-list.component.ts | 18 ++++++++++--------
1 file changed, 10 insertions(+), 8 deletions(-)
diff --git a/src/app/admin/recharge-order/order-list/order-list.component.ts b/src/app/admin/recharge-order/order-list/order-list.component.ts
index 91786f8..bedb2be 100644
--- a/src/app/admin/recharge-order/order-list/order-list.component.ts
+++ b/src/app/admin/recharge-order/order-list/order-list.component.ts
@@ -48,16 +48,18 @@ export class OrderListComponent implements OnInit , OnDestroy {
this.init();
this.timer = setInterval(() => { // 设置定时刷新事件,每隔1分钟刷新
this.recharge.countOrder(data => {
- this.getRequest(true, this.searchForm.value);
- this.notification.info(
- '充值订单',
- '您有' + data['return_data'] + '条未充值的订单,请尽快充值,点击可查看未充值订单!'
- ).onClick.subscribe(() => {
- this.searchForm.value.status = 2;
+ if (data['return_data'] > 0) {
this.getRequest(true, this.searchForm.value);
- });
+ this.notification.info(
+ '充值订单',
+ '您有' + data['return_data'] + '条未充值的订单,请尽快充值,点击可查看未充值订单!'
+ ).onClick.subscribe(() => {
+ this.searchForm.value.status = 2;
+ this.getRequest(true, this.searchForm.value);
+ });
+ }
});
- }, 10000);
+ }, 5000);
}
// 销毁