Skip to content
New issue

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

接口文档 #3

Open
iRuxu opened this issue Mar 4, 2023 · 1 comment
Open

接口文档 #3

iRuxu opened this issue Mar 4, 2023 · 1 comment

Comments

@iRuxu
Copy link
Member

iRuxu commented Mar 4, 2023

该接口在cms系列接口里面,使用$cms

用户获取自己的装扮

url /user/decoration
method GET
query
using:为1时查询正在使用的
val:查询指定主题
desc
其中type是可选项,不提供的时候接口会返回用户所有的装扮。提供的时候只会返回指定type的装扮
response

{
    "code": 0,
    "msg": "Success",
    "data": [
        {
            "val": "0_TESTSAMPLE",
            "type": "sidebar",
            "using": 0,
            "created_at": "2023-01-03T14:54:01.000Z"
        },
        ...
    ]
}

用户设置当前使用装扮

url /user/decoration
method POST
desc
val和type改用post的body传值,val和type都是可选项。val是主题,type是部位,多个部位的时候type用半角,隔开
该接口访问后会直接取消用户所有装扮的使用状态
当提供了val和type的时候,会再设置对应val、type装扮的using为true。
response

// 成功的时候
{
    "code": 0,
    "msg": "Success"
}
// 没有对应装扮的时候
{
    "code": 20006,
    "msg": "你没有这件装扮",
    "data": null
}
@iRuxu
Copy link
Member Author

iRuxu commented Mar 4, 2023

超管赠送装扮给用户

url /user/decoration/give/{user_id}
method POST
desc
其中user_id是必须填的,给予的目标用户
body

name 描述 remark
val 装扮名 -
type 装扮部位 多个部位用逗号分隔

response

// 成功
{
    "code": 0,
    "msg": "Success",
}
// 目标已有装扮
{
    "code": 20007,
    "msg": "Ta已有这件装扮"
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant