|
|
@@ -129,13 +129,22 @@ export default function LinksScreen({ navigation, route }) {
|
|
|
const [appraisalSort, setappraisalSort] = React.useState("ALL");
|
|
|
useRequest(
|
|
|
() => {
|
|
|
- return httpGet(`/appraisal/goods?goodsId=${goodsId}`);
|
|
|
+ return httpGet(`/appraisal/goods?goodsId=${goodsId}`)
|
|
|
+ .then(res => {
|
|
|
+ return Promise.resolve(res);
|
|
|
+ })
|
|
|
+ .catch(e => {
|
|
|
+ return Promise.resolve([]);
|
|
|
+ });
|
|
|
},
|
|
|
{
|
|
|
refreshDeps: [goodsId],
|
|
|
onSuccess: result => {
|
|
|
setcomments(result);
|
|
|
},
|
|
|
+ onError: e => {
|
|
|
+ setcomments([]);
|
|
|
+ },
|
|
|
}
|
|
|
);
|
|
|
|
|
|
@@ -442,7 +451,9 @@ export default function LinksScreen({ navigation, route }) {
|
|
|
</Div>
|
|
|
|
|
|
<Div bg="gray100">
|
|
|
- <Text lineHeight={45} px={15} fontSize='xl'>商品评价</Text>
|
|
|
+ <Text lineHeight={45} px={15} fontSize="xl">
|
|
|
+ 商品评价
|
|
|
+ </Text>
|
|
|
{comments.map(item => {
|
|
|
return <CommentItem info={item} key={item.goodsAppraise} />;
|
|
|
})}
|