We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
问题描述 前后端实现实时进度条功能
复现步骤 @UniJSMethod(uiThread = false) public void test(String path, final UniJSCallback callback) { //1、解析文件,回填进度20 callback.invokeAndKeepAlive(new JSONObject().put("progress",20)); //2、对解析内容进行业务处理,回填进度50 callback.invokeAndKeepAlive(new JSONObject().put("progress",50)); //3、保存处理结果,回填进度80 callback.invokeAndKeepAlive(new JSONObject().put("progress",50)); //4、进行后置业务处理,回填进度100 callback.invokeAndKeepAlive(new JSONObject().put("progress",100)); }
预期结果 前端能够接收后端持续回填的进度,刷新进度条的展示
实际结果 步骤1-4的处理过程中,前端未收到任何进度回调结果,等到后端接口响应成功时,前端会连续收到1-4的回调信息
系统信息:
补充信息 [可选] [根据你的分析,出现这个问题的原因可能在哪里?]
The text was updated successfully, but these errors were encountered:
@zhetengbiji @fxy060608 你好,麻烦看一下这个issue
Sorry, something went wrong.
No branches or pull requests
问题描述
前后端实现实时进度条功能
复现步骤
@UniJSMethod(uiThread = false)
public void test(String path, final UniJSCallback callback) {
//1、解析文件,回填进度20
callback.invokeAndKeepAlive(new JSONObject().put("progress",20));
//2、对解析内容进行业务处理,回填进度50
callback.invokeAndKeepAlive(new JSONObject().put("progress",50));
//3、保存处理结果,回填进度80
callback.invokeAndKeepAlive(new JSONObject().put("progress",50));
//4、进行后置业务处理,回填进度100
callback.invokeAndKeepAlive(new JSONObject().put("progress",100));
}
预期结果
前端能够接收后端持续回填的进度,刷新进度条的展示
实际结果
步骤1-4的处理过程中,前端未收到任何进度回调结果,等到后端接口响应成功时,前端会连续收到1-4的回调信息
系统信息:
补充信息
[可选]
[根据你的分析,出现这个问题的原因可能在哪里?]
The text was updated successfully, but these errors were encountered: