diff --git a/src/Flows.js b/src/Flows.js index cc12bef8..7971bf0b 100644 --- a/src/Flows.js +++ b/src/Flows.js @@ -17,6 +17,41 @@ const PREVIEW_REPLY_COUNT=10; window.LATEST_POST_ID=parseInt(localStorage['_LATEST_POST_ID'],10)||0; +function load_single_meta(show_sidebar,token) { + return (pid)=>{ + const color_picker=new ColorPicker(); + show_sidebar( + '帖子详情', +
+ 正在加载 #{pid} +
+ ); + Promise.all([ + API.get_single(pid,token), + API.load_replies(pid,token,color_picker), + ]) + .then((res)=>{ + const [single,replies]=res; + show_sidebar( + '帖子详情', + + ) + }) + .catch((e)=>{ + console.trace(e); + show_sidebar( + '帖子详情', +
+ load_single_meta(show_sidebar,token)}>重新加载 +
+ ); + }) + }; +} + function Reply(props) { return (
#{props.info.cid} 
- + ); } @@ -51,97 +86,94 @@ function FlowItem(props) { #{props.info.pid}