parent
def81dabc3
commit
c42cdcfeec
@ -0,0 +1,15 @@ |
||||
import { NgModule } from '@angular/core'; |
||||
import { Routes, RouterModule } from '@angular/router'; |
||||
import {PhoneOrderComponent} from './phone-order/phone-order.component'; |
||||
|
||||
|
||||
|
||||
const routes: Routes = [ |
||||
{ path: 'phone-order', component: PhoneOrderComponent } |
||||
]; |
||||
|
||||
@NgModule({ |
||||
imports: [RouterModule.forChild(routes)], |
||||
exports: [RouterModule] |
||||
}) |
||||
export class ApiOrderRoutingModule { } |
@ -0,0 +1,37 @@ |
||||
import { NgModule } from '@angular/core'; |
||||
import { CommonModule } from '@angular/common'; |
||||
import { PhoneOrderComponent } from './phone-order/phone-order.component'; |
||||
import {SystemRoutingModule} from '../system/system-routing.module'; |
||||
import {NgZorroAntdModule} from '_ng-zorro-antd@9.3.0@ng-zorro-antd'; |
||||
import {FormsModule, ReactiveFormsModule} from '_@angular_forms@9.0.7@@angular/forms'; |
||||
import {NgxNeditorModule} from '_@notadd_ngx-neditor@1.0.2@@notadd/ngx-neditor'; |
||||
import {RichtextModule} from '../../common/richtext/richtext.module'; |
||||
import {BreadcrumbModule} from '../../common/breadcrumb/breadcrumb.module'; |
||||
import {RegionSelectorModule} from '../../common/region-selector/region-selector.module'; |
||||
import {NgxEchartsModule} from '_ngx-echarts@4.2.2@ngx-echarts'; |
||||
import {IndexRoutingModule} from '../index/index-routing.module'; |
||||
import {AppCommonModule} from '../../app-common.module'; |
||||
import {NzSpaceModule} from '_ng-zorro-antd@9.3.0@ng-zorro-antd/space'; |
||||
import {ApiOrderRoutingModule} from './api-order-routing.module'; |
||||
|
||||
|
||||
|
||||
@NgModule({ |
||||
declarations: [PhoneOrderComponent], |
||||
imports: [ |
||||
CommonModule, |
||||
ApiOrderRoutingModule, |
||||
NgZorroAntdModule, |
||||
FormsModule, |
||||
ReactiveFormsModule, |
||||
NgxNeditorModule, |
||||
RichtextModule, |
||||
BreadcrumbModule, |
||||
RegionSelectorModule, |
||||
NgxEchartsModule, |
||||
IndexRoutingModule, |
||||
AppCommonModule, |
||||
NzSpaceModule |
||||
] |
||||
}) |
||||
export class ApiOrderModule { } |
@ -0,0 +1 @@ |
||||
<p>phone-order works!</p> |
@ -0,0 +1,25 @@ |
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing'; |
||||
|
||||
import { PhoneOrderComponent } from './phone-order.component'; |
||||
|
||||
describe('PhoneOrderComponent', () => { |
||||
let component: PhoneOrderComponent; |
||||
let fixture: ComponentFixture<PhoneOrderComponent>; |
||||
|
||||
beforeEach(async(() => { |
||||
TestBed.configureTestingModule({ |
||||
declarations: [ PhoneOrderComponent ] |
||||
}) |
||||
.compileComponents(); |
||||
})); |
||||
|
||||
beforeEach(() => { |
||||
fixture = TestBed.createComponent(PhoneOrderComponent); |
||||
component = fixture.componentInstance; |
||||
fixture.detectChanges(); |
||||
}); |
||||
|
||||
it('should create', () => { |
||||
expect(component).toBeTruthy(); |
||||
}); |
||||
}); |
@ -0,0 +1,15 @@ |
||||
import { Component, OnInit } from '@angular/core'; |
||||
|
||||
@Component({ |
||||
selector: 'app-phone-order', |
||||
templateUrl: './phone-order.component.html', |
||||
styleUrls: ['./phone-order.component.scss'] |
||||
}) |
||||
export class PhoneOrderComponent implements OnInit { |
||||
|
||||
constructor() { } |
||||
|
||||
ngOnInit(): void { |
||||
} |
||||
|
||||
} |
@ -0,0 +1,39 @@ |
||||
<div class="content"> |
||||
<div class="top-title"> |
||||
<h3>账户信息</h3> |
||||
</div> |
||||
<div nz-row class="content-data"> |
||||
<div nz-col nzSpan="8"> |
||||
<nz-statistic [nzValue]="(apiMerchants['amounts'] | number)" [nzTitle]="'账户余额(元)'"></nz-statistic> |
||||
</div> |
||||
<div nz-col nzSpan="8"> |
||||
<nz-statistic [nzValue]="apiMerchants['phone']" [nzTitle]="'用户名'"></nz-statistic> |
||||
</div> |
||||
<div nz-col nzSpan="8"> |
||||
<nz-statistic [nzValue]="apiMerchants['merchantName']" [nzTitle]="'商户名称'"></nz-statistic> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
|
||||
<div class="content"> |
||||
<div class="top-title"> |
||||
<h3>接口信息</h3> |
||||
</div> |
||||
<div nz-row class="content-data"> |
||||
<div nz-col nzSpan="24"> |
||||
<p>商户号(mchId):{{apiMerchants['mchId']}}</p> |
||||
<p>密钥(apiKey):{{apiMerchants['apiKey']}}</p> |
||||
<p>IP白名单:{{apiMerchants['ext1']}}</p> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
<div class="content"> |
||||
<div class="top-title"> |
||||
<h3>已开通产品</h3> |
||||
</div> |
||||
<div nz-row class="content-data"> |
||||
<div nz-col nzSpan="6" *ngFor="let item of productConfig; let i = index"> |
||||
<div class="product cp ml mt">{{item['codeType'] | productConfig}}</div> |
||||
</div> |
||||
</div> |
||||
</div> |
@ -0,0 +1,25 @@ |
||||
.content { |
||||
background: #fff; |
||||
margin-bottom: 20px; |
||||
margin-top: 20px; |
||||
} |
||||
.top-title { |
||||
padding: 16px; |
||||
border-bottom: 1px solid #e8e8e8 |
||||
} |
||||
.content-data { |
||||
padding: 24px; |
||||
.title { |
||||
color: rgba(0, 0, 0, 0.45); |
||||
font-size: 14px; |
||||
} |
||||
} |
||||
.product { |
||||
text-align: center; |
||||
font-size: 18px; |
||||
padding: 20px; |
||||
border: 1px solid #e8e8e8; |
||||
} |
||||
.product:hover { |
||||
box-shadow: #e8e8e8 0 0 4px 2px; |
||||
} |
@ -0,0 +1,34 @@ |
||||
import { Component, OnInit } from '@angular/core'; |
||||
import {LocalStorageService} from '../../../services/local-storage.service'; |
||||
import {ADMIN_INFO_OBJECT} from '../../../services/local-storage.namespace'; |
||||
import {CommonsService} from "../../../services/commons.service"; |
||||
import {ApiMerchantsService} from "../../../services/api-merchants.service"; |
||||
|
||||
@Component({ |
||||
selector: 'app-api-merchant', |
||||
templateUrl: './api-merchant.component.html', |
||||
styleUrls: ['./api-merchant.component.scss'] |
||||
}) |
||||
export class ApiMerchantComponent implements OnInit { |
||||
|
||||
// API商户信息
|
||||
apiMerchants; |
||||
productConfig; |
||||
|
||||
constructor( |
||||
private store: LocalStorageService, // 数据缓存
|
||||
private apiMerchantService: ApiMerchantsService, |
||||
private common: CommonsService |
||||
) { } |
||||
|
||||
ngOnInit(): void { |
||||
this.apiMerchants = this.store.get(ADMIN_INFO_OBJECT)['apiMerchants']; |
||||
|
||||
this.apiMerchantService.getSecConfigList(this.apiMerchants['mchId'] , data => { |
||||
if (data['return_code'] === '000000') { |
||||
this.productConfig = data['return_data']; |
||||
} |
||||
}); |
||||
} |
||||
|
||||
} |
@ -0,0 +1,15 @@ |
||||
<!-- start 面包屑 --> |
||||
<nz-breadcrumb> |
||||
<nz-breadcrumb-item> |
||||
订单统计汇总 |
||||
</nz-breadcrumb-item> |
||||
</nz-breadcrumb> |
||||
<!-- end 面包屑 --> |
||||
|
||||
|
||||
<div class="inner-content"> |
||||
<div class="orderStatisticsByYMDData"> |
||||
<div echarts [options]="orderStatisticsByYMDData"></div> |
||||
</div> |
||||
|
||||
</div> |
@ -0,0 +1,48 @@ |
||||
import { Component, OnInit } from '@angular/core'; |
||||
|
||||
@Component({ |
||||
selector: 'app-order-statistics', |
||||
templateUrl: './order-statistics.component.html', |
||||
styleUrls: ['./order-statistics.component.scss'] |
||||
}) |
||||
export class OrderStatisticsComponent implements OnInit { |
||||
|
||||
// 根据年月日查询总交易金额
|
||||
orderStatisticsByYMDData: any; |
||||
|
||||
constructor() { } |
||||
|
||||
ngOnInit(): void { |
||||
this.orderStatisticsByYMD(3); |
||||
} |
||||
|
||||
public orderStatisticsByYMD(dateType: number): void { |
||||
this.orderStatisticsByYMDData = { |
||||
xAxis: { |
||||
type: 'category', |
||||
|
||||
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'] |
||||
}, |
||||
yAxis: { |
||||
type: 'value' |
||||
}, |
||||
series: [ |
||||
{ |
||||
data: [120, 200, 150, 80, 70, 110, 130], |
||||
label: { |
||||
show: true, |
||||
color: 'black', |
||||
position: 'top' |
||||
}, |
||||
type: 'bar', |
||||
showBackground: true, |
||||
color: '#1890ff', |
||||
backgroundStyle: { |
||||
color: 'rgba(180, 180, 180, 0.2)' |
||||
} |
||||
} |
||||
] |
||||
}; |
||||
} |
||||
|
||||
} |
@ -0,0 +1,23 @@ |
||||
import { Pipe, PipeTransform } from '@angular/core'; |
||||
|
||||
@Pipe({ |
||||
name: 'productConfig' |
||||
}) |
||||
export class ProductConfigPipe implements PipeTransform { |
||||
|
||||
transform(value: string): string { |
||||
switch (value) { |
||||
case 'CQ_SHELL': |
||||
return '重庆壳牌接口'; |
||||
case 'KFC_CONFIG': |
||||
return '肯德基接口'; |
||||
case 'MEMBER_RECHARGE_CONFIG': |
||||
return '会员充值接口'; |
||||
case 'PHONE_CONFIG': |
||||
return '话费接口'; |
||||
case 'STARBUCKS_CONFIG': |
||||
return '星巴克接口'; |
||||
} |
||||
} |
||||
|
||||
} |
Loading…
Reference in new issue