提交修改

pull/1/head
袁野 3 years ago
parent b018e3e7d2
commit e976ba5a4d
  1. 10
      src/app/admin/navigation/navigation.component.ts
  2. 2
      src/app/admin/recharge-order/order-list/order-list.component.ts
  3. 2
      src/app/admin/recharge-order/order-statistical/order-statistical.component.ts
  4. 6
      src/app/admin/recharge-order/user-edit/user-edit.component.ts
  5. 9
      src/app/admin/recharge-order/user-statistical/user-statistical.component.ts
  6. 6
      src/app/admin/recharge-order/user/user.component.ts
  7. 8
      src/app/services/commons.service.ts

@ -33,7 +33,7 @@ export class NavigationComponent implements OnInit {
this.routeName = this.storage.get(ROUTENAME) == null ? 'index' : this.storage.get(ROUTENAME); this.routeName = this.storage.get(ROUTENAME) == null ? 'index' : this.storage.get(ROUTENAME);
this.userInfo = this.storage.getList(ADMIN_INFO_OBJECT); this.userInfo = this.storage.getList(ADMIN_INFO_OBJECT);
this.commonsService.mappingSysNameOl('RECHARGE', data => { 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']; // 定义菜单数据 this.menuList = this.storage.getList(ADMIN_INFO_OBJECT)['menuList']; // 定义菜单数据
} }
@ -70,7 +70,13 @@ export class NavigationComponent implements OnInit {
clickSwitch(): void { clickSwitch(): void {
this.switchValue = !this.switchValue; 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']);
}
});
} }
} }

@ -57,7 +57,7 @@ export class OrderListComponent implements OnInit , OnDestroy {
this.getRequest(true, this.searchForm.value); this.getRequest(true, this.searchForm.value);
}); });
}); });
}, 60000); }, 10000);
} }
// 销毁 // 销毁

@ -1,8 +1,8 @@
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core';
import {RechargeService} from '../../../services/recharge.service'; import {RechargeService} from '../../../services/recharge.service';
import {FormBuilder, FormGroup} from '_@angular_forms@9.0.7@@angular/forms';
import {NzMessageService} from 'ng-zorro-antd'; import {NzMessageService} from 'ng-zorro-antd';
import {environment} from '../../../../environments/environment'; import {environment} from '../../../../environments/environment';
import {FormBuilder, FormGroup} from '@angular/forms';
@Component({ @Component({
selector: 'app-order-statistical', selector: 'app-order-statistical',

@ -1,10 +1,10 @@
import { Component, OnInit } from '@angular/core'; 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 {environment} from '../../../../environments/environment';
import {AgentService} from '../../../services/agent.service'; 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 {ValidatorsService} from '../../../services/validators.service';
import {NzMessageService} from 'ng-zorro-antd';
import {ActivatedRoute} from '@angular/router';
@Component({ @Component({
selector: 'app-user-edit', selector: 'app-user-edit',

@ -1,8 +1,9 @@
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core';
import {FormBuilder, FormGroup} from "_@angular_forms@9.0.7@@angular/forms"; import {FormBuilder, FormGroup} from '@angular/forms';
import {environment} from "../../../../environments/environment"; import {NzMessageService} from 'ng-zorro-antd';
import {RechargeService} from "../../../services/recharge.service"; import {RechargeService} from '../../../services/recharge.service';
import {NzMessageService} from "_ng-zorro-antd@9.3.0@ng-zorro-antd"; import {environment} from '../../../../environments/environment';
@Component({ @Component({
selector: 'app-user-statistical', selector: 'app-user-statistical',

@ -1,13 +1,13 @@
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core';
import {environment} from '../../../../environments/environment'; import {environment} from '../../../../environments/environment';
import {FormBuilder, FormGroup, Validators} from '_@angular_forms@9.0.7@@angular/forms';
import {AgentService} from '../../../services/agent.service'; import {AgentService} from '../../../services/agent.service';
import {DiscountService} from '../../../services/discount.service'; import {DiscountService} from '../../../services/discount.service';
import {CouponService} from '../../../services/coupon.service'; import {CouponService} from '../../../services/coupon.service';
import {IconService} from '../../../services/icon.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 {CommonsService} from '../../../services/commons.service';
import {NzMessageService} from 'ng-zorro-antd';
import {FormBuilder, FormGroup} from '@angular/forms';
import {Router} from '@angular/router';
@Component({ @Component({
selector: 'app-user', selector: 'app-user',

@ -168,12 +168,16 @@ export class CommonsService {
} }
public mappingSysNameOl(codeType: string , callback): any { 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); 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);
});
}
/** /**
* *

Loading…
Cancel
Save