diff --git a/src/pages/customerservice/support/conversation/components/ChatInput/ChatInput.jsx b/src/pages/customerservice/support/conversation/components/ChatInput/ChatInput.jsx index 83bde57..762f022 100644 --- a/src/pages/customerservice/support/conversation/components/ChatInput/ChatInput.jsx +++ b/src/pages/customerservice/support/conversation/components/ChatInput/ChatInput.jsx @@ -43,7 +43,7 @@ const ChatInput = ((props) => { const [loading, setLoading] = useState(false) const [uploadFile, setUploadFile] = useState({}) const [isSendFile, setIsSendFile] = useState(false) //发送文件之前确认 - + const location = useLocation() //imgInputSize:输入框图片尺寸 @@ -489,13 +489,17 @@ const str_substr = (start, end, str)=> { if(conversationId=='' || conversationId==undefined){ message.warn('您还没有发起咨询,无需评价') }else{ - API.estimate({id: conversationId, remarkScore: score*2, remarkTime: moment(new Date()).format('yyyy-MM-DD HH:mm:ss')}).then(res=>{ - if (res && res.success) { - message.success('感谢您的评价!') - }else{ - message.warn(res && res.message) - } - }) + if(score==0){ + message.warn('请您评价本次服务,满意请给我们五星好评,谢谢') + }else{ + API.estimate({id: conversationId, remarkScore: score*2, remarkTime: moment(new Date()).format('yyyy-MM-DD HH:mm:ss')}).then(res=>{ + if (res && res.success) { + message.success('感谢您的评价!') + }else{ + message.warn(res && res.message) + } + }) + } } } useEffect(()=>{ @@ -532,7 +536,7 @@ const str_substr = (start, end, str)=> { } }} > - +
{e.preventDefault()}} className={style.input_area} diff --git a/src/pages/customerservice/support/conversation/components/RatePopover/RatePopover.jsx b/src/pages/customerservice/support/conversation/components/RatePopover/RatePopover.jsx index bb5dc26..6da2904 100644 --- a/src/pages/customerservice/support/conversation/components/RatePopover/RatePopover.jsx +++ b/src/pages/customerservice/support/conversation/components/RatePopover/RatePopover.jsx @@ -12,7 +12,7 @@ export default function RatePopover(props) { return ( <> -
setRateModal(true)} className={style.customer_service_content}/> +
{ setScore(0); setRateModal(true)}} className={style.customer_service_content}/> {rateModal && { setRateModal(false)