四会课小程序领取0512.md 1.49 KB

996.icu

四会课程 小程序领取接口

1. 微信用户登录
  • URL: {{localhost}}/boxfish-online-card/wxUser/userLogin
  • Method: POST
  • RequestBody:
{
  // 登录凭证
  "jsCode": "wx_jsCode",
  // 用户信息
  "nickName": "user_nickName",
  "avatarUrl":"user_avatarUrl"
}
  • ResponseBody:
    // status
    private ResponseStatus status;
    private String message;
    // body
    private String openId;
    private String wxToken;
2. 通过邀请码,建立邀请关系
  • URL: {{localhost}}/boxfish-online-card/wxUser/addRelationship
  • Method: POST
  • RequestBody:
{
    "openId": "user_openId",
    "invitationCode": "invitation_code"
}
  • ResponseBody:
public static class Response {
    // status
    private ResponseStatus status;
    private String message;

    // 分享人信息
    private String sourceOpenId;
    private String sourceNickName;
    private String sourceAvatarUrl;
    // 领取人信息
    private String targetOpenId;
    private String targetNickName;
    private String targetAvatarUrl;

    // 用户当前状态
    private Boolean flagUserHasObtain;  // 是否领取课程
    private Long invitationCode;        // 已经领取,返回当前用户的邀请码
}
3. 微信用户获取全部的教材版本、年级信息
  • URL: {{localhost}}/boxfish-online-card/textbook/version/getTextbookGrade
  • Method: GET
  • RequestBody: