评价不得为空
This commit is contained in:
@ -488,6 +488,9 @@ const str_substr = (start, end, str)=> {
|
|||||||
// const conversationId = '1506204072738394114'
|
// const conversationId = '1506204072738394114'
|
||||||
if(conversationId=='' || conversationId==undefined){
|
if(conversationId=='' || conversationId==undefined){
|
||||||
message.warn('您还没有发起咨询,无需评价')
|
message.warn('您还没有发起咨询,无需评价')
|
||||||
|
}else{
|
||||||
|
if(score==0){
|
||||||
|
message.warn('请您评价本次服务,满意请给我们五星好评,谢谢')
|
||||||
}else{
|
}else{
|
||||||
API.estimate({id: conversationId, remarkScore: score*2, remarkTime: moment(new Date()).format('yyyy-MM-DD HH:mm:ss')}).then(res=>{
|
API.estimate({id: conversationId, remarkScore: score*2, remarkTime: moment(new Date()).format('yyyy-MM-DD HH:mm:ss')}).then(res=>{
|
||||||
if (res && res.success) {
|
if (res && res.success) {
|
||||||
@ -498,6 +501,7 @@ const str_substr = (start, end, str)=> {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
useEffect(()=>{
|
useEffect(()=>{
|
||||||
if(isModalVisible){
|
if(isModalVisible){
|
||||||
resetText()
|
resetText()
|
||||||
|
@ -12,7 +12,7 @@ export default function RatePopover(props) {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Tooltip title="点击评价"><div onClick={()=>setRateModal(true)} className={style.customer_service_content}/></Tooltip>
|
<Tooltip title="点击评价"><div onClick={()=>{ setScore(0); setRateModal(true)}} className={style.customer_service_content}/></Tooltip>
|
||||||
{rateModal &&
|
{rateModal &&
|
||||||
<Modal title="请您对本次服务做出评价,谢谢!" visible={rateModal} onCancel={()=>{
|
<Modal title="请您对本次服务做出评价,谢谢!" visible={rateModal} onCancel={()=>{
|
||||||
setRateModal(false)
|
setRateModal(false)
|
||||||
|
Reference in New Issue
Block a user