fix: 顾问无法绑定会话和订单;登陆后替换路由

hotfix/new-conversation
Jimmy Liow 1 year ago
parent aab88427e9
commit b79db4e269

@ -17,7 +17,7 @@ const fetchBindOrder = async (params) => {
// return errcode !== 0 ? {} : result; // return errcode !== 0 ? {} : result;
}; };
export const ConversationBindFormModal = ({ mobile, currentConversationID, onBoundSuccess }) => { export const ConversationBindFormModal = ({ mobile, currentConversationID, userId, onBoundSuccess }) => {
const [open, setOpen] = useState(false); const [open, setOpen] = useState(false);
const [loading, setLoading] = useState(false); // bind loading const [loading, setLoading] = useState(false); // bind loading
@ -40,7 +40,7 @@ export const ConversationBindFormModal = ({ mobile, currentConversationID, onBou
}); });
return false; return false;
} }
values.opisn = 404; values.opisn = userId;
setLoading(false); setLoading(false);
setSearchLoading(true); setSearchLoading(true);
setSearchResult([]); setSearchResult([]);

@ -222,7 +222,7 @@ const CustomerProfile = () => {
} else { } else {
return ( return (
<Empty description={<span>暂无相关订单</span>}> <Empty description={<span>暂无相关订单</span>}>
<ConversationBind currentConversationID={currentConversationID} onBoundSuccess={coli_sn => updateCurrentConversation({ coli_sn })} /> <ConversationBind currentConversationID={currentConversationID} userId={loginUser.userId} onBoundSuccess={coli_sn => updateCurrentConversation({ coli_sn })} />
</Empty> </Empty>
); );
} }

@ -48,9 +48,9 @@ function Callback() {
navigate(originUrl) navigate(originUrl)
} else { } else {
if (isMobileApp) { if (isMobileApp) {
navigate('/m/conversation') navigate('/m/conversation', { replace: true })
} else { } else {
navigate('/') navigate('/', { replace: true })
} }
} }
} else if (loginStatus === 403) { } else if (loginStatus === 403) {

Loading…
Cancel
Save