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;
};
export const ConversationBindFormModal = ({ mobile, currentConversationID, onBoundSuccess }) => {
export const ConversationBindFormModal = ({ mobile, currentConversationID, userId, onBoundSuccess }) => {
const [open, setOpen] = useState(false);
const [loading, setLoading] = useState(false); // bind loading
@ -40,7 +40,7 @@ export const ConversationBindFormModal = ({ mobile, currentConversationID, onBou
});
return false;
}
values.opisn = 404;
values.opisn = userId;
setLoading(false);
setSearchLoading(true);
setSearchResult([]);

@ -222,7 +222,7 @@ const CustomerProfile = () => {
} else {
return (
<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>
);
}

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

Loading…
Cancel
Save