Commit d61e98b9 authored by 李腾's avatar 李腾

feat: 修复sort key 报错

parent dac974fc
...@@ -30,8 +30,8 @@ const MessageItem = props => { ...@@ -30,8 +30,8 @@ const MessageItem = props => {
console.error('消息数据格式错误'); console.error('消息数据格式错误');
} }
const goodList = message.items.map(good => ( const goodList = message.items.map((good, index) => (
<div className={styles.good}> <div className={styles.good} key={String(index)}>
<span className={styles.good__name}>{good.skuName}</span> <span className={styles.good__name}>{good.skuName}</span>
<span className={styles.good__count}>x{good.quantity}</span> <span className={styles.good__count}>x{good.quantity}</span>
</div> </div>
...@@ -174,7 +174,6 @@ const Complex = props => { ...@@ -174,7 +174,6 @@ const Complex = props => {
*/ */
const viewDetail = message => { const viewDetail = message => {
const { orderNo, type } = message; const { orderNo, type } = message;
console.log(type);
if ([1, 2].includes(type)) { if ([1, 2].includes(type)) {
history.push({ history.push({
...@@ -268,23 +267,13 @@ const Complex = props => { ...@@ -268,23 +267,13 @@ const Complex = props => {
); );
}; };
const FilterRender = filterProps => { const FilterRender = filterProps => (
console.log(filterProps);
return (
<div className={styles['filter-box']}> <div className={styles['filter-box']}>
<div className={styles['filter-box__content']}> <div className={styles['filter-box__content']}>
<Checkbox <Checkbox checked={queryParams.readStatus === '0'} value="0" onChange={onReadStatusChange}>
checked={queryParams.readStatus === '0'}
value="0"
onChange={onReadStatusChange}
>
未读 未读
</Checkbox> </Checkbox>
<Checkbox <Checkbox checked={queryParams.readStatus === '1'} value="1" onChange={onReadStatusChange}>
checked={queryParams.readStatus === '1'}
value="1"
onChange={onReadStatusChange}
>
已读 已读
</Checkbox> </Checkbox>
</div> </div>
...@@ -293,7 +282,6 @@ const Complex = props => { ...@@ -293,7 +282,6 @@ const Complex = props => {
</div> </div>
</div> </div>
); );
};
return ( return (
<Modal {...modalProps}> <Modal {...modalProps}>
...@@ -316,8 +304,13 @@ const Complex = props => { ...@@ -316,8 +304,13 @@ const Complex = props => {
<FilterRender /> <FilterRender />
<div className={styles['complex-list']}> <div className={styles['complex-list']}>
{visible && messageData.length ? ( {visible && messageData.length ? (
messageData.map(item => ( messageData.map((item, index) => (
<MessageItem key={item.id} item={item} onMark={onMark} viewDetail={viewDetail} /> <MessageItem
key={String(index)}
item={item}
onMark={onMark}
viewDetail={viewDetail}
/>
)) ))
) : ( ) : (
<Empty text="暂无数据" /> <Empty text="暂无数据" />
......
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