- 编号 |
- 商户名称 |
+ 编号 |
+ 商户名称 |
联系人 |
- 电话 |
- 商户号 |
- 商户KEY |
- 操作人员 |
+ 电话 |
+ 商户号 |
+ 商户KEY |
+ 操作人员 |
创建时间 |
帐户余额 |
- 状态 |
+ 状态 |
操作 |
@@ -100,7 +101,7 @@
{{data.mchId }} |
{{data.apiKey }} |
{{data.operatorName }} |
- {{data.createTime | date: 'yyyy-MM-dd HH:mm'}} |
+ {{data.createTime | date: 'yyyy-MM-dd'}} |
¥{{data.amounts}} |
{{data.status== 100? '正常':'禁用'}} |
@@ -109,8 +110,10 @@
更多操作
@@ -137,7 +140,7 @@
商户电话
-
+
@@ -178,7 +181,7 @@
-
+
类型 |
@@ -244,7 +247,7 @@
-
+
编号 |
@@ -293,3 +296,22 @@
+
+
+
+
+ IP地址
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/app/admin/api-merchants/list/list.component.ts b/src/app/admin/api-merchants/list/list.component.ts
index c484ffb..d758b2b 100644
--- a/src/app/admin/api-merchants/list/list.component.ts
+++ b/src/app/admin/api-merchants/list/list.component.ts
@@ -8,7 +8,8 @@ import {ApiProductService} from '../../../services/api-product.service';
import {FormBuilder, FormGroup, Validators} from '@angular/forms';
import {NzMessageService} from 'ng-zorro-antd';
import {Router} from '@angular/router';
-
+import {HttpClient} from '@angular/common/http';
+import { map, filter, scan , take } from 'rxjs/operators';
@Component({
selector: 'app-list',
@@ -36,9 +37,9 @@ export class ListComponent implements OnInit {
id: number;
edit = false;
payPrice;
- isVisibleGoods = false;
+ isVisibleIpAddress = false;
realPrice = 0;
-
+ mchId: string;
rechargeModal = false;
rechargeForm: FormGroup;
configValidateForm: FormGroup;
@@ -55,6 +56,10 @@ export class ListComponent implements OnInit {
productArray = [];
productConfigArray = [];
discount;
+ ipAddress: string;
+ isSpinning = false;
+ isVisibleConfig = false;
+ checkOptions = [];
formatterPercent = (value: number): string => `${value == null ? 0 : value} %`;
parserPercent = (value: string): string => value.replace(' %', '');
@@ -65,6 +70,7 @@ export class ListComponent implements OnInit {
private coupon: CouponService,
private iconService: IconService,
private message: NzMessageService,
+ private http: HttpClient,
private router: Router,
private common: CommonsService
) {
@@ -85,6 +91,14 @@ export class ListComponent implements OnInit {
this.common.getDictionary('RECHARGE_PLATFORM ', data => {
this.platformArray = data['return_data'];
});
+ // 获取可用接口数据
+ this.common.getDictionary('API_PRODUCT_CONFIG ', data => {
+ for (const i of data['return_data']) {
+ this.checkOptions.push({
+ label: i['codeName'], value: i['codeValue']
+ });
+ }
+ });
}
public init(): void {
@@ -99,32 +113,41 @@ export class ListComponent implements OnInit {
phone: [null],
status: [null],
});
- this.validateForm = this.form.group({
- merchantName: [null, [Validators.required]],
- userName: [null, [Validators.required]],
- phone: [null, [Validators.required]],
- });
+ this.initApiMerchantsPostFrom(false);
this.configValidateForm = this.form.group({
productIds: [null, [Validators.required]],
discount: [null, [Validators.required]],
});
this.getRequest(true, this.searchForm.value);
- this.apiMerchants.getListApiMerchantByAll(data => {
+ this.apiProduct.getAvailableApiProductByList(data => {
if (data['return_code'] === '000000') {
- this.merchantArray = data['return_data'];
+ this.productArray = data['return_data'];
} else {
this.message.error(data['return_msg']);
}
});
- this.apiProduct.getAvailableApiProductByList(data => {
+
+ }
+
+ // 出现可用商户列表
+ public getListApiMerchantByAll(): void {
+ this.apiMerchants.getListApiMerchantByAll(data => {
if (data['return_code'] === '000000') {
- this.productArray = data['return_data'];
+ this.merchantArray = data['return_data'];
} else {
this.message.error(data['return_msg']);
}
});
+ }
+ // 初始化商户提交报表
+ public initApiMerchantsPostFrom(edit: boolean): void {
+ this.validateForm = this.form.group({
+ merchantName: [null, [Validators.required]],
+ userName: [null, [Validators.required]],
+ phone: [{ value: null , disabled: edit}, [Validators.required]],
+ });
}
// 查询列表
@@ -156,11 +179,13 @@ export class ListComponent implements OnInit {
if (id != null) {
this.id = id;
this.edit = true;
+ this.initApiMerchantsPostFrom(true);
this.apiMerchants.findById(id, data => {
this.validateForm.patchValue(data['return_data']);
this.isVisible = true;
});
} else {
+ this.initApiMerchantsPostFrom(false);
this.validateForm.reset();
this.isVisible = true;
this.edit = false;
@@ -284,6 +309,7 @@ export class ListComponent implements OnInit {
* 展示充值模态框
*/
showRechargeModal() {
+ this.getListApiMerchantByAll();
this.rechargeModal = true;
}
@@ -468,4 +494,79 @@ export class ListComponent implements OnInit {
this.configValidateForm.reset();
}
+
+ // 打开配置ip地址
+ public configIp(mchId: string): void {
+ this.mchId = mchId;
+ this.apiMerchants.findByMchId( mchId , data => {
+ if (data['return_code'] === '000000') {
+ this.ipAddress = data['return_data']['ipAddress'];
+ }
+ });
+ this.isVisibleIpAddress = true;
+ }
+
+ // 提交配置
+ public handleOkConfigIp(): void {
+ this.isSpinning = true;
+ this.apiMerchants.editApiIpAddress({
+ mchId: this.mchId,
+ ipAddress: this.ipAddress
+ } , data => {
+ if (data['return_code'] === '000000') {
+ this.isSpinning = false;
+ this.message.success('配置成功');
+ this.isVisibleIpAddress = false;
+ } else {
+ this.message.error(data['return_msg']);
+ }
+ });
+ }
+
+ // 打开配置产品弹框
+ public configApiProduct(mchId: string): void {
+ this.mchId = mchId;
+ this.apiMerchants.getSecConfigList(mchId , data => {
+ console.log(data);
+ const returnData = data['return_data'];
+ if (data['return_data'].length > 0) {
+ for (const i of this.checkOptions) {
+ if (returnData.filter(item => item['codeType'] === i['value']).length > 0) {
+ i['checked'] = true;
+ } else {
+ i['checked'] = false;
+ }
+ }
+ }
+ this.isVisibleConfig = true;
+ });
+
+
+ }
+
+ // 配置产品
+ public handleOkConfigProduct(): void {
+ const data = [];
+ for (const i of this.checkOptions) {
+ if (i['checked']) {
+ data.push(i['value']);
+ }
+ }
+ console.log(data);
+ const postData = {
+ mchId: this.mchId,
+ configProduct: data.join(',')
+ };
+ this.isSpinning = true;
+ this.apiMerchants.configMerchant(postData , res => {
+ if (res['return_code'] === '000000') {
+ this.isSpinning = false;
+ this.message.success('配置成功');
+ this.isVisibleConfig = false;
+ } else {
+ this.message.error(res['return_msg']);
+ }
+ });
+ }
+
}
diff --git a/src/app/admin/api-order/api-order-routing.module.ts b/src/app/admin/api-order/api-order-routing.module.ts
new file mode 100644
index 0000000..4f5c778
--- /dev/null
+++ b/src/app/admin/api-order/api-order-routing.module.ts
@@ -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 { }
diff --git a/src/app/admin/api-order/api-order.module.ts b/src/app/admin/api-order/api-order.module.ts
new file mode 100644
index 0000000..8b63015
--- /dev/null
+++ b/src/app/admin/api-order/api-order.module.ts
@@ -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 { }
diff --git a/src/app/admin/api-order/phone-order/phone-order.component.html b/src/app/admin/api-order/phone-order/phone-order.component.html
new file mode 100644
index 0000000..43a7f6a
--- /dev/null
+++ b/src/app/admin/api-order/phone-order/phone-order.component.html
@@ -0,0 +1 @@
+phone-order works!
diff --git a/src/app/admin/api-order/phone-order/phone-order.component.scss b/src/app/admin/api-order/phone-order/phone-order.component.scss
new file mode 100644
index 0000000..e69de29
diff --git a/src/app/admin/api-order/phone-order/phone-order.component.spec.ts b/src/app/admin/api-order/phone-order/phone-order.component.spec.ts
new file mode 100644
index 0000000..493b5fd
--- /dev/null
+++ b/src/app/admin/api-order/phone-order/phone-order.component.spec.ts
@@ -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;
+
+ beforeEach(async(() => {
+ TestBed.configureTestingModule({
+ declarations: [ PhoneOrderComponent ]
+ })
+ .compileComponents();
+ }));
+
+ beforeEach(() => {
+ fixture = TestBed.createComponent(PhoneOrderComponent);
+ component = fixture.componentInstance;
+ fixture.detectChanges();
+ });
+
+ it('should create', () => {
+ expect(component).toBeTruthy();
+ });
+});
diff --git a/src/app/admin/api-order/phone-order/phone-order.component.ts b/src/app/admin/api-order/phone-order/phone-order.component.ts
new file mode 100644
index 0000000..a959e3f
--- /dev/null
+++ b/src/app/admin/api-order/phone-order/phone-order.component.ts
@@ -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 {
+ }
+
+}
diff --git a/src/app/admin/api-product/list/list.component.html b/src/app/admin/api-product/list/list.component.html
index 7baf522..1664d23 100644
--- a/src/app/admin/api-product/list/list.component.html
+++ b/src/app/admin/api-product/list/list.component.html
@@ -75,6 +75,7 @@
class="table"
#ajaxTable
nzShowSizeChanger
+ nzBordered
[nzFrontPagination]="false"
[nzData]="requestData"
[nzLoading]="loading"
diff --git a/src/app/admin/coupon/coupon-edit/coupon-edit.component.html b/src/app/admin/coupon/coupon-edit/coupon-edit.component.html
index d373000..00ab5e0 100644
--- a/src/app/admin/coupon/coupon-edit/coupon-edit.component.html
+++ b/src/app/admin/coupon/coupon-edit/coupon-edit.component.html
@@ -155,10 +155,18 @@
+
+
+ 是否邮递实物
+
+
+
+
+
- 是否预约产品
+ 是否预约产品
diff --git a/src/app/admin/coupon/coupon-edit/coupon-edit.component.ts b/src/app/admin/coupon/coupon-edit/coupon-edit.component.ts
index 89ca8f4..42612e2 100644
--- a/src/app/admin/coupon/coupon-edit/coupon-edit.component.ts
+++ b/src/app/admin/coupon/coupon-edit/coupon-edit.component.ts
@@ -87,6 +87,7 @@ export class CouponEditComponent implements OnInit {
isPresent: [false],
reserveStatus: [false],
buyPoints: [false],
+ wherePost: [false],
payType: [null, [Validators.required]],
displayArea: [null],
couponSource: [null],
diff --git a/src/app/admin/discount/discount-edit/discount-edit.component.html b/src/app/admin/discount/discount-edit/discount-edit.component.html
index 46dd779..6fec6ac 100644
--- a/src/app/admin/discount/discount-edit/discount-edit.component.html
+++ b/src/app/admin/discount/discount-edit/discount-edit.component.html
@@ -45,8 +45,8 @@
优惠券使用归属
-
-
+
+
diff --git a/src/app/admin/index/api-merchant/api-merchant.component.html b/src/app/admin/index/api-merchant/api-merchant.component.html
new file mode 100644
index 0000000..13b1859
--- /dev/null
+++ b/src/app/admin/index/api-merchant/api-merchant.component.html
@@ -0,0 +1,39 @@
+
+
+
+
+ 接口信息
+
+
+
+ 商户号(mchId):{{apiMerchants['mchId']}}
+ 密钥(apiKey):{{apiMerchants['apiKey']}}
+ IP白名单:{{apiMerchants['ext1']}}
+
+
+
+
+
+ 已开通产品
+
+
+
+ {{item['codeType'] | productConfig}}
+
+
+
diff --git a/src/app/admin/index/api-merchant/api-merchant.component.scss b/src/app/admin/index/api-merchant/api-merchant.component.scss
new file mode 100644
index 0000000..2b3e6a6
--- /dev/null
+++ b/src/app/admin/index/api-merchant/api-merchant.component.scss
@@ -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;
+}
diff --git a/src/app/admin/index/api-merchant/api-merchant.component.ts b/src/app/admin/index/api-merchant/api-merchant.component.ts
new file mode 100644
index 0000000..bcdc9bc
--- /dev/null
+++ b/src/app/admin/index/api-merchant/api-merchant.component.ts
@@ -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'];
+ }
+ });
+ }
+
+}
diff --git a/src/app/admin/index/index.module.ts b/src/app/admin/index/index.module.ts
index dcb69aa..0111e0a 100644
--- a/src/app/admin/index/index.module.ts
+++ b/src/app/admin/index/index.module.ts
@@ -14,11 +14,12 @@ import {RegionSelectorModule} from '../../common/region-selector/region-selector
import {AppCommonModule} from '../../app-common.module';
import { TestComponent } from './test/test.component';
import {NzSpaceModule} from 'ng-zorro-antd/space';
+import { ApiMerchantComponent } from './api-merchant/api-merchant.component';
@NgModule({
- declarations: [IndexComponent, TestComponent],
+ declarations: [IndexComponent, TestComponent, ApiMerchantComponent],
imports: [
CommonModule,
SystemRoutingModule,
diff --git a/src/app/admin/index/index/index.component.html b/src/app/admin/index/index/index.component.html
index 5d24a5d..b52c1c9 100644
--- a/src/app/admin/index/index/index.component.html
+++ b/src/app/admin/index/index/index.component.html
@@ -1,9 +1,9 @@
-
-
- 首页
-
-
+
+
+
+
+
@@ -166,6 +166,8 @@
+
+
diff --git a/src/app/admin/index/order-statistics/order-statistics.component.html b/src/app/admin/index/order-statistics/order-statistics.component.html
new file mode 100644
index 0000000..2d36490
--- /dev/null
+++ b/src/app/admin/index/order-statistics/order-statistics.component.html
@@ -0,0 +1,15 @@
+
+
+
+ 订单统计汇总
+
+
+
+
+
+
diff --git a/src/app/admin/index/order-statistics/order-statistics.component.scss b/src/app/admin/index/order-statistics/order-statistics.component.scss
new file mode 100644
index 0000000..e69de29
diff --git a/src/app/admin/index/order-statistics/order-statistics.component.ts b/src/app/admin/index/order-statistics/order-statistics.component.ts
new file mode 100644
index 0000000..f8ed86d
--- /dev/null
+++ b/src/app/admin/index/order-statistics/order-statistics.component.ts
@@ -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)'
+ }
+ }
+ ]
+ };
+ }
+
+}
diff --git a/src/app/admin/order/order-list/order-list.component.html b/src/app/admin/order/order-list/order-list.component.html
index dbdee41..dd79c40 100644
--- a/src/app/admin/order/order-list/order-list.component.html
+++ b/src/app/admin/order/order-list/order-list.component.html
@@ -147,7 +147,7 @@
支付时间 |
取消时间 |
状态 |
-
+ 操作 |
@@ -167,10 +167,10 @@
{{data.payTime | date: 'yyyy-MM-dd HH:mm:ss'}} |
{{data.cancelTime | date: 'yyyy-MM-dd HH:mm:ss'}} |
{{data.orderStatus}} |
-
-
-
-
+
+ 订单详情
+
+ |
@@ -185,3 +185,20 @@
+
+
+ {{orderDetail['highChildOrderList'][0]['goodsName']}}
+ {{orderDetail['payType'] | paytype}}
+ {{orderDetail['payPrice']}}
+ {{orderDetail['memName']}}
+ {{orderDetail['memPhone']}}
+ {{orderDetail['orderNo']}}
+ {{orderDetail['createTime'] | date: 'yyyy-MM-dd HH:mm:ss'}}
+ {{orderDetail['payTime'] | date: 'yyyy-MM-dd HH:mm:ss'}}
+ {{orderDetail['orderStatus'] | orderCouponStatus}}
+ {{postData['address']}}
+ {{postData['user']}}
+ {{postData['phone']}}
+
+
+
diff --git a/src/app/admin/order/order-list/order-list.component.ts b/src/app/admin/order/order-list/order-list.component.ts
index f118787..1938d9e 100644
--- a/src/app/admin/order/order-list/order-list.component.ts
+++ b/src/app/admin/order/order-list/order-list.component.ts
@@ -8,8 +8,8 @@ import {Router} from '@angular/router';
import {CommonsService} from '../../../services/commons.service';
import {OrderService} from '../../../services/order.service';
import {CompanyService} from '../../../services/company.service';
-import {ADMIN_INFO_OBJECT} from "../../../services/local-storage.namespace";
-import {LocalStorageService} from "../../../services/local-storage.service";
+import {ADMIN_INFO_OBJECT} from '../../../services/local-storage.namespace';
+import {LocalStorageService} from '../../../services/local-storage.service';
@Component({
selector: 'app-order-list',
@@ -31,7 +31,16 @@ export class OrderListComponent implements OnInit {
id: number; // 订单ID
isVisible = false;
refundContent: string;
+ isVisibleDetail = false;
roleType: number;
+ orderDetail: any = {
+ highChildOrderList: [{
+ goodsName: ''
+ }]
+ };
+ postData: any = {
+ address: '',
+ };
constructor(
private form: FormBuilder,
private order: OrderService,
@@ -130,11 +139,20 @@ export class OrderListComponent implements OnInit {
// 查看详情
public getDetail(id: number): void {
- this.router.navigate(['/admin/order/order-detail'], {
- queryParams: {
- merchantId: id
- }
- }).then(r => console.log(r));
+ this.isVisibleDetail = true;
+ this.order.getOrderById(id , data => {
+ if (data['return_code'] === '000000') {
+ console.log(data);
+ this.orderDetail = data['return_data'];
+ if (this.orderDetail['remarks'] != null) {
+ this.postData = JSON.parse(this.orderDetail['remarks']);
+ console.log(this.postData['address']);
+
+ }
+ } else {
+ this.message.error(data['return_msg']);
+ }
+ });
}
// 下载模板
diff --git a/src/app/app-common.module.ts b/src/app/app-common.module.ts
index b1b7043..cdfe23e 100644
--- a/src/app/app-common.module.ts
+++ b/src/app/app-common.module.ts
@@ -48,14 +48,12 @@ import {
GasStaffStatusPipe,
PayStatusPipe,
ChlidRechargeStatusPipe,
- SourceTypePipe, GasClassGroupTaskStatusPipe, GasOrderStatusPipe
+ SourceTypePipe, GasClassGroupTaskStatusPipe, GasOrderStatusPipe, PlatformPipe, ProductConfigPipe, OilCardStatusPipe
} from './pipes';
-import {OilCardStatusPipe} from './pipes';
import {OilTypePipe} from './pipes/store/oil-type.pipe';
import {OilPriceTaskStatusPipe} from './pipes/gas-oil-price/oil-price-task-status.pipe';
import {OilPriceTaskExecutionTypePipe} from './pipes/gas-oil-price/oil-price-task-execution-type.pipe';
import {OilPriceTaskPriceTypePipe} from './pipes/gas-oil-price/oil-price-task-price-type.pipe';
-import { PlatformPipe } from './pipes/recharge-pipe/platform.pipe';
import { IntegralTypePipe } from './pipes/integral/integral-type.pipe';
import { IntegralProductPipe } from './pipes/integral/integral-product.pipe';
import { MsgTypePipe } from './pipes/msg/msg-type.pipe';
@@ -112,6 +110,7 @@ const PIPES = [
IntegralTypePipe,
IntegralProductPipe,
MsgTypePipe,
+ ProductConfigPipe
];
@@ -124,7 +123,7 @@ const PIPES = [
NgxNeditorModule
],
declarations: [
- ...PIPES
+ ...PIPES,
],
exports: [
diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts
index 3877c1f..e725a6f 100644
--- a/src/app/app-routing.module.ts
+++ b/src/app/app-routing.module.ts
@@ -157,6 +157,11 @@ const routes: Routes = [
loadChildren: () => import('./admin/promotion/promotion.module').then(m => m.PromotionModule),
canActivate: [InitGuardService]
},
+ {
+ path: 'api-order',
+ loadChildren: () => import('./admin/api-order/api-order.module').then(m => m.ApiOrderModule),
+ canActivate: [InitGuardService]
+ },
],
},
];
diff --git a/src/app/pipes/index.ts b/src/app/pipes/index.ts
index 5956d41..beea301 100644
--- a/src/app/pipes/index.ts
+++ b/src/app/pipes/index.ts
@@ -41,3 +41,4 @@ export * from './apiMerchant/source-type.pipe';
export * from './gas-class-group-task/gas-class-group-task-status.pipe';
export * from './gas-order/gas-order-status.pipe';
export * from './recharge-pipe/platform.pipe';
+export * from './index/product-config.pipe';
diff --git a/src/app/pipes/index/product-config.pipe.ts b/src/app/pipes/index/product-config.pipe.ts
new file mode 100644
index 0000000..51d4f7a
--- /dev/null
+++ b/src/app/pipes/index/product-config.pipe.ts
@@ -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 '星巴克接口';
+ }
+ }
+
+}
diff --git a/src/app/pipes/msg/msg-type.pipe.ts b/src/app/pipes/msg/msg-type.pipe.ts
index 60156f9..a1e7b92 100644
--- a/src/app/pipes/msg/msg-type.pipe.ts
+++ b/src/app/pipes/msg/msg-type.pipe.ts
@@ -15,16 +15,5 @@ export class MsgTypePipe implements PipeTransform {
return this.array[product][type - 1];
}
- // transform(object: string , objectName: string): string {
- //
- // console.log(object);
- //
- // const o = JSON.parse(object);
- // if (typeof o == 'object') {
- // return o[objectName];
- // }
- // return null;
- // }
-
}
diff --git a/src/app/services/api-merchants.service.ts b/src/app/services/api-merchants.service.ts
index 90058db..d276fa6 100644
--- a/src/app/services/api-merchants.service.ts
+++ b/src/app/services/api-merchants.service.ts
@@ -1,7 +1,9 @@
import { Injectable } from '@angular/core';
import {CommonsService} from './commons.service';
-import {environment} from "../../environments/environment";
+import {environment} from '../../environments/environment';
import {HttpClient} from '@angular/common/http';
+import {take} from "rxjs/operators";
+
@Injectable({
providedIn: 'root'
@@ -122,7 +124,7 @@ export class ApiMerchantsService {
* @methodName configApiProduct
* @Description // 提交配置产品
* @Date 18:00 2022/6/8
- * @Param
+ * @Param configApiProduct
*/
public configApiProduct(params: object, callBack) {
this.http.post(environment.baseUrl + 'apiProduct/configApiProduct', params).subscribe(data => {
@@ -167,4 +169,57 @@ export class ApiMerchantsService {
callBack(data);
});
}
+
+ /**
+ * @Author Sum1Dream
+ * @methodName editApiIpAddress
+ * @Description //编辑ip地址
+ * @Date 09:25 2022/12/7
+ * @Param params: object, callBack
+ */
+ public editApiIpAddress(params: object, callBack) {
+ this.http.post(environment.baseUrl + 'apiIpAddress/editApiIpAddress', params).subscribe(data => {
+ callBack(data);
+ });
+ }
+
+ /**
+ * @Author Sum1Dream
+ * @methodName findByMchId
+ * @Description // 根据商户号查询详情
+ * @Date 11:18 2022/12/7
+ * @Param mchId: number, callBack
+ */
+ public findByMchId(mchId: string, callBack) {
+ this.http.get(environment.baseUrl + 'apiIpAddress/findByMchId?mchId=' + mchId).subscribe(data => {
+ callBack(data);
+ });
+ }
+
+ /**
+ * @Author Sum1Dream
+ * @methodName getSecConfigList
+ * @Description // 查询配置内容
+ * @Date 16:43 2022/12/7
+ * @Param mchId: string, callBack
+ */
+ public getSecConfigList(mchId: string, callBack) {
+ this.http.get(environment.baseUrl + 'apiIpAddress/getSecConfigList?mchId=' + mchId).subscribe(data => {
+ callBack(data);
+ });
+ }
+
+ /**
+ * @Author Sum1Dream
+ * @methodName configMerchant
+ * @Description // 配置商户可用接口
+ * @Date 16:44 2022/12/7
+ * @Param params: object, callBack
+ */
+ public configMerchant(params: object, callBack) {
+ this.http.post(environment.baseUrl + 'apiIpAddress/configMerchant', params).subscribe(data => {
+ callBack(data);
+ });
+ }
+
}
diff --git a/src/environments/environment.ts b/src/environments/environment.ts
index cc5edd5..21ad46f 100644
--- a/src/environments/environment.ts
+++ b/src/environments/environment.ts
@@ -4,10 +4,10 @@
export const environment = {
production: false,
- baseUrl: 'http://localhost:9302/brest/', // 测试环境服务器地址(请求数据地址)
- imageUrl: 'http://localhost:9302/filesystem/',
- // baseUrl: 'https://hsg.dctpay.com/brest/', // 测试环境服务器地址(请求数据地址)
- // imageUrl: 'https://hsg.dctpay.com/filesystem/',
+ // baseUrl: 'http://localhost:9302/brest/', // 测试环境服务器地址(请求数据地址)
+ // imageUrl: 'http://localhost:9302/filesystem/',
+ 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/styles.scss b/src/styles.scss
index b45d7aa..d64eb98 100644
--- a/src/styles.scss
+++ b/src/styles.scss
@@ -13,12 +13,21 @@
.fr {
float: right;
}
+.ml {
+ margin-left: 20px;
+}
+.box-shadow:hover {
+ box-shadow: #e8e8e8 0 0 4px 2px;
+}
.cp {
cursor: pointer;
}
.br {
border-right: solid 1px #e8e8ed;
}
+.mt {
+ margin-top: 8px;
+}
.inner-content {
padding: 24px;
background: #fff;
|