|
@@ -142,7 +142,9 @@ const Manage=React.createClass({
|
|
};
|
|
};
|
|
this.setState({
|
|
this.setState({
|
|
RowData: theObj,
|
|
RowData: theObj,
|
|
- callnubs:theObj.type.toString(),
|
|
|
|
|
|
+ topNumber:data.data.topNumber,
|
|
|
|
+ hotspot:data.data.hotspot,
|
|
|
|
+ callnubs:theObj.type.toString()
|
|
});
|
|
});
|
|
}.bind(this),
|
|
}.bind(this),
|
|
}).always(function () {
|
|
}).always(function () {
|
|
@@ -280,6 +282,14 @@ const Manage=React.createClass({
|
|
message.warning('必须填写一个作者!');
|
|
message.warning('必须填写一个作者!');
|
|
return;
|
|
return;
|
|
};
|
|
};
|
|
|
|
+// if(this.state.topNumber){
|
|
|
|
+// let topStr = this.state.topNumber.toString();
|
|
|
|
+// let stateReg = topStr.match(/^[0-9]*$/g);
|
|
|
|
+// if(!stateReg){
|
|
|
|
+// message.warning('置顶请输入数字!')
|
|
|
|
+// return false
|
|
|
|
+// };
|
|
|
|
+// }
|
|
this.setState({
|
|
this.setState({
|
|
loading: true
|
|
loading: true
|
|
});
|
|
});
|
|
@@ -303,6 +313,8 @@ const Manage=React.createClass({
|
|
content: this.state.RowData.content,
|
|
content: this.state.RowData.content,
|
|
createTimeFormattedDate: this.state.RowData.createTimeFormattedDate,
|
|
createTimeFormattedDate: this.state.RowData.createTimeFormattedDate,
|
|
provinceId: this.state.RowData.provinceId,
|
|
provinceId: this.state.RowData.provinceId,
|
|
|
|
+ topNumber:this.state.topNumber,
|
|
|
|
+ hotspot :this.state.hotspot
|
|
},
|
|
},
|
|
success: function (data) {
|
|
success: function (data) {
|
|
if (data.error && data.error.length) {
|
|
if (data.error && data.error.length) {
|
|
@@ -461,7 +473,7 @@ const Manage=React.createClass({
|
|
<div className="admin-content" >
|
|
<div className="admin-content" >
|
|
<div className="admin-content-search">
|
|
<div className="admin-content-search">
|
|
<Button type="primary" style={{ float: 'right' }}
|
|
<Button type="primary" style={{ float: 'right' }}
|
|
- onClick={() => { this.setState({ RowData: {}, visible: true }) }}>
|
|
|
|
|
|
+ onClick={() => { this.setState({ RowData: {}, visible: true ,topNumber :'',hotspot :1}) }}>
|
|
添加<Icon type="plus" />
|
|
添加<Icon type="plus" />
|
|
</Button>
|
|
</Button>
|
|
<Input placeholder="标题" style={{ width: 200 ,marginBottom:'10px',marginRight:'10px'}}
|
|
<Input placeholder="标题" style={{ width: 200 ,marginBottom:'10px',marginRight:'10px'}}
|
|
@@ -631,9 +643,9 @@ const Manage=React.createClass({
|
|
</div>
|
|
</div>
|
|
<div className="modal-box">
|
|
<div className="modal-box">
|
|
<span className="modal-box-title">选择省份</span>
|
|
<span className="modal-box-title">选择省份</span>
|
|
- <select value={this.state.RowData.provinceId} onChange={(e) => {
|
|
|
|
|
|
+ <Select value={this.state.RowData.provinceId} onChange={(e) => {
|
|
this.state.RowData.provinceId = e.target.value;
|
|
this.state.RowData.provinceId = e.target.value;
|
|
- this.setState({RowData: this.state.RowData});
|
|
|
|
|
|
+ this.setState({RowData: this.state.RowData});
|
|
}} className="provin">
|
|
}} className="provin">
|
|
{
|
|
{
|
|
this.state.list.map(function(name){
|
|
this.state.list.map(function(name){
|
|
@@ -643,8 +655,31 @@ const Manage=React.createClass({
|
|
})
|
|
})
|
|
}
|
|
}
|
|
|
|
|
|
- </select>
|
|
|
|
|
|
+ </Select>
|
|
</div>
|
|
</div>
|
|
|
|
+ {/* <div className="clearfix">
|
|
|
|
+ <div className="modal-box news-box">
|
|
|
|
+ <span className="modal-box-title">置顶序号:</span>
|
|
|
|
+ <div className="modal-box-detail">
|
|
|
|
+ <Input value={this.state.topNumber } placeholder="请输入数字"
|
|
|
|
+ onChange={(e) => {
|
|
|
|
+ this.setState({ topNumber:e.target.value});
|
|
|
|
+ }} />
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ <div className="modal-box news-box">
|
|
|
|
+ <span className="modal-box-title">热门:</span>
|
|
|
|
+ <div className="modal-box-detail">
|
|
|
|
+ <Radio.Group value={this.state.hotspot} onChange={(e) => {
|
|
|
|
+ this.setState({ hotspot : e.target.value });
|
|
|
|
+ }} >
|
|
|
|
+ <Radio value={1}>否</Radio>
|
|
|
|
+ <Radio value={0}>是</Radio>
|
|
|
|
+ </Radio.Group>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ */}
|
|
<Editors textContent={this.state.RowData.content}
|
|
<Editors textContent={this.state.RowData.content}
|
|
uploadUrl={'/api/admin/news/upload'}
|
|
uploadUrl={'/api/admin/news/upload'}
|
|
uploadSign={'news_content_picture'}
|
|
uploadSign={'news_content_picture'}
|