Commit 19ebdb02 authored by superman's avatar superman

1.3.4

parent 6b70e98a
This diff is collapsed.
This diff is collapsed.
......@@ -95,6 +95,8 @@
height: 100%;
flex: 1 0 auto;
overflow: hidden;
//background: url(/src/containers/App/images/bg.png) no-repeat bottom right;
background-size:120px 66px;
h1 {
font-size: 18px;
color: #444;
......
......@@ -41,12 +41,24 @@ export default class AddItem extends Component {
}
}
componentWillMount(){
this.props.dispatch({
type: 'CLEAR_MESSAGE_ITEM'
});
}
componentWillReceiveProps(nextProps) {
if (nextProps && nextProps.item && nextProps.item.id) {
this.props.history.replace('/customMessages/' + nextProps.item.id);
}
}
// componentWillUnmount(){
// this.props.dispatch({
// type: 'CLEAR_MESSAGE_ITEM'
// });
// }
handleSubmit(e) {
e.preventDefault();
const data = this.props.form.getFieldsValue();
......
......@@ -27,7 +27,6 @@ export default class Item extends Component {
};
render() {
const {item, loading, dispatch} = this.props;
const styles = require('../Trade/Item.less');
......@@ -35,7 +34,7 @@ export default class Item extends Component {
const vw = 16;
const operation = (
<HeaderOperation history={this.props.history} buttons={[{key:'rollback'}]}/>
<HeaderOperation history={this.props.history} buttons={[{key: 'rollback'}]}/>
);
const header = (
......@@ -57,54 +56,78 @@ export default class Item extends Component {
<Col span={vw}>{item.id}</Col>
</Row>
<Row type="flex" justify="space-around" align="middle">
<Col span={tw}>消息标题</Col>
<Col span={vw}>{item.title}</Col>
</Row>
<Row type="flex" justify="space-around" align="middle">
<Col span={tw}>消息摘要</Col>
<Col span={vw}>{item.abstracts}</Col>
<Col span={tw}>推送渠道</Col>
<Col
span={vw}>{item.channelName}</Col>
</Row>
{
item.channelType !== 1 &&
<Row type="flex" justify="space-around" align="middle">
<Col span={tw}>消息标题</Col>
<Col span={vw}>{item.title}</Col>
</Row>
}
{
item.channelType !== 1 &&
<Row type="flex" justify="space-around" align="middle">
<Col span={tw}>消息摘要</Col>
<Col span={vw}>
<div style={{maxWidth: 600}}>{item.abstracts}</div>
</Col>
</Row>
}
<Row type="flex" justify="space-around" align="middle">
<Col span={tw}>消息正文</Col>
<Col span={vw}>{item.contents}</Col>
</Row>
<Row type="flex" justify="space-around" align="middle">
<Col span={tw}>跳转内容</Col>
<Col span={vw}>
<span>{'类型:'+(item.redirectName||'')}</span>
{
item.redirect &&
<span style={{marginLeft:'1em'}}>{'内容:'+item.redirect}</span>
}
<div style={{maxWidth: 600}}>{item.contents}</div>
</Col>
</Row>
<Row type="flex" justify="space-around" align="middle">
<Col span={tw}>推送渠道</Col>
<Col
span={vw}>{item.channelName}</Col>
</Row>
{
item.channelType !== 1 &&
<Row type="flex" justify="space-around" align="middle">
<Col span={tw}>跳转内容</Col>
<Col span={vw}>
<span>{'类型:' + (item.redirectName || '')}</span>
{
item.redirect &&
<span style={{marginLeft: '1em'}}>{'内容:' + item.redirect}</span>
}
</Col>
</Row>
}
{
item.channelType !== 1 &&
<Row type="flex" justify="space-around" align="middle">
<Col span={tw}>推送人数</Col>
<Col span={vw}>{item.count}</Col>
</Row>
}
{
item.channelType !== 1 &&
<Row type="flex" justify="space-around" align="middle">
<Col span={tw}>推送类型</Col>
<Col span={vw}>{item.sendName}</Col>
</Row>
}
<Row type="flex" justify="space-around" align="middle">
<Col span={tw}>推送时间</Col>
<Col
span={vw}>{item.dateCreated && (item.dateCreated+'').replace(/[年月]/g, '-').replace(/日/g, '')}</Col>
</Row>
<Row type="flex" justify="space-around" align="middle">
<Col span={tw}>推送人数</Col>
<Col span={vw}>{item.count}</Col>
</Row>
<Row type="flex" justify="space-around" align="middle">
<Col span={tw}>推送类型</Col>
<Col span={vw}>{item.sendName}</Col>
span={vw}>{item.dateCreated && (item.dateCreated + '').replace(/[年月]/g, '-').replace(/日/g, '')}</Col>
</Row>
<Row type="flex" justify="space-around" align="middle">
<Col span={tw}>推送对象</Col>
<Col span={vw}>{item.send}</Col>
<Col span={vw}>
<div style={{maxWidth: 600}}>{item.send}</div>
</Col>
</Row>
</div>
<p>
<Button onClick={e=>{e.preventDefault(); this.props.history.goBack();}}
style={{marginLeft:'1em'}}>
<Button onClick={e=> {
e.preventDefault();
this.props.history.goBack();
}}
style={{marginLeft: '1em'}}>
<Icon type="rollback"/>返回
</Button>
</p>
......
......@@ -8,6 +8,12 @@ const Home = ({location}) => {
<div className={styles.home}>
<h1 style={{marginBottom: 50}}>欢迎使用枢纽科技后台</h1>
<h3>2016-08-19 更新 1.3.4</h3>
<p>
1. BUG修复: 订单合同物流单号设置。<br/>
2. BUG修复: 自定义消息推送BUG; 自定义消息详情展示时微信渠道去除多余字段<br/>
</p>
<h3>2016-08-18 更新 1.3.3</h3>
<p>
1. 菜单栏增加"设置"; "管理员"菜单只分配给管理员角色。<br/>
......
......@@ -52,11 +52,11 @@ export default class Contract extends Component {
handleSubmit(e) {
e.preventDefault();
const data = this.props.form.getFieldsValue();
data.id = this.props.trade.id;
data.id = this.props.params.id;
console.log(data);
this.props.dispatch({
type: 'UPDATE_CONTRACT_ITEM',
data
item: data
});
}
......
......@@ -28,7 +28,12 @@ const message = handleActions({
},
['CREATE_MESSAGE_ITEM_FAILED'](state, action){
return {...state, err: action.err, loading: false, item: null}
},
['CLEAR_MESSAGE_ITEM'](state){
console.log('CLEAR_MESSAGE_ITEM');
return {...state, item: null};
}
}, {
items: [],
loading: false,
......
......@@ -79,6 +79,8 @@ export const userStatusToString = status => {
export const tradeStatusToString = status => {
switch (status) {
case 0 :
return '已删除';
case 1 :
return '未报单';
case 10:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment