diff --git a/src/app/admin/cms/cms-content/cms-content.component.html b/src/app/admin/cms/cms-content/cms-content.component.html index 3cecfd1..21aed05 100644 --- a/src/app/admin/cms/cms-content/cms-content.component.html +++ b/src/app/admin/cms/cms-content/cms-content.component.html @@ -1,213 +1,228 @@ - - 内容管理 - - - 内容发布 - + + 内容管理 + + + 内容发布 + - -
-
-
-
- - 内容分类 - - - - - -
-
- - 内容标题 - - - - -
-
- - 内容状态 - - - - - - - - -
-
- - 展示平台 - - - - - - - - - -
- -
- -
-
- - -
-
-
+
+ +
+ + + + + + + + + + + + +
+
+ +
共搜索到 {{total}} 条数据
+ + + +
-
- 共计 {{total}} 条数据 -
- -
+ - + (nzPageIndexChange)="getRequest()" + (nzPageSizeChange)="getRequest(true)" + [nzScroll]="{ x: '1150px'}"> + 序号 - 分类名称 - 内容标题 - 展示平台 - 状态 + 分类名称 + 内容标题 + 简要描述 + 访问总量 + 是否推荐 + 状态 创建时间 - 操作 + 操作 - - {{i+1}} - {{data.tag}} + + {{i+ 1}} + {{data.categoryName}} {{data.title}} - {{data.platform | showType}} + {{data.description}} + {{data.visitCount}} - {{data.status == 1 ? '编辑中': '已发布'}} + + - {{data.createTime | date:'yyyy-MM-dd hh:mm:ss' }} - - 更多操作 - - - + + 编辑中 + 已发布 + + {{data.createTime | date:'yyyy-MM-dd' }} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 附件名称 + 附件类型 + 附件描述 + 排序 + 添加时间 + 操作 + + + + + {{ data.patchName }} + 图片 + 音频 + 视频 + 文档 + 其他 + {{data.patchDesc}} + {{data.sort}} + {{data.addTime | date:'yyyy-MM-dd'}} + + +
- - - - + + +
+ + + + 发布模板 + + + + + + + + +
diff --git a/src/app/admin/cms/cms-content/cms-content.component.less b/src/app/admin/cms/cms-content/cms-content.component.less index e69de29..3562ef1 100644 --- a/src/app/admin/cms/cms-content/cms-content.component.less +++ b/src/app/admin/cms/cms-content/cms-content.component.less @@ -0,0 +1,27 @@ +.width_input { + width: 200px; +} +.width_input_chlid { + width: 200px; + margin-left: 10px; +} +[nz-form] { + max-width: 600px; +} +button { + margin-left: 8px; +} +:host ::ng-deep .upload-list-inline .ant-upload-list-item { + float: left; + width: 200px; + margin-right: 8px; +} +.search-result-list { + margin-top: 16px; + border: 1px dashed #e9e9e9; + border-radius: 6px; + background-color: #fafafa; + min-height: 200px; + text-align: center; + padding-top: 80px; +} diff --git a/src/app/admin/cms/cms-content/cms-content.component.ts b/src/app/admin/cms/cms-content/cms-content.component.ts index 32edbf1..6ef0cc3 100644 --- a/src/app/admin/cms/cms-content/cms-content.component.ts +++ b/src/app/admin/cms/cms-content/cms-content.component.ts @@ -1,22 +1,12 @@ import {Component, OnInit} from '@angular/core'; import {FormBuilder, FormGroup, Validators} from '@angular/forms'; -import {HttpClient} from '@angular/common/http'; -import {NzMessageService, NzModalService, NzUploadFile} from 'ng-zorro-antd'; +import {HttpClient, HttpEvent, HttpEventType, HttpRequest, HttpResponse} from '@angular/common/http'; +import {NzMessageService, NzModalService, UploadXHRArgs} from 'ng-zorro-antd'; import {Router} from '@angular/router'; import {LocalStorageService} from '../../../services/local-storage.service'; import {ADMIN_INFO_OBJECT} from '../../../services/local-storage.namespace'; import {environment} from '../../../../environments/environment'; -import {CmsService} from '../../../services/cms.service'; -import {CommonsService} from '../../../services/commons.service'; - -function getBase64(file: File): Promise { - return new Promise((resolve, reject) => { - const reader = new FileReader(); - reader.readAsDataURL(file); - reader.onload = () => resolve(reader.result); - reader.onerror = error => reject(error); - }); -} + @Component({ selector: 'app-cms-content', @@ -24,93 +14,247 @@ function getBase64(file: File): Promise { styleUrls: ['./cms-content.component.less'] }) export class CmsContentComponent implements OnInit { - - - WEB_SERVE_URL = environment.imageUrl; - POST_URL = environment.baseUrl; - searchForm: FormGroup; // 搜索框 - validateForm: FormGroup; // 添加框 - requestData = []; // 列表数据 - nodes = []; // 类型树 - total: number; // 页码 - pageNum = 1; // 页码 - pageSize = 10; // 条码 +// 搜索按钮等待特效 + isLoadingSearch = false; + // 搜索内容标题 + searchTitle = ''; + // 状态搜索 + searchStatus = ''; + // 分类搜索 + searchCategoryId = ''; + // 公司id + searchCompanyId = ''; + // 查询数组 + requestData = []; + // 查询数组等待特效 loading = true; - editFlag = false; + // 请求页码 + pageIndex = 1; + // 请求条数 + pageSize = 10; + // 查询总条数 + total = 0; + /** 分类树数据 **/ + nodes = []; + WEB_SERVE_URL; + // 选中的内容id + contentSelect = ''; + // 是否显示附件列表 + showPatch = 0; + // 根据内容查询附件列表 + patchList = []; + + // 添加附件相关 + // 提交等待 + isOkLoading = false; + // 附件类型 + patchTypeCheck = '0'; + // 附件返回地址 + patchPath = ''; + // 允许上传的文件类型 + annexForm: FormGroup; + /** 定义附件表单 **/ isVisible = false; - imgFile = []; - previewImage: string | undefined = ''; - previewVisible = false; - id: number; + /** 是否弹出添加 **/ + fileList = []; + // 上传的后缀名 + suffix = ''; + // 允许上传的文件类型 + imageSuffix = [ + 'jpg', + 'jpeg', + 'png', + 'jif', + 'dwg', + 'dxf', + 'jp2', + 'jpe', + 'svf', + 'tif', + 'tiff', + ]; + audioSuffix = [ + '3gpp', + 'ac3', + 'mp2', + 'mp3', + 'asf', + 'cda', + 'wav', + 'wma', + 'mid', + 'ra', + 'rma', + 'mod', + ]; + videoSuffix = [ + '3gpp', + 'mp2', + 'mp4', + 'mpeg', + 'mpg', + 'avi', + 'rmvb', + 'flv', + '3pg', + 'rm', + 'mov', + 'wmv', + 'mkv', + 'f4v', + 'm4v', + ]; + applicationSuffix = [ + 'asf', + 'doc', + 'dot', + 'dtd', + 'htm', + 'html', + 'css', + 'csv', + 'js', + 'json', + 'mpp', + 'ogg', + 'pdf', + 'pot', + 'pps', + 'ppt', + 'rtf', + 'txt', + 'wdb', + 'wps', + 'xhtml', + 'xlc', + 'xlm', + 'xls', + 'xlt', + 'xlw', + 'xml', + 'zip', + 'docx', + 'xlsx', + 'pptx', + 'sql' + ]; + + isPublish = false; + isPushOkLoading = false; + moduleId = ''; + pushId = ''; + pushForm: FormGroup; + // 可选择的模板列表 + selectModule = []; + /** 按钮数据权限 **/ + BTN_cmscontent_add = 0; + BTN_cmscontent_edit = 0; + BTN_cmscontent_delete = 0; + BTN_cmscontent_patch = 0; + BTN_cmscontent_up_down = 0; + constructor( private fb: FormBuilder, private http: HttpClient, // http请求 private message: NzMessageService, // 信息提示 private router: Router, - private common: CommonsService, - private cms: CmsService, + private modalService: NzModalService, // 对话框 + private store: LocalStorageService, // 请求缓存 ) { this.WEB_SERVE_URL = environment.baseUrl; + this.searchCompanyId = this.store.get(ADMIN_INFO_OBJECT)['secUser']['companyId']; } ngOnInit() { - - this.searchForm = this.fb.group({ - title: [null], - categoryId: [null], - platform: [null], - status: [null], + /** 循环查询 按钮权限 **/ + for (let i = 0; i < this.store.get(ADMIN_INFO_OBJECT)['buttonList'].length; i++) { + if (this.store.get(ADMIN_INFO_OBJECT)['buttonList'][i].permissionCode === 'BTN_cmscontent_add') { + this.BTN_cmscontent_add = 1; + } + if (this.store.get(ADMIN_INFO_OBJECT)['buttonList'][i].permissionCode === 'BTN_cmscontent_edit') { + this.BTN_cmscontent_edit = 1; + } + if (this.store.get(ADMIN_INFO_OBJECT)['buttonList'][i].permissionCode === 'BTN_cmscontent_delete') { + this.BTN_cmscontent_delete = 1; + } + if (this.store.get(ADMIN_INFO_OBJECT)['buttonList'][i].permissionCode === 'BTN_cmscontent_patch') { + this.BTN_cmscontent_patch = 1; + } + if (this.store.get(ADMIN_INFO_OBJECT)['buttonList'][i].permissionCode === 'BTN_cmscontent_up_down') { + this.BTN_cmscontent_up_down = 1; + } + } + this.annexForm = this.fb.group({ + patchName: [null, [Validators.required]], + patchDesc: [null], + patchType: [null, [Validators.required]], + sort: [null, [Validators.required]], }); - - this.validateForm = this.fb.group({ - categoryId: [null, [Validators.required]], - title: [null, [Validators.required]], - platform: [null], - platformArray: [null], - sortId: [null, [Validators.required]], - description: [null, [Validators.required]], - jumpType: [null], - jumpUrl: [null], - + this.pushForm = this.fb.group({ + moduleId: [null] }); - const roleType = 1; + // 获取登录人 角色类型,查询分类树 + console.log(this.store.get(ADMIN_INFO_OBJECT)); + let roleType = 1; + /* if (0 == this.store.get(ADMIN_INFO_OBJECT)['bsCompany']['companyType']) { + roleType = 1; + } else if (1 == this.store.get(ADMIN_INFO_OBJECT)['bsCompany']['companyType']) { + if (this.store.get(ADMIN_INFO_OBJECT)['bsCompany']['isService'] == true) { + roleType = 3; + } else { + roleType = 2; + } + } else if (2 == this.store.get(ADMIN_INFO_OBJECT)['bsCompany']['companyType']) { + roleType = 3; + }*/ this.findCategoryTree(roleType); - this.getRequest(true, this.searchForm.value); - + this.getRequest(); } + // 重置搜索 + resetSearch() { + // 搜索内容标题 + this.searchTitle = ''; + // 状态搜索 + this.searchStatus = ''; + // 分类搜索 + this.searchCategoryId = ''; + } - // 查询列表 - public getRequest(reset: boolean = false, whereObject: object) { - - + // 请求列表 + getRequest(reset: boolean = false) { + this.showPatch = 0; + this.loading = false; if (reset) { - this.pageNum = 1; + this.pageIndex = 1; + } + if (this.searchStatus == null) { + this.searchStatus = ''; + } + if (this.searchCategoryId == null) { + this.searchCategoryId = ''; } - whereObject['pageNum'] = this.pageNum; - whereObject['pageSize'] = this.pageSize; - this.cms.getListContent(whereObject, data => { + this.http.get(this.WEB_SERVE_URL + '/cmsContent/getListContent?pageNum=' + this.pageIndex + '&pageSize=' + this.pageSize + '&title=' + this.searchTitle + '&category=' + this.searchCategoryId + '&status=' + this.searchStatus + '&companyId=' + this.searchCompanyId).subscribe(data => { console.log(data); - this.loading = false; if (data['return_code'] === '000000') { this.requestData = data['return_data'].list; this.total = data['return_data'].total; + this.isLoadingSearch = false; } else { - this.message.error(data['return_msg']); + this.message.create('error', data['return_msg']); } }); } - // 重置 - public resetForm(): void { - this.searchForm.reset(); + // 搜索 + getSearch() { + this.getRequest(); } - // 查询分类树 findCategoryTree(roleType) { - this.cms.getOwnCategoryTree(roleType , data => { + this.http.get(this.WEB_SERVE_URL + '/cmsCategory/getOwnCategoryTree?roleType=' + roleType).subscribe(data => { if (data['return_code'] === '000000') { this.nodes = data['return_data']; if (this.nodes.length !== 0) { @@ -129,6 +273,7 @@ export class CmsContentComponent implements OnInit { for (const i in data) { if (data[i].nodes == null) { const item = { + /** 重新赋值 **/ isLeaf: true, title: data[i].text, key: data[i].id, @@ -137,6 +282,7 @@ export class CmsContentComponent implements OnInit { data[i] = item; } else { const item = { + /** 重新赋值 **/ isLeaf: false, title: data[i].text, key: data[i].id, @@ -147,119 +293,340 @@ export class CmsContentComponent implements OnInit { } } this.nodes = data; + console.log(this.nodes); } - // 新增 + // 跳转添加 getAdd() { - this.isVisible = true; - this.editFlag = false; + this.router.navigate(['/admin/cms/cmscontentadd'], { + queryParams: { + editFlag: 0 + } + }); + } + + // 跳转修改 + getEdit(id) { + this.router.navigate(['/admin/cms/cmscontentedit'], { + queryParams: { + id: id + } + }); + } + + // 跳转详情 + getContentView(id) { + this.router.navigate(['/admin/cms/cmscontentview'], { + queryParams: { + id: id + } + }); } - // 编辑 - getEdit(data: object) { - console.log(data); - if (data['imgData'] != null && data['imgData'] !== '') { - const logo = String(data['imgData']); - const logoArray = []; - logoArray.push( - { - uid: 1, - name: logo, - status: 'done', - url: environment.imageUrl + logo - }); - this.imgFile = logoArray; + // 对话框删除 + showDeleteConfirmDelete(id): void { + this.modalService.confirm({ + nzTitle: '是否确定删除', + nzOkText: '是', + nzOnOk: () => this.deleteContent(id), + nzCancelText: '否', + }); + } + + // 删除内容 + deleteContent(id) { + if (id === undefined) { + return; } - this.id = data['id']; - this.validateForm.patchValue(data); - this.editFlag = true; - this.isVisible = true; + if (id === null) { + return; + } + if (id === '') { + return; + } + this.http.get(this.WEB_SERVE_URL + '/cmsContent/delContent?id=' + id).subscribe(data => { + if (data['return_code'] === '000000') { + this.message.create('success', `删除成功!`); + this.getRequest(); + } else { + this.message.create('warning', data['return_msg']); + } + }); } - // 提交内容 - handleOk() { - // tslint:disable-next-line:forin - for (const i in this.validateForm.controls) { - this.validateForm.controls[i].markAsDirty(); - this.validateForm.controls[i].updateValueAndValidity(); - if (this.validateForm.controls[i].errors != null) { - this.message.error('必填项不能为空'); - return; + // 查询附件列表 + findPatchByContent(id) { + this.contentSelect = id; + this.http.get(this.WEB_SERVE_URL + '/cmsContent/getListPatches?pageNum=1&pageSize=100&contentId=' + id).subscribe(data => { + if (data['return_code'] === '000000') { + this.showPatch = 1; + this.patchList = data['return_data'].list; + console.log(this.patchList); + } else { + this.message.create('warning', data['return_msg']); } + }); + } + + // 弹出添加附件 + addPatch() { + this.isVisible = true; + } + + // 删除附件确认 + showDeletePatch(id) { + this.modalService.confirm({ + nzTitle: '是否确定删除', + nzOkText: '是', + nzOnOk: () => this.deletePatch(id), + nzCancelText: '否', + }); + } + + // 删除附件 + deletePatch(id) { + if (id === undefined || id === null || id === '') { + return; } - if (this.imgFile.length !== 0) { - if (this.imgFile[0]['response'] != null) { - this.validateForm.value.imgData = this.imgFile[0]['response']['return_data'][0]; + this.http.get(this.WEB_SERVE_URL + '/cmsPatch/delPatch?id=' + id).subscribe(data => { + if (data['return_code'] === '000000') { + this.message.create('success', `删除成功!`); + this.findPatchByContent(this.contentSelect); } else { - this.validateForm.value.imgData = this.imgFile[0].name; + this.message.create('warning', data['return_msg']); } + }); + } + + // 取消按钮 + handleCancel(): void { + this.isVisible = false; + this.patchPath = ''; + this.fileList = []; + /** 隐藏弹框 **/ + } + + // 附件类型选择 + getChange(event) { + if (event != null) { + this.patchTypeCheck = event; + console.log(event); } - if (this.editFlag) { - this.validateForm.value.id = this.id; - this.cms.updateCmsContent(this.validateForm.value , data => { - if (data['return_code'] === '000000') { - this.isVisible = false; - this.getRequest(false, this.searchForm.value); - this.message.success('修改成功'); - } else { - this.message.create('error', '修改失败'); - } - }); - } else { - this.cms.insertCmsContent(this.validateForm.value , data => { - if (data['return_code'] === '000000') { - this.isVisible = false; - this.getRequest(false, this.searchForm.value); - this.message.success('新增成功'); - } else { - this.message.create('error', '修改失败'); + } + + // 附件上传设置 + customReq = (item: UploadXHRArgs) => { + this.patchPath = ''; // 置空路径 + const formData = new FormData(); + formData.append('requestFile', item.file as any); + formData.append('uploadType', 'cmsPatch'); + console.log(item); + const req = new HttpRequest('POST', item.action!, formData, { + reportProgress: true, + }); + console.log(req); + return this.http.request(req).subscribe( + (event: HttpEvent) => { + console.log(event); + if (event.type === HttpEventType.UploadProgress) { + if (event.total! > 0) { + (event as any).percent = (event.loaded / event.total!) * 100; + } + item.onProgress!(event, item.file!); + } else if (event instanceof HttpResponse) { + item.onSuccess!(event.body, item.file!, event); + if (event.body.return_code === '000000') { + this.patchPath = event.body.return_data[item.file.name]; + this.suffix = this.patchPath.split('.')[this.patchPath.split('.').length - 1]; + } } - }); - } + }, + err => { + item.onError!(err, item.file!); + } + ); } - // 图片查看 - handlePreview = async (file: NzUploadFile) => { - if (!file.url && !file.preview) { - // tslint:disable-next-line:no-non-null-assertion - file.preview = await getBase64(file.originFileObj!); + /** 清空 **/ + emptyForm(e: MouseEvent): void { + e.preventDefault(); + this.annexForm.reset(); + for (const key in this.annexForm.controls) { + this.annexForm.controls[key].markAsPristine(); + this.annexForm.controls[key].updateValueAndValidity(); } - this.previewImage = file.url || file.preview; - this.previewVisible = true; } - showDeleteConfirmDelete(id: number): void { - this.common.showConfirm('是否确定删除!' , dataR => { - if (dataR) { - this.cms.deleteById(id, data => { - if (data['return_code'] === '000000') { - this.getRequest(true, this.searchForm.value); - this.message.success(data['return_data']); - } else { - this.message.error(data['return_msg']); - } - }); + // 附件弹窗确定添加按钮 + handlePatchOk(value: any): void { + // 校验类型选择与必填 + if (value.patchName == null || value.patchName == '') { + this.message.create('error', `请填写附件名称!`); + return; + } + if (value.sort == null || value.sort == '') { + this.message.create('error', `请填写附件排序,越小越靠前!`); + return; + } + if (value.patchType == '1') { + if (this.imageSuffix.indexOf(this.suffix) == -1) { + this.message.create('error', `请上传图片类型的附件!`); + return; + } + } else if (value.patchType == '2') { + if (this.audioSuffix.indexOf(this.suffix) == -1) { + this.message.create('error', `请上传音频类型的附件!`); + return; + } + } else if (value.patchType == '3') { + if (this.videoSuffix.indexOf(this.suffix) == -1) { + this.message.create('error', `请上传视频类型的附件!`); + return; + } + } else if (value.patchType == '4') { + if (this.applicationSuffix.indexOf(this.suffix) == -1) { + this.message.create('error', `请上传文档类型的附件!`); + return; + } + } else if (value.patchType == '5') { + } else { + this.message.create('error', `请选择附件类型!`); + return; + } + if (this.patchPath == null || this.patchPath == '') { + this.message.create('error', `请上传附件!`); + return; + } + // 定义附件数据 + const params = { + 'contentId': this.contentSelect, + 'patchName': value.patchName, + 'patchDesc': value.patchDesc, + 'patchType': value.patchType, + 'patchPath': this.patchPath, + 'source': 1, + 'sort': value.sort, + 'suffixName': this.suffix, + 'addTime': new Date() + }; + /** 确定等待 **/ + this.http.post(this.WEB_SERVE_URL + '/cmsPatch/addPatch', params).subscribe(data => { + if (data['return_code'] === '000000') { + this.isVisible = false; + this.isOkLoading = false; + this.fileList = []; + this.patchTypeCheck = '0'; + this.findPatchByContent(this.contentSelect); + this.message.create('success', `新增成功!`); + } else { + this.message.create('warning', data['return_msg']); } + }, error => { + this.message.create('error', `未知错误!`); }); } + // 弹出发布附件 + addPush(id, categoryId) { + this.findModuleByCategory(categoryId); + this.pushId = id; + // document.getElementById('resetPush').click(); + this.isPublish = true; + } + // 取消发布 + handleCancelPush(): void { + this.isPublish = false; + this.moduleId = ''; + this.pushId = ''; + /** 隐藏弹框 **/ + } - public getForbiddenUser(id, status: any): void { - const message = (status === 2 ? '是否下架当前内容' : '是否上架当前内容'); - const s = status === 2 ? 1 : 2; - this.common.showConfirm(message, data => { - if (data) { - this.cms.updateContentStatus(id, s , dataUser => { - if (dataUser['return_code'] === '000000') { - this.message.success(dataUser['return_data']); - } else { - this.message.error(dataUser['return_msg']); - } - this.getRequest(false , this.searchForm.value); - }); + // 附件弹窗确定添加按钮 + handlePushOk(value: any): void { + console.log('发布'); + console.log(this.pushId); + console.log(this.moduleId); + console.log(value.moduleId); + if (this.pushId == null || this.pushId == '') { + this.message.create('error', '请重新选择发布的内容!'); + return; + } + if (this.moduleId == null || this.moduleId == undefined) { + this.moduleId = ''; + } + + // 定义附件数据 + const params = { + 'id': this.pushId, + 'status': 2, + 'moduleId': this.moduleId + }; + /** 确定等待 **/ + this.http.post(this.WEB_SERVE_URL + '/cmsContent/updateStatusOfContent', params).subscribe(data => { + if (data['return_code'] === '000000') { + this.isPublish = false; + this.isPushOkLoading = false; + this.moduleId = ''; + this.pushId = ''; + this.getRequest(); + this.message.create('success', `发布成功!`); + } else { + this.message.create('warning', data['return_msg']); } + }, error => { + this.message.create('error', `未知错误!`); }); } + /** 清空模板 **/ + emptyPushForm(e: MouseEvent): void { + e.preventDefault(); + this.pushForm.reset(); + for (const key in this.pushForm.controls) { + this.pushForm.controls[key].markAsPristine(); + this.pushForm.controls[key].updateValueAndValidity(); + } + } + + // 根据内容分类查询可使用的模板列表 + findModuleByCategory(categoryId) { + this.http.get(this.WEB_SERVE_URL + '/cmsCategoryModule/getModuleByCategoryId?categoryId=' + categoryId).subscribe(data => { + if (data['return_code'] === '000000') { + this.selectModule = data['return_data']; + console.log(this.selectModule); + } else { + this.message.create('error', data['return_msg']); + } + }); + } + + showDown(id): void { + this.modalService.confirm({ + nzTitle: '是否确定下线', + nzOkText: '是', + nzOnOk: () => this.DownContent(id), + nzCancelText: '否', + }); + } + + // 下线 + DownContent(id) { + // 定义附件数据 + const params = { + 'id': id, + 'status': 1 + }; + /** 确定等待 **/ + this.http.post(this.WEB_SERVE_URL + '/cmsContent/updateStatusOfContent', params).subscribe(data => { + if (data['return_code'] === '000000') { + this.getRequest(); + this.message.create('success', `下线成功!`); + } else { + this.message.create('warning', data['return_msg']); + } + }, error => { + this.message.create('error', `未知错误!`); + }); + } } 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 ba87b74..e163ad0 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 @@ -77,7 +77,7 @@ {{i + 1}} {{data.productName}} - {{data.productType | productType : data.productId}} + {{data.discount == null ? '暂未配置' : data.discount + "%"}} {{data.integralDiscount == null ? '0' : data.integralDiscount + "%"}} {{data.productPayTypeString.substring(0 , data.productPayTypeString.length - 1)}} diff --git a/src/app/app-common.module.ts b/src/app/app-common.module.ts index 22a6456..b1b7043 100644 --- a/src/app/app-common.module.ts +++ b/src/app/app-common.module.ts @@ -59,7 +59,6 @@ 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, @@ -113,7 +112,6 @@ const PIPES = [ IntegralTypePipe, IntegralProductPipe, MsgTypePipe, - ProductTypePipe, ]; diff --git a/src/app/pipes/index.ts b/src/app/pipes/index.ts index b648dac..5956d41 100644 --- a/src/app/pipes/index.ts +++ b/src/app/pipes/index.ts @@ -41,4 +41,3 @@ 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';