NAV
bash javascript php

Info

Welcome to the generated API reference. Get Postman Collection

Community

互动社区

postList

帖子列表

Example request:

curl -X POST \
    "http://sns.shenruxiang.com/api/v1/community/postList" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"user_id":6,"token":9,"page":18,"cate_id":14}'
const url = new URL(
    "http://sns.shenruxiang.com/api/v1/community/postList"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "user_id": 6,
    "token": 9,
    "page": 18,
    "cate_id": 14
}

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post(
    'http://sns.shenruxiang.com/api/v1/community/postList',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'user_id' => 6,
            'token' => 9,
            'page' => 18,
            'cate_id' => 14,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

{
    "code": 0,
    "msg": "请求成功",
    "data": {
        "current_page": 1,
        "data": [
            {
                "id": 2,
                "title": "帖子标题2",
                "content": "帖子内容",
                "images": [
                    {
                        "src": "http:\/\/daodao.shenruxiang.com\/sns\/post\/cd28b7505f3d539879ea2dda5a9b121d.jpg",
                        "thumb_src": "http:\/\/daodao.shenruxiang.com\/\/sns\/post\/cd28b7505f3d539879ea2dda5a9b121d.jpg?imageView2\/2\/w\/600\/h\/600\/q\/75"
                    },
                    {
                        "src": "http:\/\/daodao.shenruxiang.com\/sns\/post\/d80a95beede76095240e053890b3a086.jpg",
                        "thumb_src": "http:\/\/daodao.shenruxiang.com\/\/sns\/post\/d80a95beede76095240e053890b3a086.jpg?imageView2\/2\/w\/600\/h\/600\/q\/75"
                    }
                ],
                "user_id": 1,
                "praise_num": 1,
                "comment_num": 3,
                "share_num": 0,
                "collect_num": 1,
                "view_num": 5,
                "created_at": "2020-08-01 19:34:33",
                "updated_at": "2020-08-01 12:21:15",
                "status": 1,
                "user": {
                    "id": 1,
                    "nick": "来日方长",
                    "avatar": "http:\/\/daodao.shenruxiang.com\/sns\/post\/cd28b7505f3d539879ea2dda5a9b121d.jpg"
                }
            }
        ],
        "first_page_url": "https:\/\/xlcsxcxapi.boyingzhai.com\/api\/v1\/community\/postList?page=1",
        "from": 1,
        "next_page_url": null,
        "path": "https:\/\/xlcsxcxapi.boyingzhai.com\/api\/v1\/community\/postList",
        "per_page": 10,
        "prev_page_url": null,
        "to": 1
    }
}

HTTP Request

POST api/v1/community/postList

Body Parameters

Parameter Type Status Description
user_id integer required 用户id
token integer required 用户token
page integer optional 页数
cate_id integer optional 分类id

postDetail

帖子详情

Example request:

curl -X POST \
    "http://sns.shenruxiang.com/api/v1/community/postDetail" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"user_id":18,"token":19,"post_id":12}'
const url = new URL(
    "http://sns.shenruxiang.com/api/v1/community/postDetail"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "user_id": 18,
    "token": 19,
    "post_id": 12
}

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post(
    'http://sns.shenruxiang.com/api/v1/community/postDetail',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'user_id' => 18,
            'token' => 19,
            'post_id' => 12,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

{
    "code": 0,
    "msg": "请求成功",
    "data": {
        "id": 1,
        "title": "帖子标题",
        "content": "帖子内容",
        "images": [
            {
                "src": "http:\/\/daodao.shenruxiang.com\/sns\/post\/cd28b7505f3d539879ea2dda5a9b121d.jpg",
                "thumb_src": "http:\/\/daodao.shenruxiang.com\/\/sns\/post\/cd28b7505f3d539879ea2dda5a9b121d.jpg?imageView2\/2\/w\/600\/h\/600\/q\/75"
            },
            {
                "src": "http:\/\/daodao.shenruxiang.com\/sns\/post\/d80a95beede76095240e053890b3a086.jpg",
                "thumb_src": "http:\/\/daodao.shenruxiang.com\/\/sns\/post\/d80a95beede76095240e053890b3a086.jpg?imageView2\/2\/w\/600\/h\/600\/q\/75"
            }
        ],
        "user_id": 1,
        "praise_num": 0,
        "comment_num": 0,
        "share_num": 0,
        "collect_num": 0,
        "view_num": 4,
        "created_at": "2020-08-01 19:34:33",
        "updated_at": "2020-08-01 11:55:29",
        "user": {
            "id": 1,
            "nick": "来日方长",
            "avatar": "http:\/\/daodao.shenruxiang.com\/sns\/post\/cd28b7505f3d539879ea2dda5a9b121d.jpg"
        },
        "post_praise": null
    }
}

HTTP Request

POST api/v1/community/postDetail

Body Parameters

Parameter Type Status Description
user_id integer required 用户id
token integer required 用户token
post_id integer required 帖子id

postCommentList

帖子评论列表

Example request:

curl -X POST \
    "http://sns.shenruxiang.com/api/v1/community/postCommentList" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"user_id":12,"token":19,"post_id":8,"page":4}'
const url = new URL(
    "http://sns.shenruxiang.com/api/v1/community/postCommentList"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "user_id": 12,
    "token": 19,
    "post_id": 8,
    "page": 4
}

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post(
    'http://sns.shenruxiang.com/api/v1/community/postCommentList',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'user_id' => 12,
            'token' => 19,
            'post_id' => 8,
            'page' => 4,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

{
    "code": 0,
    "msg": "请求成功",
    "data": {
        "current_page": 1,
        "data": [
            {
                "id": 67,
                "post_id": 1,
                "user_id": 1,
                "to_user_id": 2,
                "comment_id": 0,
                "content": "帖子评论",
                "praise_num": 0,
                "status": 1,
                "created_at": "2020-08-01 12:03:20",
                "updated_at": "2020-08-01 12:03:20",
                "user": {
                    "id": 1,
                    "nick": "来日方长",
                    "avatar": "http:\/\/daodao.shenruxiang.com\/sns\/post\/cd28b7505f3d539879ea2dda5a9b121d.jpg"
                },
                "to_user": {
                    "id": 2,
                    "nick": "无敌寂寞",
                    "avatar": ""
                },
                "comment_priase": null,
                "reply_list": [
                    {
                        "id": 69,
                        "post_id": 1,
                        "user_id": 1,
                        "to_user_id": 2,
                        "comment_id": 67,
                        "content": "帖子评论回复",
                        "praise_num": 0,
                        "status": 1,
                        "created_at": "2020-08-01 12:08:16",
                        "updated_at": "2020-08-01 12:08:16",
                        "user": {
                            "id": 1,
                            "nick": "来日方长",
                            "avatar": "http:\/\/daodao.shenruxiang.com\/sns\/post\/cd28b7505f3d539879ea2dda5a9b121d.jpg"
                        },
                        "to_user": {
                            "id": 2,
                            "nick": "无敌寂寞",
                            "avatar": ""
                        },
                        "comment_priase": null
                    }
                ]
            }
        ],
        "first_page_url": "http:\/\/www.questionapi.com:8888\/api\/v1\/community\/postCommentList?page=1",
        "from": 1,
        "next_page_url": null,
        "path": "http:\/\/www.questionapi.com:8888\/api\/v1\/community\/postCommentList",
        "per_page": 10,
        "prev_page_url": null,
        "to": 1
    }
}

HTTP Request

POST api/v1/community/postCommentList

Body Parameters

Parameter Type Status Description
user_id integer required 用户id
token integer required 用户token
post_id integer required 帖子id
page integer optional 页数

sendPostComment

发送帖子评论


Requires authentication

Example request:

curl -X POST \
    "http://sns.shenruxiang.com/api/v1/community/sendPostComment" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"user_id":9,"token":4,"post_id":10,"comment_id":1,"comment_content":"aut","to_user_id":17}'
const url = new URL(
    "http://sns.shenruxiang.com/api/v1/community/sendPostComment"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "user_id": 9,
    "token": 4,
    "post_id": 10,
    "comment_id": 1,
    "comment_content": "aut",
    "to_user_id": 17
}

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post(
    'http://sns.shenruxiang.com/api/v1/community/sendPostComment',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'user_id' => 9,
            'token' => 4,
            'post_id' => 10,
            'comment_id' => 1,
            'comment_content' => 'aut',
            'to_user_id' => 17,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

{
    "code": 0,
    "msg": "发送评论成功",
    "data": []
}

HTTP Request

POST api/v1/community/sendPostComment

Body Parameters

Parameter Type Status Description
user_id integer required 用户id
token integer required 用户token
post_id integer required 帖子id
comment_id integer required 帖子评论id
comment_content string required 帖子评论内容
to_user_id integer required 对方用户id

praisePost

帖子点赞


Requires authentication

Example request:

curl -X POST \
    "http://sns.shenruxiang.com/api/v1/community/praisePost" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"user_id":16,"token":12,"post_id":9}'
const url = new URL(
    "http://sns.shenruxiang.com/api/v1/community/praisePost"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "user_id": 16,
    "token": 12,
    "post_id": 9
}

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post(
    'http://sns.shenruxiang.com/api/v1/community/praisePost',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'user_id' => 16,
            'token' => 12,
            'post_id' => 9,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

{
    "code": 0,
    "msg": "帖子点赞成功",
    "data": []
}

HTTP Request

POST api/v1/community/praisePost

Body Parameters

Parameter Type Status Description
user_id integer required 用户id
token integer required 用户token
post_id integer required 帖子id

praisePostComment

帖子评论/回复点赞


Requires authentication

Example request:

curl -X POST \
    "http://sns.shenruxiang.com/api/v1/community/praisePostComment" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"user_id":5,"token":15,"post_id":18,"comment_id":19}'
const url = new URL(
    "http://sns.shenruxiang.com/api/v1/community/praisePostComment"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "user_id": 5,
    "token": 15,
    "post_id": 18,
    "comment_id": 19
}

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post(
    'http://sns.shenruxiang.com/api/v1/community/praisePostComment',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'user_id' => 5,
            'token' => 15,
            'post_id' => 18,
            'comment_id' => 19,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

{
    "code": 0,
    "msg": "评论点赞成功",
    "data": []
}

HTTP Request

POST api/v1/community/praisePostComment

Body Parameters

Parameter Type Status Description
user_id integer required 用户id
token integer required 用户token
post_id integer required 帖子id
comment_id integer required 帖子评论/回复id

sharePost

帖子分享


Requires authentication

Example request:

curl -X POST \
    "http://sns.shenruxiang.com/api/v1/community/sharePost" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"user_id":12,"token":3,"post_id":8}'
const url = new URL(
    "http://sns.shenruxiang.com/api/v1/community/sharePost"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "user_id": 12,
    "token": 3,
    "post_id": 8
}

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post(
    'http://sns.shenruxiang.com/api/v1/community/sharePost',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'user_id' => 12,
            'token' => 3,
            'post_id' => 8,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

{
    "code": 0,
    "msg": "分享成功",
    "data": []
}

HTTP Request

POST api/v1/community/sharePost

Body Parameters

Parameter Type Status Description
user_id integer required 用户id
token integer required 用户token
post_id integer required 帖子id

collectPost

帖子收藏/取消收藏


Requires authentication

Example request:

curl -X POST \
    "http://sns.shenruxiang.com/api/v1/community/collectPost" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"user_id":7,"token":1,"post_id":10}'
const url = new URL(
    "http://sns.shenruxiang.com/api/v1/community/collectPost"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "user_id": 7,
    "token": 1,
    "post_id": 10
}

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post(
    'http://sns.shenruxiang.com/api/v1/community/collectPost',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'user_id' => 7,
            'token' => 1,
            'post_id' => 10,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

{
    "code": 0,
    "msg": "帖子收藏成功",
    "data": []
}

HTTP Request

POST api/v1/community/collectPost

Body Parameters

Parameter Type Status Description
user_id integer required 用户id
token integer required 用户token
post_id integer required 帖子id

sendPost

发帖


Requires authentication

Example request:

curl -X POST \
    "http://sns.shenruxiang.com/api/v1/community/sendPost" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"user_id":3,"token":3,"title":"est","content":"consectetur","images":"laboriosam"}'
const url = new URL(
    "http://sns.shenruxiang.com/api/v1/community/sendPost"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "user_id": 3,
    "token": 3,
    "title": "est",
    "content": "consectetur",
    "images": "laboriosam"
}

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post(
    'http://sns.shenruxiang.com/api/v1/community/sendPost',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'user_id' => 3,
            'token' => 3,
            'title' => 'est',
            'content' => 'consectetur',
            'images' => 'laboriosam',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

{
    "code": 0,
    "msg": "发帖成功",
    "data": []
}

HTTP Request

POST api/v1/community/sendPost

Body Parameters

Parameter Type Status Description
user_id integer required 用户id
token integer required 用户token
title string required 标题
content string required 帖子内容
images string required 帖子图片地址json src thumb_src

advisoryList

咨询求助列表

Example request:

curl -X POST \
    "http://sns.shenruxiang.com/api/v1/community/advisoryList" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"user_id":10,"token":19}'
