提交cms支持链接分类

pull/1/head
袁野 3 years ago
parent 62e2a5e617
commit 2909f989d7
  1. 13
      src/app/admin/cms/cms-content-add/cms-content-add.component.html
  2. 2
      src/app/admin/cms/cms-content-add/cms-content-add.component.ts
  3. 14
      src/app/admin/cms/cms-content-edit/cms-content-edit.component.html
  4. 2
      src/app/admin/cms/cms-content-edit/cms-content-edit.component.ts

@ -42,6 +42,19 @@
</nz-form-control> </nz-form-control>
</nz-form-item> </nz-form-item>
<!--跳转链接-->
<nz-form-item nzFlex>
<nz-form-label>
<span>跳转类型</span>
</nz-form-label>
<nz-form-control [nzSm]="14" [nzXs]="24">
<nz-select nzShowSearch nzAllowClear nzPlaceHolder="请选择跳转类型" formControlName="jumpType">
<nz-option nzLabel="外链" nzValue="1"></nz-option>
<nz-option nzLabel="内链" nzValue="2"></nz-option>
</nz-select>
</nz-form-control>
</nz-form-item>
<!--跳转链接--> <!--跳转链接-->
<nz-form-item nzFlex> <nz-form-item nzFlex>
<nz-form-label> <nz-form-label>

@ -147,6 +147,7 @@ export class CmsContentAddComponent implements OnInit {
description: [null, [Validators.required]], description: [null, [Validators.required]],
sortId: [null, [Validators.required]], sortId: [null, [Validators.required]],
content: [null], content: [null],
jumpType: [null],
ext1: [null], ext1: [null],
tag: [null], tag: [null],
}); });
@ -393,6 +394,7 @@ export class CmsContentAddComponent implements OnInit {
'tag' : value.tag, 'tag' : value.tag,
'jumpUrl' : value.jumpUrl, 'jumpUrl' : value.jumpUrl,
'ext1' : value.ext1, 'ext1' : value.ext1,
'jumpType' : value.jumpType,
'hasPatch': this.hasPatch, 'hasPatch': this.hasPatch,
'imgSource': 1, 'imgSource': 1,
'status': 1, 'status': 1,

@ -41,6 +41,20 @@
</nz-form-control> </nz-form-control>
</nz-form-item> </nz-form-item>
<!--跳转链接-->
<nz-form-item nzFlex>
<nz-form-label>
<span>跳转类型</span>
</nz-form-label>
<nz-form-control [nzSm]="14" [nzXs]="24">
<nz-select nzShowSearch nzAllowClear nzPlaceHolder="请选择跳转类型" [(ngModel)]="cmsContentView.jumpType" formControlName="jumpType">
<nz-option nzLabel="外链" nzValue="1"></nz-option>
<nz-option nzLabel="内链" nzValue="2"></nz-option>
</nz-select>
</nz-form-control>
</nz-form-item>
<!--跳转链接--> <!--跳转链接-->
<nz-form-item nzFlex> <nz-form-item nzFlex>
<nz-form-label> <nz-form-label>

@ -48,6 +48,7 @@ export class CmsContentEditComponent implements OnInit {
recommend: [null], recommend: [null],
description: [null, [Validators.required]], description: [null, [Validators.required]],
ext1: [null], ext1: [null],
jumpType: [null],
sortId: [null, [Validators.required]], sortId: [null, [Validators.required]],
content: [null], content: [null],
tag: [null], tag: [null],
@ -73,6 +74,7 @@ export class CmsContentEditComponent implements OnInit {
findContentView(id) { findContentView(id) {
this.http.get(this.WEB_SERVE_URL + '/cmsContent/getContentById?id=' + id).subscribe(data => { this.http.get(this.WEB_SERVE_URL + '/cmsContent/getContentById?id=' + id).subscribe(data => {
if (data['return_code'] === '000000') { if (data['return_code'] === '000000') {
data['return_data'].jumpType = String(data['return_data'].jumpType);
this.cmsContentView = data['return_data']; this.cmsContentView = data['return_data'];
this.listImg = data['return_data'].imgData; this.listImg = data['return_data'].imgData;
} else { } else {

Loading…
Cancel
Save