|
@@ -41,10 +41,14 @@ public class UserController {
|
|
|
@GetMapping("/share/game")
|
|
|
@ApiResponses(value = {@ApiResponse(code = 200, message = "成功", response = GameShareVO.class)})
|
|
|
public ResultVO<GameShareVO> shareGame(UserData userData) {
|
|
|
+ String path = "pages/index/index";
|
|
|
+ if (userData.getUserId() != null) {
|
|
|
+ path = path + "?shareUserId=" + userData.getUserId();
|
|
|
+ }
|
|
|
GameShareVO shareVO = GameShareVO.builder()
|
|
|
.title("这是一个测试分享标题")
|
|
|
.shareImg("https://book.zanxiangnet.com/qc-tip/1.jpg")
|
|
|
- .path("pages/index/index")
|
|
|
+ .path(path)
|
|
|
.build();
|
|
|
return ResultVO.ok(shareVO);
|
|
|
}
|