const url = new URL(
    "http://sns.shenruxiang.com/api/v1/community/advisoryList"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "user_id": 10,
    "token": 19
}

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post(
    'http://sns.shenruxiang.com/api/v1/community/advisoryList',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'user_id' => 10,
            'token' => 19,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

{
    "code": 0,
    "msg": "请求成功",
    "data": [
        {
            "data": "08-27",
            "week": "星期四",
            "list": []
        },
        {
            "data": "08-28",
            "week": "星期五",
            "list": []
        },
        {
            "data": "08-29",
            "week": "星期六",
            "list": []
        },
        {
            "data": "08-30",
            "week": "星期日",
            "list": []
        },
        {
            "data": "08-31",
            "week": "星期一",
            "list": [
                {
                    "id": 13,
                    "user_id": null,
                    "name": "waserfdsa",
                    "avatar": "\/Uploads\/image\/20200802\/2020080215043068.png",
                    "job": "321",
                    "org": "12",
                    "tel": "13012795753",
                    "desc": "213",
                    "created_at": "2020-08-27 21:39:56",
                    "updated_at": "2020-08-27 22:36:20",
                    "duration": [
                        {
                            "duration": "8:00-9:00",
                            "is_have": 1,
                            "is_order": 0
                        },
                        {
                            "duration": "9:00-10:00",
                            "is_have": 1,
                            "is_order": 0
                        }
                    ],
                    "week": "1,2",
                    "number": 10
                }
            ]
        },
        {
            "data": "09-01",
            "week": "星期二",
            "list": [
                {
                    "id": 13,
                    "user_id": null,
                    "name": "waserfdsa",
                    "avatar": "\/Uploads\/image\/20200802\/2020080215043068.png",
                    "job": "321",
                    "org": "12",
                    "tel": "13012795753",
                    "desc": "213",
                    "created_at": "2020-08-27 21:39:56",
                    "updated_at": "2020-08-27 22:36:20",
                    "duration": [
                        {
                            "duration": "8:00-9:00",
                            "is_have": 1,
                            "is_order": 0
                        },
                        {
                            "duration": "9:00-10:00",
                            "is_have": 1,
                            "is_order": 0
                        }
                    ],
                    "week": "1,2",
                    "number": 10
                }
            ]
        },
        {
            "data": "09-02",
            "week": "星期三",
            "list": []
        },
        {
            "data": "09-03",
            "week": "星期四",
            "list": []
        }
    ]
}

HTTP Request

POST api/v1/community/advisoryList

Body Parameters

Parameter Type Status Description
user_id integer required 用户id
token integer required 用户token

advisoryOrder

咨询预约


Requires authentication

Example request:

curl -X POST \
    "http://sns.shenruxiang.com/api/v1/community/advisoryOrder" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"user_id":13,"token":18,"advisory_id":1,"duration":"et","created_day":"qui"}'
const url = new URL(
    "http://sns.shenruxiang.com/api/v1/community/advisoryOrder"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "user_id": 13,
    "token": 18,
    "advisory_id": 1,
    "duration": "et",
    "created_day": "qui"
}

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post(
    'http://sns.shenruxiang.com/api/v1/community/advisoryOrder',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'user_id' => 13,
            'token' => 18,
            'advisory_id' => 1,
            'duration' => 'et',
            'created_day' => 'qui',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

{
    "code": 0,
    "msg": "您已成功预约",
    "data": []
}

HTTP Request

POST api/v1/community/advisoryOrder

Body Parameters

Parameter Type Status Description
user_id integer required 用户id
token integer required 用户token
advisory_id integer required 咨询老师id
duration string required 预约时间段
created_day string required 预约日期 2020-08-27

advisoryOrderEdit

咨询预约修改


Requires authentication

Example request:

curl -X POST \
    "http://sns.shenruxiang.com/api/v1/community/advisoryOrderEdit" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"user_id":6,"token":13,"id":3,"created_day":"quam","duration":"aut"}'
const url = new URL(
    "http://sns.shenruxiang.com/api/v1/community/advisoryOrderEdit"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "user_id": 6,
    "token": 13,
    "id": 3,
    "created_day": "quam",
    "duration": "aut"
}

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post(
    'http://sns.shenruxiang.com/api/v1/community/advisoryOrderEdit',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'user_id' => 6,
            'token' => 13,
            'id' => 3,
            'created_day' => 'quam',
            'duration' => 'aut',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

{
    "code": 0,
    "msg": "预约时间已更改",
    "data": []
}

HTTP Request

POST api/v1/community/advisoryOrderEdit

Body Parameters

Parameter Type Status Description
user_id integer required 用户id
token integer required 用户token
id integer required 预约id
created_day string required 预约日期
duration string optional 预约时间段

advisoryInfo

咨询求助详情

Example request:

curl -X POST \
    "http://sns.shenruxiang.com/api/v1/community/advisoryInfo" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"user_id":1,"token":20,"advisory_id":12}'
const url = new URL(
    "http://sns.shenruxiang.com/api/v1/community/advisoryInfo"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "user_id": 1,
    "token": 20,
    "advisory_id": 12
}

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post(
    'http://sns.shenruxiang.com/api/v1/community/advisoryInfo',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'user_id' => 1,
            'token' => 20,
            'advisory_id' => 12,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

{
    "code": 0,
    "msg": "请求成功",
    "data": {
        "id": 13,
        "user_id": null,
        "name": "waserfdsa",
        "avatar": "\/Uploads\/image\/20200802\/2020080215043068.png",
        "job": "321",
        "org": "12",
        "tel": "13012795753",
        "desc": "213",
        "created_at": "2020-08-27 21:39:56",
        "updated_at": "2020-08-27 22:36:20",
        "duration": "8:00-9:00,9:00-10:00",
        "week": "1,2",
        "number": 10,
        "date": [
            {
                "date": "2020-08-31",
                "week": "星期一",
                "duration": [
                    "8:00-9:00",
                    "9:00-10:00"
                ]
            },
            {
                "date": "2020-09-01",
                "week": "星期二",
                "duration": [
                    "8:00-9:00",
                    "9:00-10:00"
                ]
            }
        ]
    }
}

HTTP Request

POST api/v1/community/advisoryInfo

Body Parameters

Parameter Type Status Description
user_id integer required 用户id
token integer required 用户token
advisory_id integer required 老师id

Knowledge

知识科普

bannerList

轮播图列表

Example request:

curl -X POST \
    "http://sns.shenruxiang.com/api/v1/knowledge/bannerList" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "http://sns.shenruxiang.com/api/v1/knowledge/bannerList"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post(
    'http://sns.shenruxiang.com/api/v1/knowledge/bannerList',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

{
    "code": 0,
    "msg": "请求成功",
    "data": [
        {
            "id": 2,
            "image": "http:\/\/daodao.shenruxiang.com\/fangao_about.png",
            "sort": 1,
            "title": "轮播图"
        },
        {
            "id": 3,
            "image": "http:\/\/daodao.shenruxiang.com\/fangao_about.png",
            "sort": 1,
            "title": "轮播图"
        },
        {
            "id": 4,
            "image": "http:\/\/daodao.shenruxiang.com\/fangao_about.png",
            "sort": 1,
            "title": "轮播图"
        }
    ]
}

HTTP Request

POST api/v1/knowledge/bannerList

cateList

分类列表

Example request:

curl -X POST \
    "http://sns.shenruxiang.com/api/v1/knowledge/cateList" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "http://sns.shenruxiang.com/api/v1/knowledge/cateList"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post(
    'http://sns.shenruxiang.com/api/v1/knowledge/cateList',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

{
    "code": 0,
    "msg": "请求成功",
    "data": [
        {
            "id": 1,
            "name": "read",
            "title": "知识阅读",
            "sort": 3,
            "image": "http:\/\/daodao.shenruxiang.com\/fangao_about.png",
            "is_cate": 1
        },
        {
            "id": 2,
            "name": "match",
            "title": "知识竞赛",
            "sort": 2,
            "image": "http:\/\/daodao.shenruxiang.com\/fangao_about.png",
            "is_cate": 2
        },
        {
            "id": 3,
            "name": "health",
            "title": "健康自测",
            "sort": 1,
            "image": "http:\/\/daodao.shenruxiang.com\/fangao_about.png",
            "is_cate": 1
        }
    ]
}

HTTP Request

POST api/v1/knowledge/cateList

readCateList

知识阅读分类列表

Example request:

curl -X POST \
    "http://sns.shenruxiang.com/api/v1/knowledge/readCateList" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "http://sns.shenruxiang.com/api/v1/knowledge/readCateList"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post(
    'http://sns.shenruxiang.com/api/v1/knowledge/readCateList',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

{
    "code": 0,
    "msg": "请求成功",
    "data": [
        {
            "id": 1,
            "title": "性格",
            "sort": 6
        },
        {
            "id": 2,
            "title": "情感",
            "sort": 5
        },
        {
            "id": 3,
            "title": "亲子",
            "sort": 4
        },
        {
            "id": 4,
            "title": "职业",
            "sort": 3
        },
        {
            "id": 5,
            "title": "健康",
            "sort": 2
        },
        {
            "id": 6,
            "title": "其他",
            "sort": 1
        }
    ]
}

HTTP Request

POST api/v1/knowledge/readCateList

readList

知识阅读文章列表

Example request:

curl -X POST \
    "http://sns.shenruxiang.com/api/v1/knowledge/readList" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"cate_id":14,"sort":"ipsa"}'
const url = new URL(
    "http://sns.shenruxiang.com/api/v1/knowledge/readList"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "cate_id": 14,
    "sort": "ipsa"
}

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post(
    'http://sns.shenruxiang.com/api/v1/knowledge/readList',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'cate_id' => 14,
            'sort' => 'ipsa',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

{
    "code": 0,
    "msg": "请求成功",
    "data": [
        {
            "id": 3,
            "cate_id": 1,
            "title": "人格三",
            "sort": 3,
            "hot": 0,
            "desc": "你的背后隐藏了哪种人格",
            "read_num": 33,
            "src": "http:\/\/daodao.shenruxiang.com\/fangao_about.png",
            "src_type": 1,
            "content": "这个时间点,可能疫情快过去了,国家也开启了接近40万亿的基础建设计划",
            "create_time": "2020-08-01 15:13:48",
            "update_time": "2020-08-01 15:13:48"
        },
        {
            "id": 2,
            "cate_id": 1,
            "title": "人格二",
            "sort": 2,
            "hot": 0,
            "desc": "你的背后隐藏了哪种人格",
            "read_num": 22,
            "src": "http:\/\/daodao.shenruxiang.com\/fangao_about.png",
            "src_type": 1,
            "content": "这个时间点,可能疫情快过去了,国家也开启了接近40万亿的基础建设计划",
            "create_time": "2020-08-01 15:13:48",
            "update_time": "2020-08-01 15:13:48"
        },
        {
            "id": 1,
            "cate_id": 1,
            "title": "人格一",
            "sort": 1,
            "hot": 0,
            "desc": "你的背后隐藏了哪种人格",
            "read_num": 11,
            "src": "http:\/\/daodao.shenruxiang.com\/fangao_about.png",
            "src_type": 1,
            "content": "这个时间点,可能疫情快过去了,国家也开启了接近40万亿的基础建设计划",
            "create_time": "2020-08-01 15:13:48",
            "update_time": "2020-08-01 15:13:48"
        }
    ]
}

HTTP Request

POST api/v1/knowledge/readList

Body Parameters

Parameter Type Status Description
cate_id integer required 知识阅读分类id
sort string optional 排序(sort/hot)默认sort

readInfo

知识阅读文章详情

Example request:

curl -X POST \
    "http://sns.shenruxiang.com/api/v1/knowledge/readInfo" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"id":5}'
const url = new URL(
    "http://sns.shenruxiang.com/api/v1/knowledge/readInfo"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "id": 5
}

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post(
    'http://sns.shenruxiang.com/api/v1/knowledge/readInfo',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'id' => 5,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

{
    "code": 0,
    "msg": "请求成功",
    "data": {
        "id": 1,
        "cate_id": 1,
        "title": "人格一",
        "sort": 1,
        "hot": 0,
        "desc": "你的背后隐藏了哪种人格",
        "read_num": 11,
        "src": "http:\/\/daodao.shenruxiang.com\/fangao_about.png",
        "src_type": 1,
        "content": "这个时间点,可能疫情快过去了,国家也开启了接近40万亿的基础建设计划",
        "create_time": "2020-08-01 15:13:48",
        "update_time": "2020-08-01 15:13:48",
        "read_cate": {
            "id": 1,
            "title": "性格"
        }
    }
}

HTTP Request

POST api/v1/knowledge/readInfo

Body Parameters

Parameter Type Status Description
id integer required 文章id

matchList

知识竞赛测评列表

Example request:

curl -X POST \
    "http://sns.shenruxiang.com/api/v1/knowledge/matchList" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"sort":"quia"}'
const url = new URL(
    "http://sns.shenruxiang.com/api/v1/knowledge/matchList"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "sort": "quia"
}

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post(
    'http://sns.shenruxiang.com/api/v1/knowledge/matchList',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'sort' => 'quia',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

{
    "code": 0,
    "msg": "请求成功",
    "data": [
        {
            "id": 3,
            "title": "测评三",
            "sort": 3,
            "hot": 0,
            "desc": "疫情心理健康自评量表描述",
            "introduce": "疫情心理健康自评量表介绍",
            "introduce_src": "http:\/\/daodao.shenruxiang.com\/fangao_about.png",
            "introduce_src_type": "1",
            "src": "http:\/\/daodao.shenruxiang.com\/fangao_about.png",
            "src_type": 1,
            "join_num": 33,
            "duration": 180,
            "create_time": "2020-08-01 15:13:48",
            "update_time": "2020-08-01 15:13:48"
        },
        {
            "id": 2,
            "title": "测评二",
            "sort": 2,
            "hot": 0,
            "desc": "疫情心理健康自评量表描述",
            "introduce": "疫情心理健康自评量表介绍",
            "introduce_src": "http:\/\/daodao.shenruxiang.com\/fangao_about.png",
            "introduce_src_type": "1",
            "src": "http:\/\/daodao.shenruxiang.com\/fangao_about.png",
            "src_type": 1,
            "join_num": 22,
            "duration": 120,
            "create_time": "2020-08-01 15:13:48",
            "update_time": "2020-08-01 15:13:48"
        },
        {
            "id": 1,
            "title": "测评一",
            "sort": 1,
            "hot": 0,
            "desc": "疫情心理健康自评量表描述",
            "introduce": "疫情心理健康自评量表介绍",
            "introduce_src": "http:\/\/daodao.shenruxiang.com\/fangao_about.png",
            "introduce_src_type": "1",
            "src": "http:\/\/daodao.shenruxiang.com\/fangao_about.png",
            "src_type": 1,
            "join_num": 11,
            "duration": 60,
            "create_time": "2020-08-01 15:13:48",
            "update_time": "2020-08-01 15:13:48"
        }
    ]
}

HTTP Request

POST api/v1/knowledge/matchList

Body Parameters

Parameter Type Status Description
sort string optional 排序(sort/hot)默认sort

matchInfo

知识竞赛测评详情

Example request:

curl -X POST \
    "http://sns.shenruxiang.com/api/v1/knowledge/matchInfo" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"id":19}'
const url = new URL(
    "http://sns.shenruxiang.com/api/v1/knowledge/matchInfo"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "id": 19
}

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post(
    'http://sns.shenruxiang.com/api/v1/knowledge/matchInfo',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'id' => 19,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

{
    "code": 0,
    "msg": "请求成功",
    "data": {
        "id": 1,
        "title": "测评一",
        "sort": 1,
        "hot": 0,
        "desc": "疫情心理健康自评量表描述",
        "introduce": "疫情心理健康自评量表介绍",
        "introduce_src": "http:\/\/daodao.shenruxiang.com\/fangao_about.png",
        "introduce_src_type": "1",
        "src": "http:\/\/daodao.shenruxiang.com\/fangao_about.png",
        "src_type": 1,
        "join_num": 11,
        "duration": 60,
        "create_time": "2020-08-01 15:13:48",
        "update_time": "2020-08-01 15:13:48",
        "question": [
            {
                "id": 1,
                "match_id": 1,
                "title": "题目一",
                "number": 2,
                "type": "选择",
                "options": [
                    {
                        "type": "A",
                        "num": 1,
                        "title": "选项1"
                    },
                    {
                        "type": "B",
                        "num": 2,
                        "title": "选项2"
                    }
                ],
                "answer": 1,
                "create_time": "2020-08-01 18:03:09",
                "update_time": "2020-08-01 18:03:11"
            },
            {
                "id": 2,
                "match_id": 1,
                "title": "题目二",
                "number": 2,
                "type": "选择",
                "options": [
                    {
                        "type": "A",
                        "num": 1,
                        "title": "选项1"
                    },
                    {
                        "type": "B",
                        "num": 2,
                        "title": "选项2"
                    }
                ],
                "answer": 1,
                "create_time": "2020-08-01 18:03:09",
                "update_time": "2020-08-01 18:03:11"
            }
        ]
    }
}

HTTP Request

POST api/v1/knowledge/matchInfo

Body Parameters

Parameter Type Status Description
id integer required 文章id

matchRecordStart

知识竞赛测评开始


Requires authentication

Example request:

curl -X POST \
    "http://sns.shenruxiang.com/api/v1/knowledge/matchRecordStart" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"user_id":15,"token":1,"match_id":20}'
const url = new URL(
    "http://sns.shenruxiang.com/api/v1/knowledge/matchRecordStart"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "user_id": 15,
    "token": 1,
    "match_id": 20
}

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post(
    'http://sns.shenruxiang.com/api/v1/knowledge/matchRecordStart',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'user_id' => 15,
            'token' => 1,
            'match_id' => 20,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

{
    "code": 0,
    "msg": "测评开始",
    "data": {
        "id": 6
    }
}

HTTP Request

POST api/v1/knowledge/matchRecordStart

Body Parameters

Parameter Type Status Description
user_id integer required 用户id
token integer required 用户token
match_id integer required 测评id

matchRecordEnd

知识竞赛测评结束


Requires authentication

Example request:

curl -X POST \
    "http://sns.shenruxiang.com/api/v1/knowledge/matchRecordEnd" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"user_id":20,"token":7,"record_id":6,"score":12}'
const url = new URL(
    "http://sns.shenruxiang.com/api/v1/knowledge/matchRecordEnd"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "user_id": 20,
    "token": 7,
    "record_id": 6,
    "score": 12
}

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post(
    'http://sns.shenruxiang.com/api/v1/knowledge/matchRecordEnd',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'user_id' => 20,
            'token' => 7,
            'record_id' => 6,
            'score' => 12,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

{
    "code": 0,
    "msg": "测评已完成",
    "data": []
}

HTTP Request

POST api/v1/knowledge/matchRecordEnd

Body Parameters

Parameter Type Status Description
user_id integer required 用户id
token integer required 用户token
record_id integer required 测评记录id
score integer required 测评分数

matchRecordInfo

知识竞赛用户测评详情


Requires authentication

Example request:

curl -X POST \
    "http://sns.shenruxiang.com/api/v1/knowledge/matchRecordInfo" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"user_id":7,"token":4,"record_id":9}'
const url = new URL(
    "http://sns.shenruxiang.com/api/v1/knowledge/matchRecordInfo"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "user_id": 7,
    "token": 4,
    "record_id": 9
}

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post(
    'http://sns.shenruxiang.com/api/v1/knowledge/matchRecordInfo',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'user_id' => 7,
            'token' => 4,
            'record_id' => 9,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

{
    "code": 0,
    "msg": "请求成功",
    "data": {
        "id": 1,
        "user_id": 1,
        "match_id": 1,
        "score": 11,
        "start_time": null,
        "end_time": "2020-08-01 10:16:01",
        "created_at": "2020-08-01 10:14:53",
        "updated_at": "2020-08-01 10:16:01",
        "match": {
            "id": 1,
            "title": "测评一",
            "sort": 1,
            "hot": 0,
            "desc": "疫情心理健康自评量表描述",
            "introduce": "疫情心理健康自评量表介绍",
            "introduce_src": "http:\/\/daodao.shenruxiang.com\/fangao_about.png",
            "introduce_src_type": "1",
            "src": "http:\/\/daodao.shenruxiang.com\/fangao_about.png",
            "src_type": 1,
            "join_num": 11,
            "duration": 60,
            "created_at": "2020-08-01 15:13:48",
            "updated_at": "2020-08-01 15:13:48"
        },
        "user": {
            "id": 1,
            "user_name": "var100",
            "nick": "来日方长",
            "avatar": "http:\/\/daodao.shenruxiang.com\/sns\/post\/cd28b7505f3d539879ea2dda5a9b121d.jpg",
            "password": "",
            "email": "",
            "phone": "13893524930",
            "status": 2,
            "age": 0,
            "address": "",
            "wechat": "",
            "publish_article_num": 0,
            "do_question_num": 0,
            "game_accuracy": 0,
            "create_time": 0,
            "update_time": 0,
            "sex": "",
            "created_at": "2020-08-01 12:58:48",
            "openid": "",
            "login_device_type": "",
            "login_device": "",
            "province": "",
            "city": ""
        }
    }
}

HTTP Request

POST api/v1/knowledge/matchRecordInfo

Body Parameters

Parameter Type Status Description
user_id integer required 用户id
token integer required 用户token
record_id integer required 测评记录id

healthCateList

健康自测分类列表

Example request:

curl -X POST \
    "http://sns.shenruxiang.com/api/v1/knowledge/healthCateList" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "http://sns.shenruxiang.com/api/v1/knowledge/healthCateList"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post(
    'http://sns.shenruxiang.com/api/v1/knowledge/healthCateList',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

{
    "code": 0,
    "msg": "请求成功",
    "data": [
        {
            "id": 1,
            "title": "性格",
            "sort": 6
        },
        {
            "id": 2,
            "title": "情感",
            "sort": 5
        },
        {
            "id": 3,
            "title": "亲子",
            "sort": 4
        },
        {
            "id": 4,
            "title": "职业",
            "sort": 3
        },
        {
            "id": 5,
            "title": "健康",
            "sort": 2
        },
        {
            "id": 6,
            "title": "其他",
            "sort": 1
        }
    ]
}

HTTP Request

POST api/v1/knowledge/healthCateList

healthList

健康自测测评列表

Example request:

curl -X POST \
    "http://sns.shenruxiang.com/api/v1/knowledge/healthList" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"cate_id":9,"sort":"sapiente"}'
const url = new URL(
    "http://sns.shenruxiang.com/api/v1/knowledge/healthList"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "cate_id": 9,
    "sort": "sapiente"
}

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post(
    'http://sns.shenruxiang.com/api/v1/knowledge/healthList',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'cate_id' => 9,
            'sort' => 'sapiente',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

{
    "code": 0,
    "msg": "请求成功",
    "data": [
        {
            "id": 3,
            "cate_id": 1,
            "title": "测评三",
            "sort": 3,
            "hot": 0,
            "desc": "疫情心理健康自评量表描述",
            "introduce": "疫情心理健康自评量表介绍",
            "introduce_src": "http:\/\/daodao.shenruxiang.com\/fangao_about.png",
            "introduce_src_type": "1",
            "src": "http:\/\/daodao.shenruxiang.com\/fangao_about.png",
            "src_type": 1,
            "join_num": 33,
            "duration": 180,
            "created_at": "2020-08-01 15:13:48",
            "updated_at": "2020-08-01 15:13:48"
        },
        {
            "id": 2,
            "cate_id": 1,
            "title": "测评二",
            "sort": 2,
            "hot": 0,
            "desc": "疫情心理健康自评量表描述",
            "introduce": "疫情心理健康自评量表介绍",
            "introduce_src": "http:\/\/daodao.shenruxiang.com\/fangao_about.png",
            "introduce_src_type": "1",
            "src": "http:\/\/daodao.shenruxiang.com\/fangao_about.png",
            "src_type": 1,
            "join_num": 22,
            "duration": 120,
            "created_at": "2020-08-01 15:13:48",
            "updated_at": "2020-08-01 15:13:48"
        },
        {
            "id": 1,
            "cate_id": 1,
            "title": "测评一",
            "sort": 1,
            "hot": 0,
            "desc": "疫情心理健康自评量表描述",
            "introduce": "疫情心理健康自评量表介绍",
            "introduce_src": "http:\/\/daodao.shenruxiang.com\/fangao_about.png",
            "introduce_src_type": "1",
            "src": "http:\/\/daodao.shenruxiang.com\/fangao_about.png",
            "src_type": 1,
            "join_num": 11,
            "duration": 60,
            "created_at": "2020-08-01 15:13:48",
            "updated_at": "2020-08-01 15:13:48"
        }
    ]
}

HTTP Request

POST api/v1/knowledge/healthList

Body Parameters

Parameter Type Status Description
cate_id integer required 分类id
sort string optional 排序(sort/hot)默认sort

healthInfo

健康自测用户测评详情

Example request:

curl -X POST \
    "http://sns.shenruxiang.com/api/v1/knowledge/healthInfo" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"id":16}'
const url = new URL(
    "http://sns.shenruxiang.com/api/v1/knowledge/healthInfo"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "id": 16
}

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post(
    'http://sns.shenruxiang.com/api/v1/knowledge/healthInfo',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'id' => 16,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

{
    "code": 0,
    "msg": "请求成功",
    "data": {
        "id": 1,
        "cate_id": 1,
        "title": "测评一",
        "sort": 1,
        "hot": 0,
        "desc": "疫情心理健康自评量表描述",
        "introduce": "疫情心理健康自评量表介绍",
        "introduce_src": "http:\/\/daodao.shenruxiang.com\/fangao_about.png",
        "introduce_src_type": "1",
        "src": "http:\/\/daodao.shenruxiang.com\/fangao_about.png",
        "src_type": 1,
        "join_num": 11,
        "duration": 60,
        "created_at": "2020-08-01 15:13:48",
        "updated_at": "2020-08-01 15:13:48",
        "question": [
            {
                "id": 1,
                "health_id": 1,
                "title": "题目一",
                "number": 2,
                "type": "选择",
                "options": [
                    {
                        "type": "A",
                        "num": 1,
                        "title": "选项1"
                    },
                    {
                        "type": "B",
                        "num": 2,
                        "title": "选项2"
                    }
                ],
                "answer": 1,
                "created_at": "2020-08-01 18:03:09",
                "updated_at": "2020-08-01 18:03:11"
            },
            {
                "id": 2,
                "health_id": 1,
                "title": "题目二",
                "number": 2,
                "type": "选择",
                "options": [
                    {
                        "type": "A",
                        "num": 1,
                        "title": "选项1"
                    },
                    {
                        "type": "B",
                        "num": 2,
                        "title": "选项2"
                    }
                ],
                "answer": 1,
                "created_at": "2020-08-01 18:03:09",
                "updated_at": "2020-08-01 18:03:11"
            }
        ]
    }
}

HTTP Request

POST api/v1/knowledge/healthInfo

Body Parameters

Parameter Type Status Description
id integer required 测评id

healthRecordStart

健康自测测评开始


Requires authentication

Example request:

curl -X POST \
    "http://sns.shenruxiang.com/api/v1/knowledge/healthRecordStart" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"user_id":7,"token":19,"health_id":13}'
const url = new URL(
    "http://sns.shenruxiang.com/api/v1/knowledge/healthRecordStart"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "user_id": 7,
    "token": 19,
    "health_id": 13
}

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post(
    'http://sns.shenruxiang.com/api/v1/knowledge/healthRecordStart',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'user_id' => 7,
            'token' => 19,
            'health_id' => 13,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

{
    "code": 0,
    "msg": "测评开始",
    "data": {
        "id": 6
    }
}

HTTP Request

POST api/v1/knowledge/healthRecordStart

Body Parameters

Parameter Type Status Description
user_id integer required 用户id
token integer required 用户token
health_id integer required 测评id

healthRecordEnd

健康自测测评结束


Requires authentication

Example request:

curl -X POST \
    "http://sns.shenruxiang.com/api/v1/knowledge/healthRecordEnd" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"user_id":11,"token":12,"record_id":18,"score":4}'
const url = new URL(
    "http://sns.shenruxiang.com/api/v1/knowledge/healthRecordEnd"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "user_id": 11,
    "token": 12,
    "record_id": 18,
    "score": 4
}

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post(
    'http://sns.shenruxiang.com/api/v1/knowledge/healthRecordEnd',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'user_id' => 11,
            'token' => 12,
            'record_id' => 18,
            'score' => 4,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

{
    "code": 0,
    "msg": "测评已完成",
    "data": []
}

HTTP Request

POST api/v1/knowledge/healthRecordEnd

Body Parameters

Parameter Type Status Description
user_id integer required 用户id
token integer required 用户token
record_id integer required 测评记录id
score integer required 测评分数

healthRecordInfo

知识竞赛用户测评详情


Requires authentication

Example request:

curl -X POST \
    "http://sns.shenruxiang.com/api/v1/knowledge/healthRecordInfo" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"user_id":19,"token":19,"record_id":11}'
const url = new URL(
    "http://sns.shenruxiang.com/api/v1/knowledge/healthRecordInfo"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "user_id": 19,
    "token": 19,
    "record_id": 11
}

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post(
    'http://sns.shenruxiang.com/api/v1/knowledge/healthRecordInfo',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'user_id' => 19,
            'token' => 19,
            'record_id' => 11,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

{
    "code": 0,
    "msg": "请求成功",
    "data": {
        "id": 1,
        "user_id": 1,
        "health_id": 1,
        "score": 11,
        "score_level": "",
        "start_time": null,
        "end_time": "2020-08-01 10:16:01",
        "created_at": "2020-08-01 10:14:53",
        "updated_at": "2020-08-01 10:16:01",
        "health": {
            "id": 1,
            "cate_id": 1,
            "title": "测评一",
            "sort": 1,
            "hot": 0,
            "desc": "疫情心理健康自评量表描述",
            "introduce": "疫情心理健康自评量表介绍",
            "introduce_src": "http:\/\/daodao.shenruxiang.com\/fangao_about.png",
            "introduce_src_type": "1",
            "src": "http:\/\/daodao.shenruxiang.com\/fangao_about.png",
            "src_type": 1,
            "join_num": 11,
            "duration": 60,
            "created_at": "2020-08-01 15:13:48",
            "updated_at": "2020-08-01 15:13:48"
        },
        "user": {
            "id": 1,
            "user_name": "var100",
            "nick": "来日方长",
            "avatar": "http:\/\/daodao.shenruxiang.com\/sns\/post\/cd28b7505f3d539879ea2dda5a9b121d.jpg",
            "password": "",
            "email": "",
            "phone": "13893524930",
            "status": 2,
            "age": 0,
            "address": "",
            "wechat": "",
            "publish_article_num": 0,
            "do_question_num": 0,
            "game_accuracy": 0,
            "create_time": 0,
            "update_time": 0,
            "sex": "",
            "created_at": "2020-08-01 12:58:48",
            "openid": "",
            "login_device_type": "",
            "login_device": "",
            "province": "",
            "city": ""
        }
    }
}

HTTP Request

POST api/v1/knowledge/healthRecordInfo

Body Parameters

Parameter Type Status Description
user_id integer required 用户id
token integer required 用户token
record_id integer required 测评记录id

shareHealth

健康自测分享


Requires authentication

Example request:

curl -X POST \
    "http://sns.shenruxiang.com/api/v1/knowledge/shareHealth" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"user_id":7,"token":"qui","health_id":9}'
const url = new URL(
    "http://sns.shenruxiang.com/api/v1/knowledge/shareHealth"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "user_id": 7,
    "token": "qui",
    "health_id": 9
}

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post(
    'http://sns.shenruxiang.com/api/v1/knowledge/shareHealth',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'user_id' => 7,
            'token' => 'qui',
            'health_id' => 9,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

{
    "code": 0,
    "msg": "分享成功",
    "data": []
}

HTTP Request

POST api/v1/knowledge/shareHealth

Body Parameters

Parameter Type Status Description
user_id integer required 用户id
token string required 用户token
health_id integer required 健康自测id

Login

第三方登陆

loginByOauth

第三方登陆

Example request:

curl -X POST \
    "http://sns.shenruxiang.com/api/v1/loginByOauth" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"code":"harum"}'
const url = new URL(
    "http://sns.shenruxiang.com/api/v1/loginByOauth"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "code": "harum"
}

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post(
    'http://sns.shenruxiang.com/api/v1/loginByOauth',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'code' => 'harum',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

{
    "code": 0,
    "msg": "请求成功",
    "data": {
        "id": 50,
        "user_name": "1596384702359",
        "nick": "2222",
        "avatar": "22",
        "phone": "",
        "status": 2,
        "age": 0,
        "wechat": "",
        "publish_post_num": 0,
        "do_question_num": 0,
        "game_accuracy": 0,
        "gender": 0,
        "openid": "1111122",
        "province": "222",
        "city": "333",
        "token": "0bf1f7fb68b8c5b0c37f68af79909d66",
        "login_time": "2020-08-02 16:11:42",
        "expire_time": 1605024702,
        "created_at": "2020-08-02 16:11:42",
        "isTemp": false,
        "openId": 123456,
        "sessionKey": 556633232323
    }
}

HTTP Request

POST api/v1/loginByOauth

Body Parameters

Parameter Type Status Description
code string required 登录时获取的 code

registerByOauth

第三方注册

Example request:

curl -X POST \
    "http://sns.shenruxiang.com/api/v1/registerByOauth" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"openid":"autem","nick":"dignissimos","avatar":"sit","gender":12,"province":"iure","city":"aut"}'
const url = new URL(
    "http://sns.shenruxiang.com/api/v1/registerByOauth"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "openid": "autem",
    "nick": "dignissimos",
    "avatar": "sit",
    "gender": 12,
    "province": "iure",
    "city": "aut"
}

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post(
    'http://sns.shenruxiang.com/api/v1/registerByOauth',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'openid' => 'autem',
            'nick' => 'dignissimos',
            'avatar' => 'sit',
            'gender' => 12,
            'province' => 'iure',
            'city' => 'aut',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

{
    "code": 0,
    "msg": "请求成功",
    "data": {
        "id": 50,
        "user_name": "1596384702359",
        "nick": "2222",
        "avatar": "22",
        "phone": "",
        "status": 2,
        "age": 0,
        "wechat": "",
        "publish_post_num": 0,
        "do_question_num": 0,
        "game_accuracy": 0,
        "gender": 0,
        "openid": "1111122",
        "province": "222",
        "city": "333",
        "token": "0bf1f7fb68b8c5b0c37f68af79909d66",
        "login_time": "2020-08-02 16:11:42",
        "expire_time": 1605024702,
        "created_at": "2020-08-02 16:11:42",
        "isTemp": false
    }
}

HTTP Request

POST api/v1/registerByOauth

Body Parameters

Parameter Type Status Description
openid string required 第三方标示openid
nick string optional 昵称
avatar string optional 头像
gender integer optional 性别 0未知 1男性 2女性
province string optional 省份
city string optional 城市

api/v1/makeToken

Example request:

curl -X POST \
    "http://sns.shenruxiang.com/api/v1/makeToken" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "http://sns.shenruxiang.com/api/v1/makeToken"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post(
    'http://sns.shenruxiang.com/api/v1/makeToken',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

HTTP Request

POST api/v1/makeToken

api/v1/getPhone

Example request:

curl -X POST \
    "http://sns.shenruxiang.com/api/v1/getPhone" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "http://sns.shenruxiang.com/api/v1/getPhone"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post(
    'http://sns.shenruxiang.com/api/v1/getPhone',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

HTTP Request

POST api/v1/getPhone

api/v1/refreshSessionKey

Example request:

curl -X POST \
    "http://sns.shenruxiang.com/api/v1/refreshSessionKey" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "http://sns.shenruxiang.com/api/v1/refreshSessionKey"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post(
    'http://sns.shenruxiang.com/api/v1/refreshSessionKey',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

HTTP Request

POST api/v1/refreshSessionKey

Train

训练提升

bannerList

轮播图列表

Example request:

curl -X POST \
    "http://sns.shenruxiang.com/api/v1/train/bannerList" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "http://sns.shenruxiang.com/api/v1/train/bannerList"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post(
    'http://sns.shenruxiang.com/api/v1/train/bannerList',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

{
    "code": 0,
    "msg": "请求成功",
    "data": [
        {
            "id": 2,
            "image": "http:\/\/daodao.shenruxiang.com\/fangao_about.png",
            "sort": 1,
            "title": "轮播图"
        },
        {
            "id": 3,
            "image": "http:\/\/daodao.shenruxiang.com\/fangao_about.png",
            "sort": 1,
            "title": "轮播图"
        },
        {
            "id": 4,
            "image": "http:\/\/daodao.shenruxiang.com\/fangao_about.png",
            "sort": 1,
            "title": "轮播图"
        }
    ]
}

HTTP Request

POST api/v1/train/bannerList

dayCateList

每日静心分类列表

Example request:

curl -X POST \
    "http://sns.shenruxiang.com/api/v1/train/dayCateList" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "http://sns.shenruxiang.com/api/v1/train/dayCateList"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post(
    'http://sns.shenruxiang.com/api/v1/train/dayCateList',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

{
    "code": 0,
    "msg": "请求成功",
    "data": [
        {
            "id": 1,
            "title": "正念冥想",
            "sort": 6
        },
        {
            "id": 2,
            "title": "美人技术",
            "sort": 5
        }
    ]
}

HTTP Request

POST api/v1/train/dayCateList

dayList

每日静心列表

Example request:

curl -X POST \
    "http://sns.shenruxiang.com/api/v1/train/dayList" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"cate_id":13}'
const url = new URL(
    "http://sns.shenruxiang.com/api/v1/train/dayList"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "cate_id": 13
}

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post(
    'http://sns.shenruxiang.com/api/v1/train/dayList',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'cate_id' => 13,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

{
    "code": 0,
    "msg": "请求成功",
    "data": [
        {
            "id": 1,
            "cate_id": 1,
            "title": "开启美好一天",
            "desc": "美好的一天,从冥想开始",
            "image": "http:\/\/daodao.shenruxiang.com\/sns\/post\/cd28b7505f3d539879ea2dda5a9b121d.jpg",
            "introduction": "联系简介",
            "join_num": 0,
            "created_at": "2020-08-02 16:21:17",
            "updated_at": "2020-08-02 16:21:18"
        },
        {
            "id": 2,
            "cate_id": 1,
            "title": "开启美好一天",
            "desc": "美好的一天,从冥想开始",
            "image": "http:\/\/daodao.shenruxiang.com\/sns\/post\/cd28b7505f3d539879ea2dda5a9b121d.jpg",
            "introduction": "联系简介",
            "join_num": 0,
            "created_at": "2020-08-02 16:21:17",
            "updated_at": "2020-08-02 16:21:18"
        }
    ]
}

HTTP Request

POST api/v1/train/dayList

Body Parameters

Parameter Type Status Description
cate_id integer required 分类id

api/v1/train/dayLists

Example request:

curl -X POST \
    "http://sns.shenruxiang.com/api/v1/train/dayLists" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "http://sns.shenruxiang.com/api/v1/train/dayLists"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post(
    'http://sns.shenruxiang.com/api/v1/train/dayLists',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

HTTP Request

POST api/v1/train/dayLists

dayInfo

每日静心详情

Example request:

curl -X POST \
    "http://sns.shenruxiang.com/api/v1/train/dayInfo" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"day_id":2}'
const url = new URL(
    "http://sns.shenruxiang.com/api/v1/train/dayInfo"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "day_id": 2
}

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post(
    'http://sns.shenruxiang.com/api/v1/train/dayInfo',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'day_id' => 2,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

{
    "code": 0,
    "msg": "请求成功",
    "data": {
        "id": 1,
        "cate_id": 1,
        "title": "开启美好一天",
        "desc": "美好的一天,从冥想开始",
        "image": "http:\/\/daodao.shenruxiang.com\/sns\/post\/cd28b7505f3d539879ea2dda5a9b121d.jpg",
        "introduction": "联系简介",
        "join_num": 0,
        "created_at": "2020-08-02 16:21:17",
        "updated_at": "2020-08-02 16:21:18",
        "day_step": [
            {
                "id": 1,
                "day_id": 1,
                "title": "姿势调整",
                "duration": 120,
                "src": "http:\/\/daodao.shenruxiang.com\/step.mp3",
                "created_at": "2020-08-02 16:23:19",
                "updated_at": "2020-08-02 16:23:21"
            },
            {
                "id": 2,
                "day_id": 1,
                "title": "呼吸觉察",
                "duration": 120,
                "src": "http:\/\/daodao.shenruxiang.com\/step.mp3",
                "created_at": "2020-08-02 16:23:19",
                "updated_at": "2020-08-02 16:23:21"
            }
        ]
    }
}

HTTP Request

POST api/v1/train/dayInfo

Body Parameters

Parameter Type Status Description
day_id integer required day_id

gameList

益脑游戏列表

Example request:

curl -X POST \
    "http://sns.shenruxiang.com/api/v1/train/gameList" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "http://sns.shenruxiang.com/api/v1/train/gameList"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post(
    'http://sns.shenruxiang.com/api/v1/train/gameList',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

{
    "code": 0,
    "msg": "请求成功",
    "data": [
        {
            "id": 1,
            "title": "注意力训练",
            "desc": "通过简洁的游戏训练提高儿童的注意力",
            "image": "http:\/\/daodao.shenruxiang.com\/sns\/post\/cd28b7505f3d539879ea2dda5a9b121d.jpg",
            "duration": 60,
            "introduction": "本部分属于训练提升模块中训练游戏,通过简洁的游戏训练提高儿童的注意力,经验表明保持一段时间的训练注意力能显著提升。",
            "join_num": 0,
            "guide": "接下来我们会看到一张打乱数字顺序的表格,在保持正确的情况下尽可能快的按顺序点击数字,注意不要出错哦。",
            "created_at": "2020-08-02 16:16:11",
            "updated_at": "2020-08-02 16:16:13"
        },
        {
            "id": 2,
            "title": "反应时训练",
            "desc": "通过简洁的游戏训练提高儿童的注意力",
            "image": "http:\/\/daodao.shenruxiang.com\/sns\/post\/cd28b7505f3d539879ea2dda5a9b121d.jpg",
            "duration": 60,
            "introduction": "本部分属于训练提升模块中训练游戏,通过简洁的游戏训练提高儿童的注意力,经验表明保持一段时间的训练注意力能显著提升。",
            "join_num": 0,
            "guide": "接下来我们会看到一张打乱数字顺序的表格,在保持正确的情况下尽可能快的按顺序点击数字,注意不要出错哦。",
            "created_at": "2020-08-02 16:16:11",
            "updated_at": "2020-08-02 16:16:13"
        },
        {
            "id": 3,
            "title": "记忆力训练",
            "desc": "通过简洁的游戏训练提高儿童的注意力",
            "image": "http:\/\/daodao.shenruxiang.com\/sns\/post\/cd28b7505f3d539879ea2dda5a9b121d.jpg",
            "duration": 60,
            "introduction": "本部分属于训练提升模块中训练游戏,通过简洁的游戏训练提高儿童的注意力,经验表明保持一段时间的训练注意力能显著提升。",
            "join_num": 0,
            "guide": "接下来我们会看到一张打乱数字顺序的表格,在保持正确的情况下尽可能快的按顺序点击数字,注意不要出错哦。",
            "created_at": "2020-08-02 16:16:11",
            "updated_at": "2020-08-02 16:16:13"
        },
        {
            "id": 4,
            "title": "判断力训练",
            "desc": "通过简洁的游戏训练提高儿童的注意力",
            "image": "http:\/\/daodao.shenruxiang.com\/sns\/post\/cd28b7505f3d539879ea2dda5a9b121d.jpg",
            "duration": 60,
            "introduction": "本部分属于训练提升模块中训练游戏,通过简洁的游戏训练提高儿童的注意力,经验表明保持一段时间的训练注意力能显著提升。",
            "join_num": 0,
            "guide": "接下来我们会看到一张打乱数字顺序的表格,在保持正确的情况下尽可能快的按顺序点击数字,注意不要出错哦。",
            "created_at": "2020-08-02 16:16:11",
            "updated_at": "2020-08-02 16:16:13"
        },
        {
            "id": 5,
            "title": "时间感知训练",
            "desc": "通过简洁的游戏训练提高儿童的注意力",
            "image": "http:\/\/daodao.shenruxiang.com\/sns\/post\/cd28b7505f3d539879ea2dda5a9b121d.jpg",
            "duration": 60,
            "introduction": "本部分属于训练提升模块中训练游戏,通过简洁的游戏训练提高儿童的注意力,经验表明保持一段时间的训练注意力能显著提升。",
            "join_num": 0,
            "guide": "接下来我们会看到一张打乱数字顺序的表格,在保持正确的情况下尽可能快的按顺序点击数字,注意不要出错哦。",
            "created_at": "2020-08-02 16:16:11",
            "updated_at": "2020-08-02 16:16:13"
        }
    ]
}

HTTP Request

POST api/v1/train/gameList

gameInfo

益脑游戏训练详情

Example request:

curl -X POST \
    "http://sns.shenruxiang.com/api/v1/train/gameInfo" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"game_id":19}'
const url = new URL(
    "http://sns.shenruxiang.com/api/v1/train/gameInfo"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "game_id": 19
}

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post(
    'http://sns.shenruxiang.com/api/v1/train/gameInfo',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'game_id' => 19,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

{
    "code": 0,
    "msg": "请求成功",
    "data": {
        "id": 1,
        "title": "注意力训练",
        "desc": "通过简洁的游戏训练提高儿童的注意力",
        "image": "http:\/\/daodao.shenruxiang.com\/sns\/post\/cd28b7505f3d539879ea2dda5a9b121d.jpg",
        "duration": 60,
        "introduction": "本部分属于训练提升模块中训练游戏,通过简洁的游戏训练提高儿童的注意力,经验表明保持一段时间的训练注意力能显著提升。",
        "join_num": 0,
        "guide": "接下来我们会看到一张打乱数字顺序的表格,在保持正确的情况下尽可能快的按顺序点击数字,注意不要出错哦。",
        "created_at": "2020-08-02 16:16:11",
        "updated_at": "2020-08-02 16:16:13"
    }
}

HTTP Request

POST api/v1/train/gameInfo

Body Parameters

Parameter Type Status Description
game_id integer required 游戏id

gameRecordStart

益脑游戏训练开始


Requires authentication

Example request:

curl -X POST \
    "http://sns.shenruxiang.com/api/v1/train/gameRecordStart" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"user_id":13,"token":11,"game_id":14}'
const url = new URL(
    "http://sns.shenruxiang.com/api/v1/train/gameRecordStart"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "user_id": 13,
    "token": 11,
    "game_id": 14
}

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post(
    'http://sns.shenruxiang.com/api/v1/train/gameRecordStart',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'user_id' => 13,
            'token' => 11,
            'game_id' => 14,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

{
    "code": 0,
    "msg": "游戏训练开始",
    "data": {
        "id": 6
    }
}

HTTP Request

POST api/v1/train/gameRecordStart

Body Parameters

Parameter Type Status Description
user_id integer required 用户id
token integer required 用户token
game_id integer required 游戏id

gameRecordEnd

益脑游戏训练结束


Requires authentication

Example request:

curl -X POST \
    "http://sns.shenruxiang.com/api/v1/train/gameRecordEnd" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"user_id":4,"token":4,"record_id":20,"summary":"ut"}'
const url = new URL(
    "http://sns.shenruxiang.com/api/v1/train/gameRecordEnd"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "user_id": 4,
    "token": 4,
    "record_id": 20,
    "summary": "ut"
}

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post(
    'http://sns.shenruxiang.com/api/v1/train/gameRecordEnd',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'user_id' => 4,
            'token' => 4,
            'record_id' => 20,
            'summary' => 'ut',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

{
    "code": 0,
    "msg": "游戏训练已完成",
    "data": []
}

HTTP Request

POST api/v1/train/gameRecordEnd

Body Parameters

Parameter Type Status Description
user_id integer required 用户id
token integer required 用户token
record_id integer required 测评记录id
summary string required 完成总结语

Upload

uploadPost

帖子图片上传


Requires authentication

Example request:

curl -X POST \
    "http://sns.shenruxiang.com/api/v1/uploadPost" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"user_id":14,"token":10,"file":"in"}'
const url = new URL(
    "http://sns.shenruxiang.com/api/v1/uploadPost"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "user_id": 14,
    "token": 10,
    "file": "in"
}

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post(
    'http://sns.shenruxiang.com/api/v1/uploadPost',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'user_id' => 14,
            'token' => 10,
            'file' => 'in',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

{
    "code": 0,
    "msg": "请求成功",
    "data": [
        {
            "source_src": "http:\/\/daodao.shenruxiang.com\/sns\/post\/5e0914ce14ff1ef5de15a5a708629a66.jpeg",
            "source_thumb_src": "http:\/\/daodao.shenruxiang.com\/\/sns\/post\/5e0914ce14ff1ef5de15a5a708629a66.jpeg?vframe\/png\/offset\/1\/w\/600\/h\/600"
        },
        {
            "source_src": "http:\/\/daodao.shenruxiang.com\/sns\/post\/dc60a911dfc8de01232e53bbf4a0482b.png",
            "source_thumb_src": "http:\/\/daodao.shenruxiang.com\/\/sns\/post\/dc60a911dfc8de01232e53bbf4a0482b.png?vframe\/png\/offset\/1\/w\/600\/h\/600"
        }
    ]
}

HTTP Request

POST api/v1/uploadPost

Body Parameters

Parameter Type Status Description
user_id integer required 用户id
token integer required 用户token
file file required 图片文件

uploadUserAvatar

用户头像上传


Requires authentication

Example request:

curl -X POST \
    "http://sns.shenruxiang.com/api/v1/uploadUserAvatar" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"user_id":10,"token":6,"file":"officia"}'
const url = new URL(
    "http://sns.shenruxiang.com/api/v1/uploadUserAvatar"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "user_id": 10,
    "token": 6,
    "file": "officia"
}

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post(
    'http://sns.shenruxiang.com/api/v1/uploadUserAvatar',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'user_id' => 10,
            'token' => 6,
            'file' => 'officia',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

{
    "code": 0,
    "msg": "请求成功",
    "data": [
        "http:\/\/daodao.shenruxiang.com\/sns\/avatar\/afc213b7e586b712be7ae60036f41113.jpg"
    ]
}

HTTP Request

POST api/v1/uploadUserAvatar

Body Parameters

Parameter Type Status Description
user_id integer required 用户id
token integer required 用户token
file file required 用户头像

User

userInfo

用户个人信息


Requires authentication

Example request:

curl -X POST \
    "http://sns.shenruxiang.com/api/v1/user/userInfo" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"user_id":6,"token":12}'
const url = new URL(
    "http://sns.shenruxiang.com/api/v1/user/userInfo"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "user_id": 6,
    "token": 12
}

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post(
    'http://sns.shenruxiang.com/api/v1/user/userInfo',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'user_id' => 6,
            'token' => 12,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

{
    "code": 0,
    "msg": "请求成功",
    "data": {
        "id": 1,
        "user_name": "var100",
        "nick": "来日方长",
        "avatar": "http:\/\/daodao.shenruxiang.com\/sns\/post\/cd28b7505f3d539879ea2dda5a9b121d.jpg",
        "password": "",
        "email": "",
        "phone": "13893524930",
        "status": 2,
        "age": 0,
        "address": "",
        "wechat": "",
        "publish_article_num": 0,
        "do_question_num": 0,
        "game_accuracy": 0,
        "create_time": 0,
        "update_time": 0
    }
}

HTTP Request

POST api/v1/user/userInfo

Body Parameters

Parameter Type Status Description
user_id integer required 用户id
token integer required 用户token

userInfoEdit

用户信息修改


Requires authentication

Example request:

curl -X POST \
    "http://sns.shenruxiang.com/api/v1/user/userInfoEdit" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"user_id":9,"token":12,"nick":"autem","sex":"et","avatar":"sed"}'
const url = new URL(
    "http://sns.shenruxiang.com/api/v1/user/userInfoEdit"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "user_id": 9,
    "token": 12,
    "nick": "autem",
    "sex": "et",
    "avatar": "sed"
}

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post(
    'http://sns.shenruxiang.com/api/v1/user/userInfoEdit',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'user_id' => 9,
            'token' => 12,
            'nick' => 'autem',
            'sex' => 'et',
            'avatar' => 'sed',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

{
    "code": 0,
    "msg": "编辑资料成功",
    "data": []
}

HTTP Request

POST api/v1/user/userInfoEdit

Body Parameters

Parameter Type Status Description
user_id integer required 用户id
token integer required 用户token
nick string required 昵称
sex string optional 性别 男
avatar string required 头像

userPostList

用户帖子列表


Requires authentication

Example request:

curl -X POST \
    "http://sns.shenruxiang.com/api/v1/user/userPostList" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"user_id":7,"token":10}'
const url = new URL(
    "http://sns.shenruxiang.com/api/v1/user/userPostList"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "user_id": 7,
    "token": 10
}

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post(
    'http://sns.shenruxiang.com/api/v1/user/userPostList',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'user_id' => 7,
            'token' => 10,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

{
    "code": 0,
    "msg": "请求成功",
    "data": {
        "current_page": 1,
        "data": [
            {
                "id": 1,
                "title": "帖子标题1",
                "content": "帖子内容",
                "images": [
                    {
                        "src": "http:\/\/daodao.shenruxiang.com\/sns\/post\/cd28b7505f3d539879ea2dda5a9b121d.jpg",
                        "thumb_src": "http:\/\/daodao.shenruxiang.com\/\/sns\/post\/cd28b7505f3d539879ea2dda5a9b121d.jpg?imageView2\/2\/w\/600\/h\/600\/q\/75"
                    },
                    {
                        "src": "http:\/\/daodao.shenruxiang.com\/sns\/post\/d80a95beede76095240e053890b3a086.jpg",
                        "thumb_src": "http:\/\/daodao.shenruxiang.com\/\/sns\/post\/d80a95beede76095240e053890b3a086.jpg?imageView2\/2\/w\/600\/h\/600\/q\/75"
                    }
                ],
                "user_id": 1,
                "praise_num": 1,
                "comment_num": 3,
                "share_num": 0,
                "collect_num": 1,
                "view_num": 5,
                "created_at": "2020-08-01 19:34:33",
                "updated_at": "2020-08-01 12:21:15",
                "status": 1,
                "user": {
                    "id": 1,
                    "nick": "来日方长",
                    "avatar": "http:\/\/daodao.shenruxiang.com\/sns\/post\/cd28b7505f3d539879ea2dda5a9b121d.jpg"
                }
            },
            {
                "id": 2,
                "title": "帖子标题2",
                "content": "帖子内容",
                "images": [
                    {
                        "src": "http:\/\/daodao.shenruxiang.com\/sns\/post\/cd28b7505f3d539879ea2dda5a9b121d.jpg",
                        "thumb_src": "http:\/\/daodao.shenruxiang.com\/\/sns\/post\/cd28b7505f3d539879ea2dda5a9b121d.jpg?imageView2\/2\/w\/600\/h\/600\/q\/75"
                    },
                    {
                        "src": "http:\/\/daodao.shenruxiang.com\/sns\/post\/d80a95beede76095240e053890b3a086.jpg",
                        "thumb_src": "http:\/\/daodao.shenruxiang.com\/\/sns\/post\/d80a95beede76095240e053890b3a086.jpg?imageView2\/2\/w\/600\/h\/600\/q\/75"
                    }
                ],
                "user_id": 1,
                "praise_num": 1,
                "comment_num": 3,
                "share_num": 0,
                "collect_num": 1,
                "view_num": 5,
                "created_at": "2020-08-01 19:34:33",
                "updated_at": "2020-08-01 12:21:15",
                "status": 1,
                "user": {
                    "id": 1,
                    "nick": "来日方长",
                    "avatar": "http:\/\/daodao.shenruxiang.com\/sns\/post\/cd28b7505f3d539879ea2dda5a9b121d.jpg"
                }
            }
        ],
        "first_page_url": "http:\/\/www.questionapi.com:8888\/api\/v1\/user\/userPostList?page=1",
        "from": 1,
        "next_page_url": null,
        "path": "http:\/\/www.questionapi.com:8888\/api\/v1\/user\/userPostList",
        "per_page": 10,
        "prev_page_url": null,
        "to": 2
    }
}

HTTP Request

POST api/v1/user/userPostList

Body Parameters

Parameter Type Status Description
user_id integer required 用户id
token integer required 用户token

userCommentedList

用户回帖列表


Requires authentication

Example request:

curl -X POST \
    "http://sns.shenruxiang.com/api/v1/user/userCommentedList" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"user_id":9,"token":4,"page":15}'
const url = new URL(
    "http://sns.shenruxiang.com/api/v1/user/userCommentedList"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "user_id": 9,
    "token": 4,
    "page": 15
}

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post(
    'http://sns.shenruxiang.com/api/v1/user/userCommentedList',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'user_id' => 9,
            'token' => 4,
            'page' => 15,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

{
    "code": 0,
    "msg": "请求成功",
    "data": {
        "current_page": 1,
        "data": [
            {
                "id": 1,
                "title": "帖子标题1",
                "content": "帖子内容",
                "images": [
                    {
                        "src": "http:\/\/daodao.shenruxiang.com\/sns\/post\/cd28b7505f3d539879ea2dda5a9b121d.jpg",
                        "thumb_src": "http:\/\/daodao.shenruxiang.com\/\/sns\/post\/cd28b7505f3d539879ea2dda5a9b121d.jpg?imageView2\/2\/w\/600\/h\/600\/q\/75"
                    },
                    {
                        "src": "http:\/\/daodao.shenruxiang.com\/sns\/post\/d80a95beede76095240e053890b3a086.jpg",
                        "thumb_src": "http:\/\/daodao.shenruxiang.com\/\/sns\/post\/d80a95beede76095240e053890b3a086.jpg?imageView2\/2\/w\/600\/h\/600\/q\/75"
                    }
                ],
                "user_id": 1,
                "praise_num": 1,
                "comment_num": 3,
                "share_num": 0,
                "collect_num": 1,
                "view_num": 5,
                "created_at": "2020-08-01 19:34:33",
                "updated_at": "2020-08-01 12:21:15",
                "status": 1,
                "post_comment": [
                    {
                        "id": 67,
                        "post_id": 1,
                        "user_id": 1,
                        "to_user_id": 2,
                        "comment_id": 0,
                        "content": "帖子评论",
                        "praise_num": 0,
                        "status": 1,
                        "created_at": "2020-08-01 12:03:20",
                        "updated_at": "2020-08-01 12:03:20",
                        "reply_list": [
                            {
                                "id": 69,
                                "post_id": 1,
                                "user_id": 1,
                                "to_user_id": 2,
                                "comment_id": 67,
                                "content": "帖子评论回复",
                                "praise_num": 0,
                                "status": 1,
                                "created_at": "2020-08-01 12:08:16",
                                "updated_at": "2020-08-01 12:08:16",
                                "to_user": {
                                    "id": 2,
                                    "nick": "来日奋斗让",
                                    "avatar": "http:\/\/daodao.shenruxiang.com\/sns\/post\/cd28b7505f3d539879ea2dda5a9b121d.jpg"
                                }
                            }
                        ]
                    },
                    {
                        "id": 68,
                        "post_id": 1,
                        "user_id": 1,
                        "to_user_id": 2,
                        "comment_id": 1,
                        "content": "帖子评论回复",
                        "praise_num": 0,
                        "status": 1,
                        "created_at": "2020-08-01 12:06:38",
                        "updated_at": "2020-08-01 12:06:38",
                        "reply_list": []
                    },
                    {
                        "id": 69,
                        "post_id": 1,
                        "user_id": 1,
                        "to_user_id": 2,
                        "comment_id": 67,
                        "content": "帖子评论回复",
                        "praise_num": 0,
                        "status": 1,
                        "created_at": "2020-08-01 12:08:16",
                        "updated_at": "2020-08-01 12:08:16",
                        "reply_list": []
                    }
                ]
            },
            {
                "id": 2,
                "title": "帖子标题2",
                "content": "帖子内容",
                "images": [
                    {
                        "src": "http:\/\/daodao.shenruxiang.com\/sns\/post\/cd28b7505f3d539879ea2dda5a9b121d.jpg",
                        "thumb_src": "http:\/\/daodao.shenruxiang.com\/\/sns\/post\/cd28b7505f3d539879ea2dda5a9b121d.jpg?imageView2\/2\/w\/600\/h\/600\/q\/75"
                    },
                    {
                        "src": "http:\/\/daodao.shenruxiang.com\/sns\/post\/d80a95beede76095240e053890b3a086.jpg",
                        "thumb_src": "http:\/\/daodao.shenruxiang.com\/\/sns\/post\/d80a95beede76095240e053890b3a086.jpg?imageView2\/2\/w\/600\/h\/600\/q\/75"
                    }
                ],
                "user_id": 1,
                "praise_num": 1,
                "comment_num": 3,
                "share_num": 0,
                "collect_num": 1,
                "view_num": 5,
                "created_at": "2020-08-01 19:34:33",
                "updated_at": "2020-08-01 12:21:15",
                "status": 1,
                "post_comment": []
            }
        ],
        "first_page_url": "http:\/\/www.questionapi.com:8888\/api\/v1\/user\/userCommentedList?page=1",
        "from": 1,
        "next_page_url": null,
        "path": "http:\/\/www.questionapi.com:8888\/api\/v1\/user\/userCommentedList",
        "per_page": 10,
        "prev_page_url": null,
        "to": 2
    }
}

HTTP Request

POST api/v1/user/userCommentedList

Body Parameters

Parameter Type Status Description
user_id integer required 用户id
token integer required 用户token
page integer required 页数

matchRecordList

知识竞赛自测记录列表


Requires authentication

Example request:

curl -X POST \
    "http://sns.shenruxiang.com/api/v1/user/matchRecordList" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"user_id":9,"token":16,"page":16}'
const url = new URL(
    "http://sns.shenruxiang.com/api/v1/user/matchRecordList"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "user_id": 9,
    "token": 16,
    "page": 16
}

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post(
    'http://sns.shenruxiang.com/api/v1/user/matchRecordList',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'user_id' => 9,
            'token' => 16,
            'page' => 16,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

{
    "code": 0,
    "msg": "请求成功",
    "data": [
        {
            "id": 1,
            "user_id": 1,
            "match_id": 1,
            "score": 11,
            "start_time": null,
            "end_time": "2020-08-01 10:16:01",
            "created_at": "2020-08-01 10:14:53",
            "updated_at": "2020-08-01 10:16:01",
            "match": {
                "id": 1,
                "title": "测评一",
                "sort": 1,
                "hot": 0,
                "desc": "疫情心理健康自评量表描述",
                "introduce": "疫情心理健康自评量表介绍",
                "introduce_src": "http:\/\/daodao.shenruxiang.com\/fangao_about.png",
                "introduce_src_type": "1",
                "src": "http:\/\/daodao.shenruxiang.com\/fangao_about.png",
                "src_type": 1,
                "join_num": 11,
                "duration": 60,
                "created_at": "2020-08-01 15:13:48",
                "updated_at": "2020-08-01 15:13:48"
            }
        },
        {
            "id": 2,
            "user_id": 1,
            "match_id": 1,
            "score": 0,
            "start_time": null,
            "end_time": null,
            "created_at": "2020-08-01 10:14:58",
            "updated_at": "2020-08-01 10:14:58",
            "match": {
                "id": 1,
                "title": "测评一",
                "sort": 1,
                "hot": 0,
                "desc": "疫情心理健康自评量表描述",
                "introduce": "疫情心理健康自评量表介绍",
                "introduce_src": "http:\/\/daodao.shenruxiang.com\/fangao_about.png",
                "introduce_src_type": "1",
                "src": "http:\/\/daodao.shenruxiang.com\/fangao_about.png",
                "src_type": 1,
                "join_num": 11,
                "duration": 60,
                "created_at": "2020-08-01 15:13:48",
                "updated_at": "2020-08-01 15:13:48"
            }
        }
    ]
}

HTTP Request

POST api/v1/user/matchRecordList

Body Parameters

Parameter Type Status Description
user_id integer required 用户id
token integer required 用户token
page integer required 页数

healthRecordList

健康自测记录列表


Requires authentication

Example request:

curl -X POST \
    "http://sns.shenruxiang.com/api/v1/user/healthRecordList" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"user_id":9,"token":11,"page":5}'
const url = new URL(
    "http://sns.shenruxiang.com/api/v1/user/healthRecordList"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "user_id": 9,
    "token": 11,
    "page": 5
}

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post(
    'http://sns.shenruxiang.com/api/v1/user/healthRecordList',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'user_id' => 9,
            'token' => 11,
            'page' => 5,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

{
    "code": 0,
    "msg": "请求成功",
    "data": [
        {
            "id": 1,
            "user_id": 1,
            "health_id": 1,
            "score": 11,
            "start_time": null,
            "end_time": "2020-08-01 10:16:01",
            "created_at": "2020-08-01 10:14:53",
            "updated_at": "2020-08-01 10:16:01",
            "health": {
                "id": 1,
                "cate_id": 1,
                "title": "测评一",
                "sort": 1,
                "hot": 0,
                "desc": "疫情心理健康自评量表描述",
                "introduce": "疫情心理健康自评量表介绍",
                "introduce_src": "http:\/\/daodao.shenruxiang.com\/fangao_about.png",
                "introduce_src_type": "1",
                "src": "http:\/\/daodao.shenruxiang.com\/fangao_about.png",
                "src_type": 1,
                "join_num": 11,
                "duration": 60,
                "created_at": "2020-08-01 15:13:48",
                "updated_at": "2020-08-01 15:13:48"
            }
        },
        {
            "id": 2,
            "user_id": 1,
            "health_id": 1,
            "score": 0,
            "start_time": null,
            "end_time": null,
            "created_at": "2020-08-01 10:14:58",
            "updated_at": "2020-08-01 10:14:58",
            "health": {
                "id": 1,
                "cate_id": 1,
                "title": "测评一",
                "sort": 1,
                "hot": 0,
                "desc": "疫情心理健康自评量表描述",
                "introduce": "疫情心理健康自评量表介绍",
                "introduce_src": "http:\/\/daodao.shenruxiang.com\/fangao_about.png",
                "introduce_src_type": "1",
                "src": "http:\/\/daodao.shenruxiang.com\/fangao_about.png",
                "src_type": 1,
                "join_num": 11,
                "duration": 60,
                "created_at": "2020-08-01 15:13:48",
                "updated_at": "2020-08-01 15:13:48"
            }
        },
        {
            "id": 3,
            "user_id": 1,
            "health_id": 1,
            "score": 0,
            "start_time": "2020-08-01 10:52:18",
            "end_time": null,
            "created_at": "2020-08-01 10:52:18",
            "updated_at": "2020-08-01 10:52:18",
            "health": {
                "id": 1,
                "cate_id": 1,
                "title": "测评一",
                "sort": 1,
                "hot": 0,
                "desc": "疫情心理健康自评量表描述",
                "introduce": "疫情心理健康自评量表介绍",
                "introduce_src": "http:\/\/daodao.shenruxiang.com\/fangao_about.png",
                "introduce_src_type": "1",
                "src": "http:\/\/daodao.shenruxiang.com\/fangao_about.png",
                "src_type": 1,
                "join_num": 11,
                "duration": 60,
                "created_at": "2020-08-01 15:13:48",
                "updated_at": "2020-08-01 15:13:48"
            }
        },
        {
            "id": 4,
            "user_id": 1,
            "health_id": 1,
            "score": 0,
            "start_time": "2020-08-01 10:52:57",
            "end_time": null,
            "created_at": "2020-08-01 10:52:57",
            "updated_at": "2020-08-01 10:52:57",
            "health": {
                "id": 1,
                "cate_id": 1,
                "title": "测评一",
                "sort": 1,
                "hot": 0,
                "desc": "疫情心理健康自评量表描述",
                "introduce": "疫情心理健康自评量表介绍",
                "introduce_src": "http:\/\/daodao.shenruxiang.com\/fangao_about.png",
                "introduce_src_type": "1",
                "src": "http:\/\/daodao.shenruxiang.com\/fangao_about.png",
                "src_type": 1,
                "join_num": 11,
                "duration": 60,
                "created_at": "2020-08-01 15:13:48",
                "updated_at": "2020-08-01 15:13:48"
            }
        },
        {
            "id": 5,
            "user_id": 1,
            "health_id": 1,
            "score": 0,
            "start_time": "2020-08-01 10:52:58",
            "end_time": null,
            "created_at": "2020-08-01 10:52:58",
            "updated_at": "2020-08-01 10:52:58",
            "health": {
                "id": 1,
                "cate_id": 1,
                "title": "测评一",
                "sort": 1,
                "hot": 0,
                "desc": "疫情心理健康自评量表描述",
                "introduce": "疫情心理健康自评量表介绍",
                "introduce_src": "http:\/\/daodao.shenruxiang.com\/fangao_about.png",
                "introduce_src_type": "1",
                "src": "http:\/\/daodao.shenruxiang.com\/fangao_about.png",
                "src_type": 1,
                "join_num": 11,
                "duration": 60,
                "created_at": "2020-08-01 15:13:48",
                "updated_at": "2020-08-01 15:13:48"
            }
        },
        {
            "id": 6,
            "user_id": 1,
            "health_id": 1,
            "score": 11,
            "start_time": "2020-08-01 10:53:24",
            "end_time": "2020-08-01 10:53:52",
            "created_at": "2020-08-01 10:53:24",
            "updated_at": "2020-08-01 10:53:52",
            "health": {
                "id": 1,
                "cate_id": 1,
                "title": "测评一",
                "sort": 1,
                "hot": 0,
                "desc": "疫情心理健康自评量表描述",
                "introduce": "疫情心理健康自评量表介绍",
                "introduce_src": "http:\/\/daodao.shenruxiang.com\/fangao_about.png",
                "introduce_src_type": "1",
                "src": "http:\/\/daodao.shenruxiang.com\/fangao_about.png",
                "src_type": 1,
                "join_num": 11,
                "duration": 60,
                "created_at": "2020-08-01 15:13:48",
                "updated_at": "2020-08-01 15:13:48"
            }
        }
    ]
}

HTTP Request

POST api/v1/user/healthRecordList

Body Parameters

Parameter Type Status Description
user_id integer required 用户id
token integer required 用户token
page integer required 页数

gameRecordList

游戏记录列表


Requires authentication

Example request:

curl -X POST \
    "http://sns.shenruxiang.com/api/v1/user/gameRecordList" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"user_id":6,"token":18,"page":14}'
const url = new URL(
    "http://sns.shenruxiang.com/api/v1/user/gameRecordList"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "user_id": 6,
    "token": 18,
    "page": 14
}

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post(
    'http://sns.shenruxiang.com/api/v1/user/gameRecordList',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'user_id' => 6,
            'token' => 18,
            'page' => 14,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

{
    "code": 0,
    "msg": "请求成功",
    "data": [
        {
            "id": 1,
            "user_id": 1,
            "match_id": 1,
            "score": 11,
            "start_time": null,
            "end_time": "2020-08-01 10:16:01",
            "created_at": "2020-08-01 10:14:53",
            "updated_at": "2020-08-01 10:16:01",
            "match": {
                "id": 1,
                "title": "测评一",
                "sort": 1,
                "hot": 0,
                "desc": "疫情心理健康自评量表描述",
                "introduce": "疫情心理健康自评量表介绍",
                "introduce_src": "http:\/\/daodao.shenruxiang.com\/fangao_about.png",
                "introduce_src_type": "1",
                "src": "http:\/\/daodao.shenruxiang.com\/fangao_about.png",
                "src_type": 1,
                "join_num": 11,
                "duration": 60,
                "created_at": "2020-08-01 15:13:48",
                "updated_at": "2020-08-01 15:13:48"
            }
        },
        {
            "id": 2,
            "user_id": 1,
            "match_id": 1,
            "score": 0,
            "start_time": null,
            "end_time": null,
            "created_at": "2020-08-01 10:14:58",
            "updated_at": "2020-08-01 10:14:58",
            "match": {
                "id": 1,
                "title": "测评一",
                "sort": 1,
                "hot": 0,
                "desc": "疫情心理健康自评量表描述",
                "introduce": "疫情心理健康自评量表介绍",
                "introduce_src": "http:\/\/daodao.shenruxiang.com\/fangao_about.png",
                "introduce_src_type": "1",
                "src": "http:\/\/daodao.shenruxiang.com\/fangao_about.png",
                "src_type": 1,
                "join_num": 11,
                "duration": 60,
                "created_at": "2020-08-01 15:13:48",
                "updated_at": "2020-08-01 15:13:48"
            }
        }
    ]
}

HTTP Request

POST api/v1/user/gameRecordList

Body Parameters

Parameter Type Status Description
user_id integer required 用户id
token integer required 用户token
page integer required 页数

userPraiseList

用户点赞列表


Requires authentication

Example request:

curl -X POST \
    "http://sns.shenruxiang.com/api/v1/user/userPraiseList" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"user_id":16,"token":17,"page":13}'
const url = new URL(
    "http://sns.shenruxiang.com/api/v1/user/userPraiseList"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "user_id": 16,
    "token": 17,
    "page": 13
}

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post(
    'http://sns.shenruxiang.com/api/v1/user/userPraiseList',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'user_id' => 16,
            'token' => 17,
            'page' => 13,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

{
    "code": 0,
    "msg": "请求成功",
    "data": {
        "current_page": 1,
        "data": [
            {
                "id": 114,
                "post_id": 2,
                "comment_id": 0,
                "user_id": 1,
                "to_user_id": 2,
                "type": 1,
                "created_at": "2020-05-05 01:05:17",
                "updated_at": "2020-05-05 01:05:17",
                "read_status": 1,
                "deleted_at": null,
                "to_user": {
                    "id": 2,
                    "nick": "来日奋斗让",
                    "avatar": "http:\/\/daodao.shenruxiang.com\/sns\/post\/cd28b7505f3d539879ea2dda5a9b121d.jpg"
                }
            },
            {
                "id": 193,
                "post_id": 67,
                "comment_id": 34,
                "user_id": 1,
                "to_user_id": 2,
                "type": 1,
                "created_at": "2020-05-12 01:34:16",
                "updated_at": "2020-05-12 01:34:16",
                "read_status": 1,
                "deleted_at": null,
                "to_user": {
                    "id": 2,
                    "nick": "来日奋斗让",
                    "avatar": "http:\/\/daodao.shenruxiang.com\/sns\/post\/cd28b7505f3d539879ea2dda5a9b121d.jpg"
                }
            },
            {
                "id": 213,
                "post_id": 110,
                "comment_id": 0,
                "user_id": 1,
                "to_user_id": 2,
                "type": 1,
                "created_at": "2020-07-23 13:05:08",
                "updated_at": "2020-07-23 13:05:08",
                "read_status": 1,
                "deleted_at": null,
                "to_user": {
                    "id": 2,
                    "nick": "来日奋斗让",
                    "avatar": "http:\/\/daodao.shenruxiang.com\/sns\/post\/cd28b7505f3d539879ea2dda5a9b121d.jpg"
                }
            },
            {
                "id": 217,
                "post_id": 110,
                "comment_id": 64,
                "user_id": 1,
                "to_user_id": 3,
                "type": 2,
                "created_at": "2020-07-23 13:17:02",
                "updated_at": "2020-07-23 13:17:02",
                "read_status": 1,
                "deleted_at": null,
                "to_user": {
                    "id": 3,
                    "nick": "haha",
                    "avatar": ""
                }
            },
            {
                "id": 218,
                "post_id": 1,
                "comment_id": 0,
                "user_id": 1,
                "to_user_id": 1,
                "type": 1,
                "created_at": "2020-08-01 12:10:46",
                "updated_at": "2020-08-01 12:10:46",
                "read_status": 1,
                "deleted_at": null,
                "to_user": {
                    "id": 1,
                    "nick": "来日方长",
                    "avatar": "http:\/\/daodao.shenruxiang.com\/sns\/post\/cd28b7505f3d539879ea2dda5a9b121d.jpg"
                }
            }
        ],
        "first_page_url": "http:\/\/www.questionapi.com:8888\/api\/v1\/user\/userPraiseList?page=1",
        "from": 1,
        "next_page_url": null,
        "path": "http:\/\/www.questionapi.com:8888\/api\/v1\/user\/userPraiseList",
        "per_page": 10,
        "prev_page_url": null,
        "to": 5
    }
}

HTTP Request

POST api/v1/user/userPraiseList

Body Parameters

Parameter Type Status Description
user_id integer required 用户id
token integer required 用户token
page integer optional 页数

userAdvisoryOrder

用户预约列表


Requires authentication

Example request:

curl -X POST \
    "http://sns.shenruxiang.com/api/v1/user/userAdvisoryOrder" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"user_id":2,"token":3,"page":4}'
const url = new URL(
    "http://sns.shenruxiang.com/api/v1/user/userAdvisoryOrder"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "user_id": 2,
    "token": 3,
    "page": 4
}

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post(
    'http://sns.shenruxiang.com/api/v1/user/userAdvisoryOrder',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'user_id' => 2,
            'token' => 3,
            'page' => 4,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

{
    "code": 0,
    "msg": "请求成功",
    "data": {
        "current_page": 1,
        "data": [
            {
                "id": 1,
                "user_id": 1,
                "advisory_id": 1,
                "status": 1,
                "created_at": "2020-08-01 12:47:04",
                "updated_at": "2020-08-01 12:47:41",
                "order_at": "2020-08-01 20:31:40",
                "advisory": {
                    "id": 1,
                    "user_id": 1,
                    "name": "沈老师",
                    "avatar": "http:\/\/daodao.shenruxiang.com\/sns\/post\/cd28b7505f3d539879ea2dda5a9b121d.jpg",
                    "job": "心理工作者",
                    "org": "王者联盟",
                    "tel": "13012796666",
                    "desc": "这是老师的描述",
                    "created_at": "2020-08-01 20:31:40",
                    "updated_at": "2020-08-01 20:31:40"
                }
            }
        ],
        "first_page_url": "http:\/\/www.questionapi.com:8888\/api\/v1\/user\/userAdvisoryOrder?page=1",
        "from": 1,
        "next_page_url": null,
        "path": "http:\/\/www.questionapi.com:8888\/api\/v1\/user\/userAdvisoryOrder",
        "per_page": 10,
        "prev_page_url": null,
        "to": 1
    }
}

HTTP Request

POST api/v1/user/userAdvisoryOrder

Body Parameters

Parameter Type Status Description
user_id integer required 用户id
token integer required 用户token
page integer optional 页数

userCollectList

用户收藏列表


Requires authentication

Example request:

curl -X POST \
    "http://sns.shenruxiang.com/api/v1/user/userCollectList" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"user_id":11,"token":1,"page":6}'
const url = new URL(
    "http://sns.shenruxiang.com/api/v1/user/userCollectList"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "user_id": 11,
    "token": 1,
    "page": 6
}

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post(
    'http://sns.shenruxiang.com/api/v1/user/userCollectList',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'user_id' => 11,
            'token' => 1,
            'page' => 6,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

{
    "code": 0,
    "msg": "请求成功",
    "data": {
        "current_page": 1,
        "data": [
            {
                "id": 4,
                "post_id": 1,
                "user_id": 1,
                "created_at": "2020-08-01 12:21:15",
                "updated_at": "2020-08-01 12:21:15",
                "to_user_id": 1,
                "post": {
                    "id": 1,
                    "title": "帖子标题1",
                    "content": "帖子内容",
                    "images": [
                        {
                            "src": "http:\/\/daodao.shenruxiang.com\/sns\/post\/cd28b7505f3d539879ea2dda5a9b121d.jpg",
                            "thumb_src": "http:\/\/daodao.shenruxiang.com\/\/sns\/post\/cd28b7505f3d539879ea2dda5a9b121d.jpg?imageView2\/2\/w\/600\/h\/600\/q\/75"
                        },
                        {
                            "src": "http:\/\/daodao.shenruxiang.com\/sns\/post\/d80a95beede76095240e053890b3a086.jpg",
                            "thumb_src": "http:\/\/daodao.shenruxiang.com\/\/sns\/post\/d80a95beede76095240e053890b3a086.jpg?imageView2\/2\/w\/600\/h\/600\/q\/75"
                        }
                    ],
                    "user_id": 1,
                    "praise_num": 1,
                    "comment_num": 3,
                    "share_num": 0,
                    "collect_num": 1,
                    "view_num": 5,
                    "created_at": "2020-08-01 19:34:33",
                    "updated_at": "2020-08-01 12:21:15",
                    "status": 1
                }
            }
        ],
        "first_page_url": "http:\/\/www.questionapi.com:8888\/api\/v1\/user\/userCollectList?page=1",
        "from": 1,
        "next_page_url": null,
        "path": "http:\/\/www.questionapi.com:8888\/api\/v1\/user\/userCollectList",
        "per_page": 10,
        "prev_page_url": null,
        "to": 2
    }
}

HTTP Request

POST api/v1/user/userCollectList

Body Parameters

Parameter Type Status Description
user_id integer required 用户id
token integer required 用户token
page integer optional 页数

api/v1/user/userReplyDel


Requires authentication

Example request:

curl -X POST \
    "http://sns.shenruxiang.com/api/v1/user/userReplyDel" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "http://sns.shenruxiang.com/api/v1/user/userReplyDel"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post(
    'http://sns.shenruxiang.com/api/v1/user/userReplyDel',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

HTTP Request

POST api/v1/user/userReplyDel

api/v1/user/userReplyList


Requires authentication

Example request:

curl -X POST \
    "http://sns.shenruxiang.com/api/v1/user/userReplyList" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "http://sns.shenruxiang.com/api/v1/user/userReplyList"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post(
    'http://sns.shenruxiang.com/api/v1/user/userReplyList',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

HTTP Request

POST api/v1/user/userReplyList

matchRecordInfo

知识竞赛自测记录详情


Requires authentication

Example request:

curl -X POST \
    "http://sns.shenruxiang.com/api/v1/user/matchRecordInfo" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"user_id":15,"token":12,"record_id":13}'
const url = new URL(
    "http://sns.shenruxiang.com/api/v1/user/matchRecordInfo"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "user_id": 15,
    "token": 12,
    "record_id": 13
}

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post(
    'http://sns.shenruxiang.com/api/v1/user/matchRecordInfo',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'user_id' => 15,
            'token' => 12,
            'record_id' => 13,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

{
    "code": 0,
    "msg": "请求成功",
    "data": {
        "id": 1,
        "user_id": 1,
        "match_id": 1,
        "score": 11,
        "score_level": "优秀",
        "question": "",
        "start_time": "2020-08-01 10:16:01",
        "end_time": "2020-08-01 10:16:01",
        "created_at": "2020-08-01 10:14:53",
        "updated_at": "2020-08-01 10:16:01",
        "match": {
            "id": 1,
            "title": "比平时更加积极的分享一些自己认为  有用的或是感到触动的疫情相关知识",
            "desc": "疫情心理健康自评量表描述",
            "sort": 1,
            "hot": 0,
            "introduce": "比平时更加积极的分享一些自己认为用的或是感到触动的疫情相关知识",
            "introduce_src": "\/uploads\/image\/20200810\/2020081004262330.png",
            "introduce_src_type": 1,
            "src": "\/uploads\/image\/20200810\/2020081004262330.png",
            "src_type": 1,
            "join_num": 11,
            "click_num": 0,
            "share_num": 0,
            "duration": 60,
            "created_at": "2020-08-01 15:13:48",
            "updated_at": "2020-08-01 15:13:48"
        }
    }
}

HTTP Request

POST api/v1/user/matchRecordInfo

Body Parameters

Parameter Type Status Description
user_id integer required 用户id
token integer required 用户token
record_id integer required 记录id

gameRecordInfo

游戏记录详情


Requires authentication

Example request:

curl -X POST \
    "http://sns.shenruxiang.com/api/v1/user/gameRecordInfo" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"user_id":3,"token":6,"record_id":13}'
const url = new URL(
    "http://sns.shenruxiang.com/api/v1/user/gameRecordInfo"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "user_id": 3,
    "token": 6,
    "record_id": 13
}

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post(
    'http://sns.shenruxiang.com/api/v1/user/gameRecordInfo',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'user_id' => 3,
            'token' => 6,
            'record_id' => 13,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

{
    "code": 0,
    "msg": "请求成功",
    "data": {
        "id": 1,
        "game_id": 1,
        "user_id": 1,
        "summary": "sdfsd ",
        "start_at": "2020-08-10 21:02:39",
        "end_at": "2020-08-10 21:02:41",
        "data_json": "1231",
        "created_at": null,
        "updated_at": null,
        "game": {
            "id": 1,
            "title": "注意力训练",
            "desc": "通过简洁的游戏训练提高儿童的注意力",
            "image": "\/uploads\/image\/20200810\/2020081011012145.jpg",
            "introduction": "本部分属于训练提升模块中训练游戏,通过简洁的游戏训练提高儿童的注意力,经验表明保持一段时间的训练注意力能显著提升。",
            "guide": "接下来我们会看到一张打乱数字顺序的表格,在保持正确的情况下尽可能快的按顺序点击数字,注意不要出错哦。",
            "duration": 60,
            "join_num": 0,
            "sort": 0,
            "created_at": "2020-08-02 16:16:11",
            "updated_at": "2020-08-02 16:16:13"
        }
    }
}

HTTP Request

POST api/v1/user/gameRecordInfo

Body Parameters

Parameter Type Status Description
user_id integer required 用户id
token integer required 用户token
record_id integer required 记录id

healthRecordInfo

健康自测记录详情


Requires authentication

Example request:

curl -X POST \
    "http://sns.shenruxiang.com/api/v1/user/healthRecordInfo" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"user_id":12,"token":1,"record_id":2}'
const url = new URL(
    "http://sns.shenruxiang.com/api/v1/user/healthRecordInfo"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "user_id": 12,
    "token": 1,
    "record_id": 2
}

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post(
    'http://sns.shenruxiang.com/api/v1/user/healthRecordInfo',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'user_id' => 12,
            'token' => 1,
            'record_id' => 2,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

{
    "code": 0,
    "msg": "请求成功",
    "data": {
        "id": 7,
        "user_id": 54,
        "health_id": 4,
        "score": 11,
        "score_level": "良好",
        "question": "",
        "start_time": "2020-08-01 10:53:24",
        "end_time": "2020-08-01 10:53:52",
        "created_at": "2020-07-17 10:53:24",
        "updated_at": "2020-08-01 10:53:52",
        "health": {
            "id": 4,
            "cate_id": 2,
            "title": "健康自测测评题目",
            "sort": 1,
            "hot": 0,
            "desc": "健康自测测评题目",
            "introduce": "健康自测测评题目",
            "introduce_src": "\/uploads\/image\/20200810\/2020081010123791.png",
            "introduce_src_type": "1",
            "src": "\/uploads\/image\/20200810\/2020081010122018.png",
            "src_type": 1,
            "join_num": 0,
            "click_num": 0,
            "share_num": 0,
            "duration": 100,
            "created_at": null,
            "updated_at": null
        }
    }
}

HTTP Request

POST api/v1/user/healthRecordInfo

Body Parameters

Parameter Type Status Description
user_id integer required 用户id
token integer required 用户token
record_id integer required 记录id