From 4318a6760a67f3de52518b4deb333eaef4a21c68 Mon Sep 17 00:00:00 2001 From: Sum1Dream <418471657@qq.com> Date: Fri, 21 Oct 2022 18:01:58 +0800 Subject: [PATCH] 1 --- .../agent/agent-list/agent-list.component.ts | 4 +- .../third-product.component.html | 4 +- src/app/admin/index/test/test.component.html | 60 +++++++++---------- src/app/admin/index/test/test.component.ts | 26 ++++---- .../system-msg/system-msg.component.html | 2 +- src/app/app-common.module.ts | 13 ++-- src/app/pipes/index.ts | 1 + src/app/pipes/msg/msg-type.pipe.ts | 12 ++++ src/environments/environment.ts | 8 +-- 9 files changed, 73 insertions(+), 57 deletions(-) diff --git a/src/app/admin/agent/agent-list/agent-list.component.ts b/src/app/admin/agent/agent-list/agent-list.component.ts index e6fa6d0..3a57bc7 100644 --- a/src/app/admin/agent/agent-list/agent-list.component.ts +++ b/src/app/admin/agent/agent-list/agent-list.component.ts @@ -251,9 +251,11 @@ export class AgentListComponent implements OnInit { } this.isOkLoading = true; + console.log(this.couponList); + console.log(this.distributeList); this.validateFormDistribute.value['agentName'] = this.requestData.find(data => data.id == this.agentId).agentName; - this.validateFormDistribute.value['couponName'] = this.couponList.find(data => data.id == this.validateFormDistribute.value['couponId']).couponName; + this.validateFormDistribute.value['couponName'] = this.distributeList.find(data => data.id == this.validateFormDistribute.value['couponId']).couponName; this.validateFormDistribute.value['agentId'] = this.agentId; const whereObject = { diff --git a/src/app/admin/config-manage/third-product/third-product.component.html b/src/app/admin/config-manage/third-product/third-product.component.html index 4d2497e..ba87b74 100644 --- a/src/app/admin/config-manage/third-product/third-product.component.html +++ b/src/app/admin/config-manage/third-product/third-product.component.html @@ -62,6 +62,7 @@ 编号 + 产品类型 产品名称 利润比例 积分抵扣比例 @@ -76,7 +77,8 @@ {{i + 1}} {{data.productName}} - {{data.discount == null ? '0' : data.discount + "%"}} + {{data.productType | productType : data.productId}} + {{data.discount == null ? '暂未配置' : data.discount + "%"}} {{data.integralDiscount == null ? '0' : data.integralDiscount + "%"}} {{data.productPayTypeString.substring(0 , data.productPayTypeString.length - 1)}} {{data.productPlatformString.substring(0 , data.productPlatformString.length - 1)}} diff --git a/src/app/admin/index/test/test.component.html b/src/app/admin/index/test/test.component.html index 559660c..4648a19 100644 --- a/src/app/admin/index/test/test.component.html +++ b/src/app/admin/index/test/test.component.html @@ -1,30 +1,30 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +
+ 大家好!我是:{{currentUser}} +
+
+
{{msg}}
+
+
+ 当前登录用户:{{users}} +
+
+ +
+
+ +
+

{{error | json}}

+

completed!

+ + diff --git a/src/app/admin/index/test/test.component.ts b/src/app/admin/index/test/test.component.ts index 0d030bd..61d6934 100644 --- a/src/app/admin/index/test/test.component.ts +++ b/src/app/admin/index/test/test.component.ts @@ -37,7 +37,7 @@ export class TestComponent implements OnInit { ngOnInit(): void { console.log(this.currentUser); // 连接websocket - // this.webSocketService.connect(`ws://139.159.177.244:9302/brest/WebSocket/` + this.currentUser); + this.webSocketService.connect(`ws://139.159.177.244:9302/brest/WebSocket/` + this.currentUser); // 接收消息 this.webSocketService.messageSubject.subscribe( data => { @@ -54,18 +54,18 @@ export class TestComponent implements OnInit { ); } - // send() { - // // 创建消息对象 - // const msg = { - // msg: this.message, // 消息内容 - // type: this.type === SEND_TYPE.ALL ? SEND_TYPE.ALL : SEND_TYPE.SINGLE, // 类型 - // to: this.type === SEND_TYPE.SINGLE ? this.sendToUser : undefined // 要发送的对象 - // }; - // // 发送 - // this.webSocketService.sendMessage(JSON.stringify(msg)); - // // 发送完成,情况message内容 - // this.message = ''; - // } + send() { + // 创建消息对象 + const msg = { + msg: this.message, // 消息内容 + type: this.type === SEND_TYPE.ALL ? SEND_TYPE.ALL : SEND_TYPE.SINGLE, // 类型 + to: this.type === SEND_TYPE.SINGLE ? this.sendToUser : undefined // 要发送的对象 + }; + // 发送 + this.webSocketService.sendMessage(JSON.stringify(msg)); + // 发送完成,情况message内容 + this.message = ''; + } } diff --git a/src/app/admin/system/system-msg/system-msg.component.html b/src/app/admin/system/system-msg/system-msg.component.html index c73d425..40edfb6 100644 --- a/src/app/admin/system/system-msg/system-msg.component.html +++ b/src/app/admin/system/system-msg/system-msg.component.html @@ -91,7 +91,7 @@ - + {{i+1}} {{data.title}} {{data.type | msgType : 1 }} diff --git a/src/app/app-common.module.ts b/src/app/app-common.module.ts index c1ea2d1..22a6456 100644 --- a/src/app/app-common.module.ts +++ b/src/app/app-common.module.ts @@ -59,6 +59,7 @@ 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'; +import { ProductTypePipe } from './pipes/third-product/product-type.pipe'; const PIPES = [ TimesPipe, @@ -109,6 +110,10 @@ const PIPES = [ GasClassGroupTaskStatusPipe, GasOrderStatusPipe, PlatformPipe, + IntegralTypePipe, + IntegralProductPipe, + MsgTypePipe, + ProductTypePipe, ]; @@ -121,17 +126,11 @@ const PIPES = [ NgxNeditorModule ], declarations: [ - ...PIPES, - IntegralTypePipe, - IntegralProductPipe, - MsgTypePipe, + ...PIPES ], exports: [ ...PIPES, - IntegralTypePipe, - IntegralProductPipe, - MsgTypePipe, ], }) diff --git a/src/app/pipes/index.ts b/src/app/pipes/index.ts index 5956d41..b648dac 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 './third-product/product-type.pipe'; diff --git a/src/app/pipes/msg/msg-type.pipe.ts b/src/app/pipes/msg/msg-type.pipe.ts index 8df09ef..60156f9 100644 --- a/src/app/pipes/msg/msg-type.pipe.ts +++ b/src/app/pipes/msg/msg-type.pipe.ts @@ -15,4 +15,16 @@ 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/environments/environment.ts b/src/environments/environment.ts index a2d6d6f..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://hsgcs.dctpay.com/brest/', // 测试环境服务器地址(请求数据地址) - // imageUrl: 'https://hsgcs.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=', };