关键词前台展示、文案修改

This commit is contained in:
黄心宇 2024-06-28 11:05:25 +08:00
parent 51024e2e05
commit 201841d618
3 changed files with 25 additions and 5 deletions

View File

@ -161,11 +161,11 @@ function NewsCreate(props){
</Select>
)}
</Form.Item>
<Form.Item label="关键词">
<Form.Item label="文章标签">
{getFieldDecorator("keywords", {
rules:[{type: 'string', max: 30, message: "请精简关键词最大长度30"}],
rules:[{type: 'string', max: 30, message: "请精简文章标签最大长度30"}],
})(
<Input placeholder="请输入关键词,使用逗号分隔" maxLength={ 30 } width="220px"/>
<Input placeholder="请输入关键词作为文章标签,使用逗号分隔" maxLength={ 30 } width="220px"/>
)}
</Form.Item>
<Form.Item label="内容" wrapperCol={{span: 21}}>

View File

@ -132,8 +132,10 @@ function NewsDetail(props){
</div>
{ !isPhone() && <Divider dashed={true} /> }
{
content ?
<RenderHtml className="informations_detail imageLayerParent" value={content} url={props.history.location} />
content ? <>
{ detail.keywords && <p className='keywords'>文章标签<span className='ml8'>{ detail.keywords }</span></p>}
<RenderHtml className="informations_detail imageLayerParent" value={content} url={props.history.location} />
</>
:
<span>暂无详情~</span>
}

View File

@ -487,6 +487,15 @@
background-image:linear-gradient(180deg,#f8f9fd 0%,#f8f9fd 100%);
border:1px solid #ffffff;
box-sizing: border-box;
.keywords {
color: #232b3f;
font-size: 14px;
line-height: 28px;
padding-bottom: 10px;
span {
color:#466aff;
}
}
}
.info_text_main{
margin-bottom: 2em;
@ -553,6 +562,15 @@
background-color: #fff;
border-radius: 4px;
padding:30px 35px 50px;
.keywords {
color: #232b3f;
font-size: 14px;
line-height: 28px;
padding-bottom: 10px;
span {
color:#466aff;
}
}
.info_text_main{
.i_name{
color:#1f2329;