Skip to content

Commit 81c2eb4

Browse files
author
wangshuwen
committed
chore:修改readme中异步方法示例
1 parent 0ed6ca7 commit 81c2eb4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,10 @@ public class HomeMethod implements IMethod {
8787
}
8888
//异步方法,必须包含RouteCallback参数
8989
@XMethod(name = "getAsyncBookName")
90-
public static void getAsyncBookName(@XParam(name = "book") Book book, RouteCallback callback) {
90+
public static void getAsyncBookName(@XParam(name = "book") Book book) {
9191
HashMap<String, Object> map = new HashMap<>();
9292
map.put("book", book);
93-
callback.onResult(map);
93+
XRouter.getInstance().invokeCallback(requestId, map);
9494
}
9595
}
9696
```

0 commit comments

Comments
 (0)