Commit dae8f140 authored by 崔佳豪's avatar 崔佳豪

fix: 修复消息混用1.0报错处理

parent 588ab34e
Pipeline #53752 passed with stages
......@@ -110,9 +110,9 @@
"@wisdom-map/arcgismap": "1.4.0-6",
"@wisdom-map/basemap": "1.1.0-2",
"@wisdom-map/util": "^1.0.27-0",
"@wisdom-utils/components": "0.1.243",
"@wisdom-utils/components": "0.1.244",
"@wisdom-utils/runtime": "0.0.32",
"@wisdom-utils/utils": "0.1.283",
"@wisdom-utils/utils": "0.1.284",
"animate.css": "^4.1.1",
"antd": "^4.20.7",
"compression": "1.7.4",
......
......@@ -77,11 +77,10 @@ const CheckAllMessage = props => {
noticeService
.getAllInformationInfo(obj)
.then(res => {
console.log(res, 'res');
if (res.code === 0) {
pageIndex.current++;
total.current = res.data.totalCount;
res.data.list && setData([...data, ...res.data.list]);
res.data.list && setData([...data, ...deaflData(res.data.list)]);
setIsRes(true);
setLoading(false);
}
......@@ -91,17 +90,28 @@ const CheckAllMessage = props => {
setLoading(false);
})
};
const deaflData = (data = []) => {
return data.map(item => {
let content = '';
try {
content = JSON.parse(item.infoContent)
content = item.infoContent;
} catch (error) {
content = '{}';
}
return { ...item, infoContent: content}
})
}
// 获取数据
const getData = (obj) => {
noticeService
.getAllInformationInfo(obj)
.then(res => {
console.log(res, 'res');
if (res.code === 0) {
pageIndex.current++;
total.current = res.data.totalCount;
res.data.list && setData(res.data.list);
res.data.list && setData(deaflData(res.data.list));
setLoading(false);
}
})
......
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