Commit d68c0202 authored by XieZhiXiong's avatar XieZhiXiong

feat: 展示售后评价内容

parent 4c2f499f
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2020-11-05 18:02:18
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-02-09 15:19:39
* @LastEditTime: 2021-02-20 14:13:26
* @Description: 退款明细
*/
import React, { useState } from 'react';
......
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2020-11-03 14:12:34
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-11-18 15:48:12
* @LastEditTime: 2021-02-20 14:28:19
* @Description: 评价
*/
import React from 'react';
......@@ -29,11 +29,19 @@ const TITLE_MAP = {
};
interface ScoreProps {
/**
* 分数
*/
score: number;
/**
* 内容
*/
content: string;
};
const Score: React.FC<ScoreProps> = ({
score = 0,
content,
}) => {
return (
<MellowCard
......@@ -48,6 +56,9 @@ const Score: React.FC<ScoreProps> = ({
formatContent={(val) => `${TITLE_MAP[score]}`}
color={COLOR_MAP[score]}
/>
<p style={{ color: '#909399' }}>
售后评价: {content}
</p>
</MellowCard>
);
};
......
......@@ -455,7 +455,7 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
<Col span={6}>
{/* 售后评价 */}
<Suspense fallback={null}>
<Score score={detailInfo?.evaluate?.level} />
<Score score={detailInfo?.evaluate?.level} content={detailInfo?.evaluate?.content} />
</Suspense>
</Col>
)}
......
......@@ -509,7 +509,7 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
<Col span={6}>
{/* 售后评价 */}
<Suspense fallback={null}>
<Score score={detailInfo?.evaluate?.level} />
<Score score={detailInfo?.evaluate?.level} content={detailInfo?.evaluate?.content} />
</Suspense>
</Col>
)}
......
......@@ -276,8 +276,9 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
{isFinished && (
<Col span={6}>
{/* 售后评价 */}
<Suspense fallback={null}>
<Score score={detailInfo?.evaluate?.level} />
<Score score={detailInfo?.evaluate?.level} content={detailInfo?.evaluate?.content} />
</Suspense>
</Col>
)}
......
......@@ -287,8 +287,9 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
{isFinished && (
<Col span={6}>
{/* 售后评价 */}
<Suspense fallback={null}>
<Score score={detailInfo?.evaluate?.level} />
<Score score={detailInfo?.evaluate?.level} content={detailInfo?.evaluate?.content} />
</Suspense>
</Col>
)}
......
......@@ -483,7 +483,7 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
<Col span={6}>
{/* 售后评价 */}
<Suspense fallback={null}>
<Score score={detailInfo?.evaluate?.level} />
<Score score={detailInfo?.evaluate?.level} content={detailInfo?.evaluate?.content} />
</Suspense>
</Col>
)}
......
......@@ -521,7 +521,7 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
<Col span={6}>
{/* 售后评价 */}
<Suspense fallback={null}>
<Score score={detailInfo?.evaluate?.level} />
<Score score={detailInfo?.evaluate?.level} content={detailInfo?.evaluate?.content} />
</Suspense>
</Col>
)}
......
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