NAV
json

Video PROJECT API WIKI 文档

video Project Platform API WIKI 是视频报价平台服务的API文档

接口调用的参数格式

目前接口部分使用 HTTPBody 来进行参数传递,接口支持 application/jsonBody 格式

同时也支持 application/x-www-form-urlencoded 的 Body 格式

两种方式均需要在 Header 中注明内容类型的属性。

请勿使用from-data传递Payload

鉴权

接口使用的是基于 rfc6750Bearer Token 基于JWT来进行鉴权

我们的Bearer Token 使用的是,在实际业务中并不需要每次调用接口前都去获取Token

Token的有效期内可以直接用现有的Token进行接口调用,目前我们的Token 有效期为24小时,过期后则立即失效。此外客户端也可以对Token进行自解,来判断token有效期

访问需要鉴权的接口共需要两步:

  1. 判断当前Token是否存在或过期,若有异常则重新通过登录授权接口获取Token 。(通过账号密码进行验证,移动端额外需要设备唯一标识传至头部信息)
  2. 在Http Header中携带已保存的Token
  3. 头部信息描述 key为Authorization value为登陆接口返回的Token

接口返回说明

第一层 http code返回码,目前常见返回码如下

Http code 说明
200 调用成功
400 调用失败,返回自定义错误
401 鉴权失败
403 权限不足,没有调用权限
500 服务器本身出错

第二层 接口返回内容中的status和error字段

对于status,我们有如下规定

错误说明

error

为字符串,会给出status的具体错误原因描述,可信赖字段,可直接展示至前端页面

errors

为一个对象,会给出api_code的具体错误原因描述,这个字段适用于程序开发中的错误调试,不应该把他的返回内容作为代码逻辑判断的条件。也不应直接在前端页面显示。

示例

{
    "api_code": 1002,
    "errors": {
        "account": " account 不能为空",
        "code": " code 不能为空"
    }
}

api_code 说明

code码 说明 备注
101 接口成功返回
1001 参数无效
1002 参数为空
1003 参数类型错误
2001 用户未登录,访问的路径需要验证,请登录
2002 账号不存在或密码错误
2003 账号已被禁用
2004 用户不存在
2005 用户已存在
3001 样片分类不存在
3002 样片分类已存在
3003 样片分类

接口地址说明

http https
线下 http://47.107.239.240:8481
预发布
正式 http://120.25.235.220:8481

系统鉴权

获取Bearer Token

GET_BEARER_TOKEN

获取系统中所使用的token

POST: /api/access/token

--header 'Content-Type: application/json'

--data-raw: json json { "account":"admin", "password":"123456" }

Request Body:

{
  "account":"13333891144",
  "password":"123456"
}

Response Body :

{
  "api_code": 101,
  "data": {
    "aud": "MQ==",
    "nickname": "guest1",
    "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiIsImtpZCI6InZpZGVvLXByb2plY3QtYXBpIn0.eyJhdWQiOiJNUT09Iiwibmlja25hbWUiOiJndWVzdDEiLCJpc3MiOiJ2aWRlb19wcm9qZWN0X2FwaSIsInN1YiI6ImFjcF93ZWJfdXNlciIsImlkZW50IjoiZjQ4ZWE4N2ExODVmNDJkNjg2ZGEyYWU0YTk4MDA4NjYiLCJpYXQiOjE2NTQwNTc2MjEsImV4cCI6MTY1NDY2MjQyMX0.iAhY631jidSGOxrS3jJ1Wi_IXIfQZkcTBanIEZk5UfA",
    "ident": "f48ea87a185f42d686da2ae4a9800866",
    "token_method": "HS256",
    "token_type": "Bearer",
    "expire_time": 1654662421
  }
}

Token Payload:

{
    "aud": "MQ==",
    "nickname": "guest1",
    "iss": "video_project_api",
    "sub": "video_project_user",
    "iat": 1573116338,
    "exp": 1573119938
}

HTTP Method

POST

HTTP Request

/api/access/token

Request Parameters Query

Request Parameters Body

Title Description Type Tips
account 账号 String 账号默认 admin
password 密码 String 默认123456

Response Data

Title Description Type Tips
api_code int 101 请求成功
aud string 用户base64 id
nickname string 用户昵称
token string token字符串
token_method string 加密方式
token_type string token 的类型,目前应该固定为 Bearer
expire_time int 过期时间
ident string 登录唯一凭证

Payload

Title Description Type Tips
aud string 用户base64 id
nickname string 用户昵称
iss string 颁发方
sub int 使用方
iat int 颁发时间
exp int 过期时间

Log

日期 作者 内容
202/5/30 李世星 新增

客户管理

获取客户列表

GET_CUSTOMER_LIST

获取客户列表 GET: /api/customer

Request Body :

Response Body :

{
  "api_code": 101,
  "current_page": 1,
  "last_page": 1,
  "per_page": 20,
  "total": 20,
  "data": [
    {
      "id": 1,
      "grade": 1,
      "model": "爱集微",
      "relation_id": "简介",
      "relation_name": "xxxxx",
      "relation_type": 1,
      "sample_labels": [
        {
          "id": 2,
          "name": "二级分类一",
          "parent_id": 1,
          "pull_name": "分类一/二级分类一"
        },
        {
          "id": 3,
          "name": "二级分类二",
          "parent_id": 1,
          "pull_name": "分类一/二级分类二"
        }
      ],
      "sample_duration": "10分钟以上",
      "sample_performer": "无需演员",
      "sample_standard": "日常级",
      "address": "北京市-海淀区",
      "company_name": "爱集微",
      "phone": "13333891144",
      "created_at": 1654508768,
      "status": "跟进中",
      "follow_up": "李世星"
    }
  ]
}

HTTP Method

GET

HTTP Request

/api/customer

Request Parameters Query

Parameter Description Type Required Explain
address 所在地区 string 所在地区
status 跟进状态 int
start_ctime 开始创建时间 int 开始创建时间 10位时间戳
end_ctime 结束创建时间 int 结束创建时间 10位时间戳
model 报名方式 int 报名方式
follow_up 跟进人 String 跟进人

Request Parameters Body

Response Data

Title Description Type Tips
api_code 请求返回业务状态码 Int 成功返回 101 1001参数无效 1002参数为空 1003 参数类型错误 详情见 api_code 说明
error 请求返回业务错误描述 String
errors 请求参数错误描述 String
data 返回列表 Array

data

Title Description Type Tips
id label ID Int 分类ID
model 报名方式
relation_id 样片或套餐ID Int
relation_name 样片或套餐名称 String
relation_type 关系类型 Int
sample_labels 样片分类 Sample_labels Object
sample_duration 样片时长 String
sample_performer 演出人员 String
sample_standard 制片标准 String
address 客户地址 String
company_name 客户名称 String
phone 客户电话 Int
created_at 发布时间 Int
status 状态 String
follow_up 跟进人 String

sample_labels

Title Description Type Tips
id 分类ID Int
name 分类名称 String
parent_id 父级分类ID Int
pull_name 分类全名称 String
created_at 分类创建时间 Int

Log

日期 作者 内容
2022/6/2 李世星 新增

导出客户报价excel表

GET_CUSTOMER_LIST_EXPORT

获取客户列表 GET: /api/customers/export

Request Body :

Response Body : fileStream 客户报价信息.xlsx

HTTP Method

GET

HTTP Request

/api/customers/export

Request Parameters Query

Parameter Description Type Required Explain
address 所在地区 string 所在地区
status 是否启用 int
start_ctime 开始创建时间 int 开始创建时间 10位时间戳
end_ctime 结束创建时间 int 结束创建时间 10位时间戳
model 报名方式 int 报名方式

Request Parameters Body

Response Data

Title Description Type Tips
api_code 请求返回业务状态码 Int 成功返回 101 1001参数无效 1002参数为空 1003 参数类型错误 详情见 api_code 说明
error 请求返回业务错误描述 String
errors 请求参数错误描述 String

Log

日期 作者 内容
2022/6/2 李世星 新增

查看客户报价详情

UPDATE_CUSTOMER

查看客户报价详情 GET: /api/customer/{customer_id}

Request Body :

Response Body :

{
  "api_code": 101,
  "data": {
    "id": 1,
    "grade": 1,
    "model": "爱集微",
    "relation_id": "简介",
    "relation_name": "xxxx",
    "relation_type": 1,
    "sample_labels": [
      {
        "id": 2,
        "name": "二级分类一",
        "parent_id": 1,
        "pull_name": "分类一/二级分类一"
      },
      {
        "id": 3,
        "name": "二级分类二",
        "parent_id": 1,
        "pull_name": "分类一/二级分类二"
      }
    ],
    "sample_duration": "10分钟以上",
    "sample_performer": "无需演员",
    "sample_standard": "日常级",
    "address": "北京市-海淀区",
    "company_name": "爱集微",
    "phone": "13333891144",
    "created_at": 1654508768,
    "status": "跟进中",
    "follow_up": "李世星"
  }
}

HTTP Method

GET

HTTP Request

/api/customer/{customer_id}

Request Parameters Query

Request Parameters Body

Parameter Description Type Required Explain
status 状态 Int 跟进状态
follow_up 跟进人 String

Response Data

Title Description Type Tips
api_code 请求返回业务状态码 Int 成功返回 101 1001参数无效 1002参数为空 1003 参数类型错误 详情见 api_code 说明
error 请求返回业务错误描述 String
errors 请求参数错误描述 String
data 返回列表 Array

data

Title Description Type Tips
id label ID Int 分类ID
model 报名方式
relation_id 样片或套餐ID Int
relation_name 样片或套餐名称 String
relation_type 关系类型 Int
sample_labels 样片分类 Sample_labels Object
sample_duration 样片时长 String
sample_performer 演出人员 String
sample_standard 制片标准 String
address 客户地址 String
company_name 客户名称 String
phone 客户电话 Int
created_at 发布时间 Int
status 状态 String
follow_up 跟进人 String

sample_labels

Title Description Type Tips
id 分类ID Int
name 分类名称 String
parent_id 父级分类ID Int
pull_name 分类全名称 String
created_at 分类创建时间 Int

Log

日期 作者 内容
2022/6/2 李世星 新增

修改客户报价信息

UPDATE_CUSTOMER

修改客户报价信息 PUT: /api/customer/{customer_id}

Request Body :

{
  "status": 1,
  "follow_up": "李哈哈"
}

Response Body :

{
  "api_code": 101,
  "data": {
    "id": 1,
    "grade": 1,
    "model": "爱集微",
    "relation_id": "简介",
    "relation_name": "xxxxx",
    "sample_labels": [
      {
        "id": 2,
        "name": "二级分类一",
        "parent_id": 1,
        "pull_name": "分类一/二级分类一"
      },
      {
        "id": 3,
        "name": "二级分类二",
        "parent_id": 1,
        "pull_name": "分类一/二级分类二"
      }
    ],
    "sample_duration": "10分钟以上",
    "sample_performer": "无需演员",
    "sample_standard": "日常级",
    "address": "北京市-海淀区",
    "company_name": "爱集微",
    "phone": "13333891144",
    "created_at": 1654508768,
    "status": "跟进中",
    "follow_up": "李世星"
  }
}

HTTP Method

PUT

HTTP Request

/api/customer/{customer_id}

Request Parameters Query

Request Parameters Body

Parameter Description Type Required Explain
status 状态 Int 跟进状态
follow_up 跟进人 String

Response Data

Title Description Type Tips
api_code 请求返回业务状态码 Int 成功返回 101 1001参数无效 1002参数为空 1003 参数类型错误 详情见 api_code 说明
error 请求返回业务错误描述 String
errors 请求参数错误描述 String
data 返回列表 Array

data

Title Description Type Tips
id label ID Int 分类ID
model 报名方式
relation_id 样片或套餐ID Int
relation_name 样片或套餐名称 String
relation_type 关系类型 Int
sample_labels 样片分类 Sample_labels Object
sample_duration 样片时长 String
sample_performer 演出人员 String
sample_standard 制片标准 String
address 客户地址 String
company_name 客户名称 String
phone 客户电话 Int
created_at 发布时间 Int
status 状态 String
follow_up 跟进人 String

sample_labels

Title Description Type Tips
id 分类ID Int
name 分类名称 String
parent_id 父级分类ID Int
pull_name 分类全名称 String
created_at 分类创建时间 Int

Log

日期 作者 内容
2022/6/2 李世星 新增

获取询问方式

GET_CUSTOMER_ASK_MODE_LIST

置顶样片 GET: /api/customer/ask_mode

Request Body :

Response Body :

{
  "api_code": 101,
  "data": [
    {
      "id": 1,
      "name": "一键报价"
    },
    {
      "id": 2,
      "name": "套餐咨询"
    },
    {
      "id": 3,
      "name": "成功案例咨询"
    },
    {
      "id": 4,
      "name": "右侧浮窗报价"
    }
  ]
}

HTTP Method

GET

HTTP Request

/api/customer/ask_mode

Request Parameters Query

Request Parameters Body

Response Data

Title Description Type Tips
api_code 请求返回业务状态码 Int 成功返回 101 1001参数无效 1002参数为空 1003 参数类型错误 详情见 api_code 说明
error 请求返回业务错误描述 String
errors 请求参数错误描述 String
data 返回列表 Array

data

Title Description Type Tips
id ID Int 报价方式ID
name 报价方式

Log

日期 作者 内容
2022/6/2 李世星 新增

获取跟进状态

GET_CUSTOMER_FOLLOW_STATUS_LIST

置顶样片 GET: /api/customer/follow_status

Request Body :

Response Body :

{
  "api_code": 101,
  "data": [
    {
      "id": 1,
      "name": "未联系"
    },
    {
      "id": 2,
      "name": "跟进中"
    },
    {
      "id": 3,
      "name": "已结束,已成交"
    },
    {
      "id": 4,
      "name": "已结束,未成交"
    },
    {
      "id": 5,
      "name": "其他"
    }
  ]
}

HTTP Method

GET

HTTP Request

/api/customer/follow_status

Request Parameters Query

Request Parameters Body

Response Data

Title Description Type Tips
api_code 请求返回业务状态码 Int 成功返回 101 1001参数无效 1002参数为空 1003 参数类型错误 详情见 api_code 说明
error 请求返回业务错误描述 String
errors 请求参数错误描述 String
data 返回列表 Array

data

Title Description Type Tips
id ID Int
name 跟进状态

Log

日期 作者 内容
2022/6/2 李世星 新增

录入客户报价信息

ADD_CUSTOMER_OF_CUSTOMER

录入客户报价信息 POST: /api/external/customer

Request Body :

{
    "model_id": 2,
    "company_name":"爱集微",
    "company_phone":13333891144,
    "relation_id":3,
    "relation_type":2,
    "company_address":"北京海淀区永丰南路"
}

Response Body :

{
  "api_code": 101,
  "data": {
    "id": 10,
    "model": "套餐咨询",
    "relation_id": 3,
    "relation_name": "海鲜自助168一位",
    "sample_labels": [],
    "sample_duration": 0,
    "sample_performer": "",
    "sample_standard": "",
    "address": "北京海淀区永丰南路",
    "company_name": "爱集微",
    "phone": "13333891144",
    "created_at": 1656577841,
    "status": 0,
    "follow_status": "未联系",
    "follow_up": ""
  }
}

HTTP Method

POST

HTTP Request

/api/external/customer

Request Parameters Query

Parameter Description Type Required Explain
model_id 报价模型 int 1 一键报价 2套餐报价 3成功案例报价 4右侧浮窗报价
company_name 公司名称 String
company_phone 公司联系方式 String
company_address 公司地址 String
relation_id 报价关联模型Id int
relation_type 报价关联模型Type int 1 为 样片 2为 套餐 不填写关联不起作用
sample_duration 样片时长 int
performer 演出人员 string
standard 制片标准 string

Request Parameters Body

Response Data

Title Description Type Tips
api_code 请求返回业务状态码 Int 成功返回 101 1001参数无效 1002参数为空 1003 参数类型错误 详情见 api_code 说明
error 请求返回业务错误描述 String
errors 请求参数错误描述 String
data 返回列表 Array

data

Title Description Type Tips
id label ID Int 分类ID
model 报名方式
relation_id 样片或套餐ID Int
relation_name 样片或套餐名称 String
relation_type 关系类型 Int
sample_labels 样片分类 Sample_labels Object
sample_duration 样片时长 String
sample_performer 演出人员 String
sample_standard 制片标准 String
address 客户地址 String
company_name 客户名称 String
phone 客户电话 Int
created_at 发布时间 Int
status 状态 String
follow_up 跟进人 String

sample_labels

Title Description Type Tips
id 分类ID Int
name 分类名称 String
parent_id 父级分类ID Int
pull_name 分类全名称 String
created_at 分类创建时间 Int

Log

日期 作者 内容
2022/6/30 李世星 新增

套餐管理

获取套餐列表

GET_PACKAGE_LIST

获取客户列表 GET: /api/package

Request Body :

Response Body :

{
  "api_code": 101,
  "current_page": 1,
  "last_page": 1,
  "per_page": 20,
  "total": 20,
  "data": [
    {
      "id": 1,
      "grade": 1,
      "name": "套餐一",
      "intro": "简介",
      "cover": "http://xxxx.com.cn/xxx.jpg",
      "price": 2000,
      "notes": "介绍服务",
      "content": "<div><span>11122333</span></div>",
      "created_at": 1654508768
    }
  ]
}

HTTP Method

GET

HTTP Request

/api/package

Request Parameters Query

Parameter Description Type Required Explain
name 套餐名称 string 套餐名称
intro 套餐简介 int 套餐简介
start_ctime 开始创建时间 int 开始创建时间 10位时间戳
end_ctime 结束创建时间 int 结束创建时间 10位时间戳
min_price 最小报价 int 最小报价
max_price 最大报价 int 最大报价

Request Parameters Body

Response Data

Title Description Type Tips
api_code 请求返回业务状态码 Int 成功返回 101 1001参数无效 1002参数为空 1003 参数类型错误 详情见 api_code 说明
error 请求返回业务错误描述 String
errors 请求参数错误描述 String
data 返回列表 Array

data

Title Description Type Tips
id package ID Int 套餐ID
grade 套餐编号 Int
name 套餐名称 String
intro 套餐简介 String
cover 主题图 String
price 价格 Int
notes 服务介绍 String
content 套餐详情 String
created_at 创建时间 Int

Log

日期 作者 内容
2022/6/2 李世星 新增

添加套餐

ADD_PACKAGE

添加套餐 POST: /api/package

Request Body

{
  "name": "套餐一",
  "intro": "李哈哈",
  "cover": "http://xxx.com.cn/xxx.jpg",
  "price": 400,
  "notes": "ffff",
  "content": "<div><a>aaaaaa</a></div>"
}

Response Body

{
  "api_code": 101,
  "data": {
    "id": 1,
    "grade": 1,
    "name": "套餐一",
    "intro": "简介",
    "cover": "http://xxxx.com.cn/xxx.jpg",
    "price": 2000,
    "notes": "介绍服务",
    "content": "<div><span>11122333</span></div>",
    "created_at": 1654508768
  }
}

HTTP Method

POST

HTTP Request

/api/package

Request Parameters Query

Request Parameters Body

Parameter Description Type Required Explain
name 套餐名字 String 套餐名字
intro 套餐简介 String
cover 主题图 String
price 报价 Int
notes 服务 String
content 详情 String

Response Data

Title Description Type Tips
api_code 请求返回业务状态码 Int 成功返回 101 1001参数无效 1002参数为空 1003 参数类型错误 详情见 api_code 说明
error 请求返回业务错误描述 String
errors 请求参数错误描述 String
data 返回列表 Array

data

Title Description Type Tips
id package ID Int 套餐ID
grade 套餐编号 Int
name 套餐名称 String
intro 套餐简介 String
cover 主题图 String
price 价格 Int
notes 服务介绍 String
content 套餐详情 String
created_at 创建时间 Int

Log

日期 作者 内容
2022/6/2 李世星 新增

套餐详情

GET_PACKAGE_INFO

套餐详情 GET: /api/package/{package_id}

Request Body :

Response Body :

{
  "api_code": 101,
  "data": {
    "id": 1,
    "grade": 1,
    "name": "套餐一",
    "intro": "简介",
    "cover": "http://xxxx.com.cn/xxx.jpg",
    "price": 2000,
    "notes": "介绍服务",
    "content": "<div><span>11122333</span></div>",
    "created_at": 1654508768
  }
}

HTTP Method

GET

HTTP Request

/api/package/{package_id}

Request Parameters Query

Request Parameters Body

Response Data

Title Description Type Tips
api_code 请求返回业务状态码 Int 成功返回 101 1001参数无效 1002参数为空 1003 参数类型错误 详情见 api_code 说明
error 请求返回业务错误描述 String
errors 请求参数错误描述 String
data 返回列表 Array

data

Title Description Type Tips
id package ID Int 套餐ID
grade 套餐编号 Int
name 套餐名称 String
intro 套餐简介 String
cover 主题图 String
price 价格 Int
notes 服务介绍 String
content 套餐详情 String
created_at 创建时间 Int

Log

日期 作者 内容
2022/6/2 李世星 新增

修改套餐

UPDATE_PACKAGE

修改套餐 PUT: /api/package/{package_id}

Request Body :

{
  "name": "套餐一",
  "intro": "李哈哈",
  "cover": "http://xxx.com.cn/xxx.jpg",
  "price": 400,
  "notes": "ffff",
  "content": "<div><a>aaaaaa</a></div>",
  "switch_id": 3
}

Response Body :

{
  "api_code": 101,
  "data": {
    "id": 1,
    "grade": 1,
    "name": "套餐一",
    "intro": "简介",
    "cover": "http://xxxx.com.cn/xxx.jpg",
    "price": 2000,
    "notes": "介绍服务",
    "content": "<div><span>11122333</span></div>",
    "created_at": 1654508768
  }
}

HTTP Method

PUT

HTTP Request

/api/package/{package_id}

Request Parameters Query

Request Parameters Body

Parameter Description Type Required Explain
name 套餐名字 String 套餐名字
intro 套餐简介 String
cover 主题图 String
price 报价 Int
notes 服务 String
content 详情 String
switch_id 交换位置ID Int 交换位置的ID

Response Data

Title Description Type Tips
api_code 请求返回业务状态码 Int 成功返回 101 1001参数无效 1002参数为空 1003 参数类型错误 详情见 api_code 说明
error 请求返回业务错误描述 String
errors 请求参数错误描述 String
data 返回列表 Array

data

Title Description Type Tips
id package ID Int 套餐ID
grade 套餐编号 Int
name 套餐名称 String
intro 套餐简介 String
cover 主题图 String
price 价格 Int
notes 服务介绍 String
content 套餐详情 String
created_at 创建时间 Int

Log

日期 作者 内容
2022/6/2 李世星 新增

删除套餐

DELETE_SAMPLE

删除套餐 DELETE: /api/package/{package_id}

Request Body :

Response Body :

{
  "api_code": 101,
  "data": {
    "id": 1,
    "name": "套餐一"
  }
}

HTTP Method

DELETE

HTTP Request

/api/package/{package_id}

Request Parameters Query

Request Parameters Body

Response Data

Title Description Type Tips
api_code 请求返回业务状态码 Int 成功返回 101 1001参数无效 1002参数为空 1003 参数类型错误 详情见 api_code 说明
error 请求返回业务错误描述 String
errors 请求参数错误描述 String
data 返回列表 Array

data

Title Description Type Tips
id label ID Int 分类ID
name 套餐名称 String

Log

日期 作者 内容
2022/6/2 李世星 新增

置顶套餐

TOP_SAMPLE

置顶套餐 PUT: /api/package/{package_id}/top

Request Body :

Response Body :

{
  "api_code": 101,
  "data": {
    "id": 1,
    "name": "套餐一"
  }
}

HTTP Method

PUT

HTTP Request

/api/package/{package_id}

Request Parameters Query

Request Parameters Body

Response Data

Title Description Type Tips
api_code 请求返回业务状态码 Int 成功返回 101 1001参数无效 1002参数为空 1003 参数类型错误 详情见 api_code 说明
error 请求返回业务错误描述 String
errors 请求参数错误描述 String
data 返回列表 Array

data

Title Description Type Tips
id label ID Int 分类ID
name 套餐名称 String

Log

日期 作者 内容
2022/6/2 李世星 新增

样片管理

获取样片分类列表

GET_SAMPLE_LABEL_LIST

获取当前样片所使用分类列表 Get: /api/sample/labels

Response Body :

{
  "api_code": 101,
  "current_page": 1,
  "last_page": 1,
  "per_page": 20,
  "total": 20,
  "data": [
    {
      "id": 1,
      "name": "分类一",
      "grade": 1,
      "created_at": 1025486551,
      "is_enable": 1,
      "child_labels": [
        {
          "id": 2,
          "name": "子分类一",
          "grade": 1,
          "created_at": 1654508768,
          "full_name": "分类一/子分类一",
          "is_enable": 1
        },
        {
          "id": 3,
          "name": "子分类二",
          "grade": 2,
          "created_at": 1654508769,
          "full_name": "分类一/子分类二",
          "is_enable": 1
        }
      ]
    },
    {
      "id": 4,
      "name": "分类二",
      "grade": 2,
      "created_at": 1654508770,
      "is_enable": 1,
      "child_labels": [
        {
          "id": 5,
          "name": "子分类一",
          "grade": 1,
          "created_at": 1654508768,
          "full_name": "分类二/子分类一",
          "is_enable": 1
        },
        {
          "id": 6,
          "name": "子分类二",
          "grade": 2,
          "created_at": 1654508769,
          "full_name": "分类二/子分类二",
          "is_enable": 1
        }
      ]
    }
  ]
}

HTTP Method

GET

HTTP Request

/api/sample/labels

Request Parameters Query

Parameter Description Type Required Explain
name 分类名称 string 分类名称
is_enable 是否启用 int null 0 已禁用 1 启用
start_ctime 开始创建时间 string int 开始创建时间 10位时间戳
end_ctime 结束创建时间 string int 结束创建时间 10位时间戳

Request Parameters Body

Response Data

Title Description Type Tips
api_code 请求返回业务状态码 Int 成功返回 101 1001参数无效 1002参数为空 1003 参数类型错误 详情见 api_code 说明
error 请求返回业务错误描述 String
errors 请求参数错误描述 String
current_page 当前页 Int
last_page 最后一页 Int
per_page 每页数据数 Int
total 总数据数 Int
data 返回分类列表 Array

data

Title Description Type Tips
id label ID Int 分类ID
name 分类名称 String
grade 分类编号 Int
created_at 创建时间 Int
is_enable 启用状态 Int 0 关闭 1启动
child_labels 子分类 Array

child_labels

Title Description Type Tips
id label ID Int 分类ID
parent_id 父级分类ID Int
name 分类名称 String
grade 分类编号 Int
created_at 创建时间 Int
full_name 分类全称 String
is_enable 启用状态 Int 0 关闭 1启动

Log

日期 作者 内容
2022/6/1 李世星 新增

获取一级分类详情

GET_SAMPLE_LABEL_INFO

获取当前样片所使用分类详情 Get: /api/sample/label/{label_id}

Response Body :

{
  "api_code": 101,
  "data": {
    "id": 1,
    "grade": 1,
    "created_at": 1654508769,
    "is_enable": 1,
    "bg_url": "http://xxxx.com.cn/xxxx.jpg",
    "child_labels": [
      {
        "id": 2,
        "name": "子分类一",
        "parent_id": 1,
        "grade": 1,
        "pull_name": "分类一/子分类一",
        "created_at": 1654508770,
        "is_enable": 1
      },
      {
        "id": 3,
        "name": "子分类二",
        "parent_id": 1,
        "grade": 2,
        "pull_name": "分类一/子分类二",
        "created_at": 1654508770,
        "is_enable": 1
      }
    ]
  }
}

HTTP Method

GET

HTTP Request

/api/sample/label/{label_id}

Request Parameters Query

Request Parameters Body

Response Data

Title Description Type Tips
api_code 请求返回业务状态码 Int 成功返回 101 1001参数无效 1002参数为空 1003 参数类型错误 详情见 api_code 说明
error 请求返回业务错误描述 String
errors 请求参数错误描述 String
data 返回分类列表 Array

data

Title Description Type Tips
id label ID Int 分类ID
name 分类名称 String
grade 分类编号 Int
created_at 创建时间 Int
is_enable 启用状态 Int 0 关闭 1启动
bg_url 背景图片地址 String
child_labels 子分类 Array

child_labels

Title Description Type Tips
id label ID Int 分类ID
parent_id 父级分类ID Int
name 分类名称 String
grade 分类编号 Int
pull_name 分类全称 String
created_at 创建时间 Int
is_enable 启用状态 Int 0 关闭 1启动

Log

日期 作者 内容
2022/6/1 李世星 新增

新增一级分类

ADD_SAMPLE_LABEL

获取当前样片所使用分类详情 POST: /api/sample/label

Request Body :

{
    "name": "一级分类名称",
    "bg_url": "一级分类背景图片",
    "child_labels": [
      {"name": "二级分类名称1"},
      {"name": "二级分类名称2"}
    ]
}

Response Body :

{
  "api_code": 101,
  "data": {
    "id": 1,
    "grade": 1,
    "created_at": 1654508769,
    "is_enable": 1,
    "bg_url": "http://xxxx.com.cn/xxxx.jpg",
    "child_labels": [
      {
        "id": 2,
        "name": "子分类一",
        "parent_id": 1,
        "grade": 1,
        "pull_name": "分类一/子分类一",
        "created_at": 1654508770,
        "is_enable": 1
      },
      {
        "id": 3,
        "name": "子分类二",
        "parent_id": 1,
        "grade": 2,
        "pull_name": "分类一/子分类二",
        "created_at": 1654508770,
        "is_enable": 1
      }
    ]
  }
}

HTTP Method

POST

HTTP Request

/api/sample/label

Request Parameters Query

Request Parameters Body

Parameter Description Type Required Explain
name 分类名称 String
bg_url 分类主题图 String
child_labels 子分类 array [{"name":"子分类一"},{"name":"子分类二"}]

Response Data

Title Description Type Tips
api_code 请求返回业务状态码 Int 成功返回 101 1001参数无效 1002参数为空 1003 参数类型错误 详情见 api_code 说明
error 请求返回业务错误描述 String
errors 请求参数错误描述 String
data 分类详情 Label Info

data

Title Description Type Tips
id label ID Int 分类ID
name 分类名称 String
grade 分类编号 Int
created_at 创建时间 Int
is_enable 启用状态 Int 0 关闭 1启动
bg_url 背景图片地址 String
child_labels 子分类 Array

child_labels

Title Description Type Tips
id label ID Int 分类ID
parent_id 父级分类ID Int
name 分类名称 String
grade 分类编号 Int
pull_name 分类全名称 String
created_at 创建时间 Int
is_enable 启用状态 Int 0 关闭 1启动

Log

日期 作者 内容
2022/6/1 李世星 新增

新增二级分类

ADD_SAMPLE_CHILD_LABEL

获取当前样片所使用分类详情 POST: /api/sample/label/{parent_id}/child_label

Request Body :

{
    "name": "二级分类名称"
}

Response Body :

{
  "api_code": 101,
  "data": {
    "id": 2,
    "name": "子分类一",
    "grade": 1,
    "created_at": 1654508768,
    "is_enable": 1,
    "pull_name": "分类一/子分类一",
    "own_count": 2
  }
}

HTTP Method

POST

HTTP Request

/api/sample/label/{parent_id}/child_label

Request Parameters Query

Request Parameters Body

Parameter Description Type Required Explain
name 分类名称 String

Response Data

Title Description Type Tips
api_code 请求返回业务状态码 Int 成功返回 101 1001参数无效 1002参数为空 1003 参数类型错误 详情见 api_code 说明
error 请求返回业务错误描述 String
errors 请求参数错误描述 String
data 分类详情 Label Info

data

Title Description Type Tips
id label ID Int 分类ID
name 分类名称 String
grade 分类编号 Int
created_at 创建时间 Int
is_enable 启用状态 Int 0 关闭 1启动
pull_name 分类全称 String
own_count 使用次数 Int

Log

日期 作者 内容
2022/6/1 李世星 新增

获取二级分类列表

GET_SAMPLE_CHILD_LABEL_LIST

获取二级分类列表 GET: /api/sample/label/{parent_id}/child_label

Response Body :

{
  "api_code": 101,
  "data": [
    {
      "id": 2,
      "name": "子分类一",
      "grade": 1,
      "pull_name": "分类一/子分类一",
      "created_at": 1654508768,
      "is_enable": 1,
      "own_count": 2
    },
    {
      "id": 3,
      "name": "子分类二",
      "grade": 2,
      "pull_name": "分类一/子分类二",
      "created_at": 1654508769,
      "is_enable": 1,
      "own_count": 2
    }
  ]
}

HTTP Method

GET

HTTP Request

/api/sample/label/{parent_id}/child_label

Request Parameters Query

Request Parameters Body

Response Data

Title Description Type Tips
api_code 请求返回业务状态码 Int 成功返回 101 1001参数无效 1002参数为空 1003 参数类型错误 详情见 api_code 说明
error 请求返回业务错误描述 String
errors 请求参数错误描述 String
current_page 当前页 Int
last_page 最后一页 Int
per_page 每页数据数 Int
total 总数据数 Int
data 二级分类列表 Array

data

Title Description Type Tips
id label ID Int 分类ID
name 分类名称 String
grade 分类编号 Int
pull_name 分类全名称 String
created_at 创建时间 Int
is_enable 启用状态 Int 0 关闭 1启动
own_count 使用次数 Int

Log

日期 作者 内容
2022/6/1 李世星 新增

获取二级分类列详情

GET_SAMPLE_CHILD_LABEL_INFO

获取二级分类详情 GET: /api/sample/label/{parent_id}/child_label/{label_id}

Response Body :

{
  "api_code": 101,
  "data": {
    "id": 2,
    "name": "子分类一",
    "grade": 1,
    "created_at": 1654508768,
    "is_enable": 1,
    "pull_name": "分类一/子分类一",
    "own_count": 2
  }
}

HTTP Method

GET

HTTP Request

/api/sample/label/{parent_id}/child_label/{label_id}

Request Parameters Query

Request Parameters Body

Response Data

Title Description Type Tips
api_code 请求返回业务状态码 Int 成功返回 101 1001参数无效 1002参数为空 1003 参数类型错误 详情见 api_code 说明
error 请求返回业务错误描述 String
errors 请求参数错误描述 String
data 二级分类详情 Label INFO Object

data

Title Description Type Tips
id label ID Int 分类ID
name 分类名称 String
grade 分类编号 Int
created_at 创建时间 Int
pull_name 分类全名称 String
is_enable 启用状态 Int 0 关闭 1启动
own_count 使用次数 Int

Log

日期 作者 内容
2022/6/1 李世星 新增

修改一级分类

UPDATE_SAMPLE_LABEL

修改一级分类 PUT: /api/sample/label/{label_id}

Request Body

{
    "name": "一级分类名称",
    "bg_url": "一级分类图片地址",
    "is_enable": 1,
    "switch_id": 101
}

Response Body :

{
  "api_code": 101,
  "data": {
    "id": 1,
    "grade": 1,
    "created_at": 1654508769,
    "is_enable": 1,
    "bg_url": "http://xxxx.com.cn/xxxx.jpg",
    "child_labels": [
      {
        "id": 2,
        "name": "子分类一",
        "parent_id": 1,
        "grade": 1,
        "pull_name": "分类一/子分类一",
        "created_at": 1654508770,
        "is_enable": 1
      },
      {
        "id": 3,
        "name": "子分类二",
        "parent_id": 1,
        "grade": 2,
        "pull_name": "分类一/子分类二",
        "created_at": 1654508770,
        "is_enable": 1
      }
    ]
  }
}

HTTP Method

PUT

HTTP Request

/api/sample/label/{label_id}

Request Parameters Query

Request Parameters Body

Title Description Type Required Tips
name 一级分类名称 String
bg_url 背景图片地址 String
is_enable 是否开启 Int 0为开启 1为启动
switch_id 交换位置ID Int 交换位置的ID

Response Data

Title Description Type Tips
api_code 请求返回业务状态码 Int 成功返回 101 1001参数无效 1002参数为空 1003 参数类型错误 详情见 api_code 说明
error 请求返回业务错误描述 String
errors 请求参数错误描述 String
data 一级分类详情 Label INFO Object

data

Title Description Type Tips
id label ID Int 分类ID
name 分类名称 String
grade 分类编号 Int
created_at 创建时间 Int
is_enable 启用状态 Int 0 关闭 1启动
bg_url 背景图片地址 String
child_labels 子分类 Array
own_count 使用次数 Int

child_labels

Title Description Type Tips
id label ID Int 分类ID
parent_id 父级分类ID Int
name 分类名称 String
grade 分类编号 Int
created_at 创建时间 Int
pull_name 分类全名称 String
is_enable 启用状态 Int 0 关闭 1启动
own_count 使用次数 Int

Log

日期 作者 内容
2022/6/1 李世星 新增

修改二级分类

UPDATE_SAMPLE_CHILD_LABEL

修改二级分类 PUT: /api/sample/label/{parent_id}/child_label/{child_id}

Request Body

{
    "name": "二级分类名称",
    "switch_id": 101
}

Response Body :

{
  "api_code": 101,
  "data": {
    "id": 2,
    "parent": {
      "id": 1,
      "name": "分类一",
      "grade": 1,
      "created_at": 1654508768,
      "is_enable": 1,
      "own_count": 1
    },
    "name": "子分类一",
    "grade": 1,
    "created_at": 1654508768,
    "is_enable": 1,
    "pull_name": "分类一/子分类一",
    "own_count": 2
  }
}

HTTP Method

PUT

HTTP Request

/api/sample/label/{parent_id}/child_label/{child_id}

Request Parameters Query

Request Parameters Body

Title Description Type Required Tips
name 一级分类名称 String
switch_id 交换位置ID Int 交换位置的ID

Response Data

Title Description Type Tips
api_code 请求返回业务状态码 Int 成功返回 101 1001参数无效 1002参数为空 1003 参数类型错误 详情见 api_code 说明
error 请求返回业务错误描述 String
errors 请求参数错误描述 String
data 二级分类详情 Label INFO Object

data

Title Description Type Tips
id label ID Int 分类ID
parent parent Object Array
name 分类名称 String
grade 分类编号 Int
created_at 创建时间 Int
own_count 使用次数 Int

parent

Title Description Type Tips
id label ID Int 分类ID
name 分类名称 String
grade 分类编号 Int
created_at 创建时间 Int
is_enable 启用状态 Int 0 关闭 1启动
own_count 使用次数 Int

Log

日期 作者 内容
2022/6/1 李世星 新增

删除二级分类

DELETE_SAMPLE_CHILD_LABEL

修改二级分类 DELETE: /api/sample/label/{parent_id}/child_label/{child_id}

Request Body

Response Body :

{
  "api_code": 101,
  "data": {
    "id": 1,
    "name": "二级分类一"
  }
}

HTTP Method

DELETE

HTTP Request

/api/sample/label/{parent_id}/child_label/{child_id}

Request Parameters Query

Request Parameters Body

Response Data

Title Description Type Tips
api_code 请求返回业务状态码 Int 成功返回 101 1001参数无效 1002参数为空 1003 参数类型错误 详情见 api_code 说明
error 请求返回业务错误描述 String
errors 请求参数错误描述 String
data 被删除分类 Array

data

Title Description Type Tips
id label ID Int 分类ID
name 分类名称 String

Log

日期 作者 内容
2022/6/1 李世星 新增

设置分类置顶

SET_SAMPLE_LABEL_TOP

设置分类置顶 PUT: /api/sample/label/{label_id}/top

Request Body

Response Body :

{
  "api_code": 101,
  "data": {
    "id": 1,
    "name": "二级分类一"
  }
}

HTTP Method

PUT

HTTP Request

/api/sample/label/{label_id}/top

Request Parameters Query

Request Parameters Body

Response Data

Title Description Type Tips
api_code 请求返回业务状态码 Int 成功返回 101 1001参数无效 1002参数为空 1003 参数类型错误 详情见 api_code 说明
error 请求返回业务错误描述 String
errors 请求参数错误描述 String
data 返回被置顶信息 Array

data

Title Description Type Tips
id label ID Int 分类ID
name 分类名称 String

Log

日期 作者 内容
2022/6/1 李世星 新增

样片列表

GET_SAMPLE_LIST

获取样片列表 GET: /api/sample

Request Body :

Response Body :

{
  "api_code": 101,
  "current_page": 1,
  "last_page": 1,
  "per_page": 20,
  "total": 20,
  "data": [
    {
      "id": 1,
      "name": "样片名称",
      "labels": [
        {
          "id": 1,
          "name": "二级分类一",
          "pull_name": "分类一/二级分类一",
          "parent_id": 1
        },
        {
          "id": 2,
          "name": "二级分类二",
          "pull_name": "分类一/二级分类二",
          "parent_id": 1
        }
      ],
      "intro": "样片介绍",
      "video_cover": "http://xxxxxx.com.cn/xxxx.jpg",
      "created_at": 1654508768,
      "grade": 1,
      "video_url": "http://xxxxx.com.cn/xxxx.mp4"
    }
  ]
}

HTTP Method

GET

HTTP Request

/api/sample

Request Parameters Query

Title Description Type Required Tips
name 案例名称 String
label_id 类别ID Int
own_type_code 所属归类 String 成功案例为 4a4c3e27 行业样片 b22c36e3
intro 简介 String
start_ctime 开始创建时间 int
end_ctime 结束创建时间 int

Request Parameters Body

Response Data

Title Description Type Tips
api_code 请求返回业务状态码 Int 成功返回 101 1001参数无效 1002参数为空 1003 参数类型错误 详情见 api_code 说明
error 请求返回业务错误描述 String
errors 请求参数错误描述 String
current_page 当前页 Int
last_page 最后一页 Int
per_page 每页数据数 Int
total 总数据数 Int
data 返回列表 Array

data

Title Description Type Tips
id label ID Int 分类ID
name 样片名称 String
labels 样片分类 Array labelInfo
intro 样片介绍 String
video_cover 样片封面地址 String
created_at 创建时间 int
grade 编号 Int
video_url 样片视频地址 String

labels | Title | Description | Type | Tips | | ----------- | ----------- | ------ | --------------------------------------------- | | id | 分类id | Int|| | name| 分类名称 | String|| | full_name| 分类全称| String || | parent_id| 父级分类Id| Int||

Log

日期 作者 内容
2022/6/2 李世星 新增

样片详情

GET_SAMPLE_INFO

获取样片详情 GET: /api/sample/{sample_id}/info

Request Body :

Response Body :

{
  "api_code": 101,
  "data":
    {
      "id": 1,
      "name": "样片名称",
      "labels": [
        {
          "id": 1,
          "name": "二级分类一",
          "pull_name": "分类一/二级分类一",
          "parent_id": 1,
          "enable": true
        },
        {
          "id": 2,
          "name": "二级分类二",
          "pull_name": "分类一/二级分类二",
          "parent_id": 1,
          "enable": true
        }
      ],
      "intro": "样片介绍",
      "video_cover": "http://xxxxxx.com.cn/xxxx.jpg",
      "created_at": 1654508768,
      "grade": 1,
      "video_url": "http://xxxxx.com.cn/xxxx.mp4"
    }
}

HTTP Method

GET

HTTP Request

/api/sample/{sample_id}/info

Request Parameters Query

Request Parameters Body

Response Data

Title Description Type Tips
api_code 请求返回业务状态码 Int 成功返回 101 1001参数无效 1002参数为空 1003 参数类型错误 详情见 api_code 说明
error 请求返回业务错误描述 String
errors 请求参数错误描述 String
data 返回列表 Array

data

Title Description Type Tips
id label ID Int 分类ID
name 样片名称 String
labels 样片分类 Array labelInfo
intro 样片介绍 String
video_cover 样片封面地址 String
created_at 创建时间 int
grade 编号 Int
video_url 样片视频地址 String

labels | Title | Description | Type | Tips | | ----------- | ----------- | ------ | --------------------------------------------- | | id | 分类id | Int|| | name| 分类名称 | String|| | full_name| 分类全称| String || | parent_id| 父级分类Id| Int|| | enable | 样片分类是否禁用 true 为启用 false 禁用|Bool||

Log

日期 作者 内容
2022/6/2 李世星 新增

修改样片

UPDATE_SAMPLE_INFO

获取样片列表 PUT: /api/sample/{sample_id}

Request Body :

{
   "name": "样片1",
   "labels": [12,11,14],
   "video_url": "http://xxxxx.com.cn/xxxx.mp4",
   "video_cover": "http://xxxx.com.cn/xxx.jpg",
   "switch_id": 3
}

Response Body :

{
  "api_code": 101,
  "data":
    {
      "id": 1,
      "name": "样片名称",
      "labels": [
        {
          "id": 1,
          "name": "二级分类一",
          "pull_name": "分类一/二级分类一",
          "parent_id": 1,
          "enable": true
        },
        {
          "id": 2,
          "name": "二级分类二",
          "pull_name": "分类一/二级分类二",
          "parent_id": 1,
          "enable": true
        }
      ],
      "intro": "样片介绍",
      "video_cover": "http://xxxxxx.com.cn/xxxx.jpg",
      "created_at": 1654508768,
      "grade": 1,
      "video_url": "http://xxxxx.com.cn/xxxx.mp4"
    }
}

HTTP Method

PUT

HTTP Request

/api/sample/{sample_id}

Request Parameters Query

Request Parameters Body

Title Description Type Required Tips
name 一级分类名称 String
labels 所属分类二级id Int
switch_id 交换位置ID Int 交换位置的ID
parent_label_id 一级分类ID Int 当交换一级下数据是需要填写隶属于哪个一级分类
video_url 视频url地址 String
video_cover 视频封面url地址 String

Response Data

Title Description Type Tips
api_code 请求返回业务状态码 Int 成功返回 101 1001参数无效 1002参数为空 1003 参数类型错误 详情见 api_code 说明
error 请求返回业务错误描述 String
errors 请求参数错误描述 String
data 返回列表 Array

data

Title Description Type Tips
id label ID Int 分类ID
name 样片名称 String
labels 样片分类 Array labelInfo
intro 样片介绍 String
video_cover 样片封面地址 String
created_at 创建时间 int
grade 编号 Int
video_url 样片视频地址 String

labels

Title Description Type Tips
id 分类id Int
name 分类名称 String
full_name 分类全称 String
parent_id 父级分类Id Int
enable 获取样片类型是否被禁用 true 正常 false 禁用 Bool

Log

日期 作者 内容
2022/6/2 李世星 新增

添加样片

ADD_SAMPLE

添加样片 POST: /api/sample

Request Body :

{
    "name": "样片1",
    "intro": "样片111111",
    "labels": [12,11,14],
    "video_url": "http://xxxxx.com.cn/xxxx.mp4",
    "video_cover": "http://xxxx.com.cn/xxx.jpg"
}

Response Body :

{
  "api_code": 101,
  "data":
    {
      "id": 1,
      "name": "样片名称",
      "labels": [
        {
          "id": 1,
          "name": "二级分类一",
          "pull_name": "分类一/二级分类一",
          "parent_id": 1
        },
        {
          "id": 2,
          "name": "二级分类二",
          "pull_name": "分类一/二级分类二",
          "parent_id": 1
        }
      ],
      "intro": "样片介绍",
      "video_cover": "http://xxxxxx.com.cn/xxxx.jpg",
      "created_at": 1654508768,
      "grade": 1,
      "video_url": "http://xxxxx.com.cn/xxxx.mp4"
    }
}

HTTP Method

POST

HTTP Request

/api/sample

Request Parameters Query

Request Parameters Body

Title Description Type Required Tips
own_type_code 所属归类 String 成功案例为 4a4c3e27 行业样片 b22c36e3
name 样片名称 String
labels 样片所属分类 Array [分类1Id,分类2Id]
intro 样片简介 String
video_url 视频url地址 String 视频url地址
video_cover 视频封面url地址 String

Response Data

Title Description Type Tips
api_code 请求返回业务状态码 Int 成功返回 101 1001参数无效 1002参数为空 1003 参数类型错误 详情见 api_code 说明
error 请求返回业务错误描述 String
errors 请求参数错误描述 String
data 返回列表 Array

data

Title Description Type Tips
id label ID Int 分类ID
name 样片名称 String
labels 样片分类 Array labelInfo
intro 样片介绍 String
video_cover 样片封面地址 String
created_at 创建时间 int
grade 编号 Int
video_url 样片视频地址 String

labels | Title | Description | Type | Tips | | ----------- | ----------- | ------ | --------------------------------------------- | | id | 分类id | Int|| | name| 分类名称 | String|| | full_name| 分类全称| String || | parent_id| 父级分类Id| Int||

Log

日期 作者 内容
2022/6/2 李世星 新增

删除样片

DELETE_SAMPLE

删除样片 DELETE: /api/sample/{sample_id}

Request Body :

Response Body :

{
  "api_code": 101,
  "data": {
    "id": 1,
    "name": "样片名称"
  }
}

HTTP Method

DELETE

HTTP Request

/api/sample/{sample_id}

Request Parameters Query

Request Parameters Body

Response Data

Title Description Type Tips
api_code 请求返回业务状态码 Int 成功返回 101 1001参数无效 1002参数为空 1003 参数类型错误 详情见 api_code 说明
error 请求返回业务错误描述 String
errors 请求参数错误描述 String
data 返回列表 Array

data

Title Description Type Tips
id label ID Int 分类ID
name 样片名称 String

Log

日期 作者 内容
2022/6/2 李世星 新增

置顶样片

TOP_SAMPLE

置顶样片 PUT: /api/sample/{sample_id}/top

Request Body :

Response Body :

{
  "api_code": 101,
  "data": {
    "id": 1,
    "name": "样片名称"
  }
}

HTTP Method

PUT

HTTP Request

/api/sample/{sample_id}/top

Request Parameters Query

Request Parameters Body

Response Data

Title Description Type Tips
api_code 请求返回业务状态码 Int 成功返回 101 1001参数无效 1002参数为空 1003 参数类型错误 详情见 api_code 说明
error 请求返回业务错误描述 String
errors 请求参数错误描述 String
data 返回列表 Array

data

Title Description Type Tips
id label ID Int 分类ID
name 样片名称 String

Log

日期 作者 内容
2022/6/2 李世星 新增

视频资讯

视频资讯列表

GET_VIDEO_NEWS_LIST

获取客户列表 GET: /api/video_news

Request Body :

HTTP Method

GET

HTTP Request

/api/video_news

Request Parameters Query

Parameter Description Type Required Explain
title 标题 string 标题
abstract 摘要 int 摘要
author 作者 int 作者
start_ctime 开始创建时间 int 开始创建时间 10位时间戳
end_ctime 结束创建时间 int 结束创建时间 10位时间戳

Request Parameters Body

Response Data

Title Description Type Tips
api_code 请求返回业务状态码 Int 成功返回 101 1001参数无效 1002参数为空 1003 参数类型错误 详情见 api_code 说明
error 请求返回业务错误描述 String
errors 请求参数错误描述 String
data 返回列表 Array

data

Title Description Type Tips
id package ID Int 套餐ID
grade 视频编号 Int
abstract 摘要 String
author 作者 String
cover 资讯封面图 String
video_url 视频地址 String
content 视频资讯内容 String
upload_time 上传时间 Int
created_at 创建时间 Int

Log

日期 作者 内容
2022/6/2 李世星 新增

视频资讯详情

GET_VIDEO_NEWS_INFO

获取客户列表 GET: /api/video_news/{video_news_id}

Request Body :

HTTP Method

GET

HTTP Request

/api/video_news/{video_news_id}

Request Body :

Response Body :

{
  "api_code": 101,
  "data": [
    {
      "id": 1,
      "grade": 1,
      "abstract": "xxxx",
      "authors": [
        {
          "id": 1,
          "name": "黎明"
        },
        {
          "id": 2,
          "name": "李世星"
        }
      ],
      "cover": "http://xxxx.com.cn/xxx.jpg",
      "video_url": "http://xxxx.com.cn/xxx.mp4",
      "content": "xxxxxxxx",
      "upload_time": "xxxx",
      "created_at": "日常级"
    }
  ]
}

Request Parameters Query

Request Parameters Body

Response Data

Title Description Type Tips
api_code 请求返回业务状态码 Int 成功返回 101 1001参数无效 1002参数为空 1003 参数类型错误 详情见 api_code 说明
error 请求返回业务错误描述 String
errors 请求参数错误描述 String
data 返回列表 Array

data

Title Description Type Tips
id video_news ID Int 套餐ID
grade 视频编号 Int
abstract 摘要 String
authors 作者 ArrayList authorObject
cover 资讯封面图 String
video_url 视频地址 String
content 视频资讯内容 String
upload_time 上传时间 Int
created_at 创建时间 Int

author Object

Title Description Type Tips
id author ID Int 作者ID
name 作者名称 String

Log

日期 作者 内容
2022/6/2 李世星 新增
2022/6/16 李世星 修改新增authors参数

新增视频资讯

ADD_VIDEO_NEWS

获取客户列表 POST: /api/video_news

Request Body :

{
  "title": "测试数据1",
  "abstract": "测试数据1111111",
  "authors": [
    "李世星",
    "李名",
    "李雷"
  ],
  "cover": "/xxx.jpg",
  "content": "<div>hahaha</div>",
  "video_url": "/xxxx.mp4"
}

HTTP Method

POST

HTTP Request

/api/video_news

Request Parameters Query

Parameter Description Type Required Explain
title 标题 String 标题
abstract 摘要 String 摘要
authors 作者 Array[StringItem,StringItem] 作者 ['作者名称']
cover 资讯封面 String
content 视频资讯内容 String
video_url 视频地址 String

Request Parameters Body

Response Data

Title Description Type Tips
api_code 请求返回业务状态码 Int 成功返回 101 1001参数无效 1002参数为空 1003 参数类型错误 详情见 api_code 说明
error 请求返回业务错误描述 String
errors 请求参数错误描述 String
data 返回列表 Array

data

Title Description Type Tips
id video_news ID Int 套餐ID
grade 视频编号 Int
abstract 摘要 String
authors 作者列表 Array author Object
cover 资讯封面图 String
video_url 视频地址 String
content 视频资讯内容 String
upload_time 上传时间 Int
created_at 创建时间 Int

author Object

Title Description Type Tips
id author ID Int 作者ID
name 作者名称 String

Log

日期 作者 内容
2022/6/2 李世星 新增
2022/6/16 李世星 新增authors参数

修改视频资源

UPDATE_VIDEO_NEWS

获取客户列表 PUT: /api/video_news/{video_news_id}

Request Body :

{
  "title": "xxxx",
  "abstract": "品牌文化",
  "authors": ["黎明","李世星"],
  "cover": "http://xxx.com.cn/xxx.jpg",
  "content": "<div><a>ffff</a></div>",
  "video_url": "http://xxx.com.cn/xxxx.mp4",
  "switch_id": 4
}

HTTP Method

PUT

HTTP Request

/api/video_news/{video_news_id}

Request Parameters Query

Parameter Description Type Required Explain
title 标题 String 标题
abstract 摘要 String 摘要
authors 作者列表 Array [StringItem,StringItem] 作者 ['作者名称']
cover 资讯封面 String
content 视频资讯内容 String
video_url 视频地址 String
switch_id 交换位置ID Int 交换位置的ID

Request Parameters Body

Response Data

Title Description Type Tips
api_code 请求返回业务状态码 Int 成功返回 101 1001参数无效 1002参数为空 1003 参数类型错误 详情见 api_code 说明
error 请求返回业务错误描述 String
errors 请求参数错误描述 String
data 返回列表 Array

data

Title Description Type Tips
id video_news ID Int 套餐ID
grade 视频编号 Int
abstract 摘要 String
authors 作者列表 Array author Object
cover 资讯封面图 String
video_url 视频地址 String
content 视频资讯内容 String
upload_time 上传时间 Int
created_at 创建时间 Int

author Object

Title Description Type Tips
id author ID Int 作者ID
name 作者名称 String

Log

日期 作者 内容
2022/6/2 李世星 新增

删除视频资讯

DELETE_VIDEO_NEWS

删除套餐 DELETE: /api/video_news/{video_news_id}

Request Body :

HTTP Method

DELETE

HTTP Request

/api/video_news/{video_news_id}

Request Parameters Query

Request Parameters Body

Response Data

Title Description Type Tips
api_code 请求返回业务状态码 Int 成功返回 101 1001参数无效 1002参数为空 1003 参数类型错误 详情见 api_code 说明
error 请求返回业务错误描述 String
errors 请求参数错误描述 String
data 返回列表 Array

data

Title Description Type Tips
id label ID Int 分类ID
name 视频资讯名称 String

Log

日期 作者 内容
2022/6/2 李世星 新增

获取作者列表

GET_AUTHOR_LIST

获取作者列表 DELETE: /api/author

Request Body :

{
  "api_code": 101,
  "data": [
    {
      "id": 1,
      "name": "黎明"
    },
    {
      "id": 2,
      "name": "李世星"
    }
  ]
}

HTTP Method

GET

HTTP Request

/api/author

Request Parameters Query

Parameter Description Type Required Explain
name 作者名称 string 作者名称

Request Parameters Body

Response Data

Title Description Type Tips
api_code 请求返回业务状态码 Int 成功返回 101 1001参数无效 1002参数为空 1003 参数类型错误 详情见 api_code 说明
error 请求返回业务错误描述 String
errors 请求参数错误描述 String
data 返回列表 Array

data

Title Description Type Tips
id author ID Int AUTHOR ID
name 作者名称 String

Log

日期 作者 内容
2022/6/2 李世星 新增

新增作者

ADD_AUTHOR

新增作者 POST: /api/author

Request Body :

{
  "api_code": 101,
  "data": {
    "id": 4,
    "name": "李星星2",
    "created_at": 1655369583
  }
}

HTTP Method

POST

HTTP Request

/api/author

Request Parameters Query

Request Parameters Body

Parameter Description Type Required Explain
name 作者名称 string 作者名称

Response Data

Title Description Type Tips
api_code 请求返回业务状态码 Int 成功返回 101 1001参数无效 1002参数为空 1003 参数类型错误 详情见 api_code 说明
error 请求返回业务错误描述 String
errors 请求参数错误描述 String
data 返回列表 Array

data

Title Description Type Tips
id author ID Int 作者ID
name 作者名称 String
created_at 创建时间 Int 1655369583 十位时间戳

Log

日期 作者 内容
2022/6/2 李世星 新增

修改作者

UPDATE_AUTHOR

删除套餐 PUT: /api/author/{author_id}

Request Body :

{
  "api_code": 101,
  "data": {
    "id": 4,
    "name": "李星星2",
    "created_at": 1655369583
  }
}

HTTP Method

PUT

HTTP Request

/api/author/{author_id}

Request Parameters Query

Request Parameters Body

Parameter Description Type Required Explain
name 作者名称 string 作者名称

Response Data

Title Description Type Tips
api_code 请求返回业务状态码 Int 成功返回 101 1001参数无效 1002参数为空 1003 参数类型错误 详情见 api_code 说明
error 请求返回业务错误描述 String
errors 请求参数错误描述 String
data 返回列表 Array

data

Title Description Type Tips
id author ID Int 作者ID
name 作者名称 String
created_at 创建时间 Int 1655369583 十位时间戳

Log

日期 作者 内容
2022/6/2 李世星 新增

删除作者

DELETE_AUTHOR

删除作者 DELETE: /api/author/{author_id}

Request Body :

HTTP Method

DELETE

HTTP Request

/api/author/{author_id}

Request Parameters Query

Request Parameters Body

Response Data

Title Description Type Tips
api_code 请求返回业务状态码 Int 成功返回 101 1001参数无效 1002参数为空 1003 参数类型错误 详情见 api_code 说明
error 请求返回业务错误描述 String
errors 请求参数错误描述 String
data 返回列表 Array

data

Title Description Type Tips
id author ID Int 作者ID
name 作者名称 String

Log

日期 作者 内容
2022/6/2 李世星 新增

七牛接口

获取七牛token

GET_QINIU_TOKEN

获取客户列表 GET: /api/qiniu/token

Request Body :

Response Body :

{
  "api_code": 101,
  "qiniu_token": "99vFAJy1wVeXiJdSV2BB-VHqOhgKrdRZydXfUv58:EB38gPLhyCYExdrLZyC7q3mc25k=:eyJzY29wZSI6Imppd2VpLW1hcmtldCIsImRlYWRsaW5lIjoxNjU0NzY5MzU4fQ=="
}

HTTP Method

GET

HTTP Request

/api/qiniu/token

Request Parameters Query

Request Parameters Body

Response Data

Title Description Type Tips
api_code 请求返回业务状态码 Int 成功返回 101 1001参数无效 1002参数为空 1003 参数类型错误 详情见 api_code 说明
error 请求返回业务错误描述 String
errors 请求参数错误描述 String
qiniu_token 返回七牛云token String

Log

日期 作者 内容
2022/6/2 李世星 新增

文档使用帮助

index.html.md文件中进行编辑目录和文档总体结构,然后在includes目录中添加对应的模块。

文档使用Markdown语言排版。

Markdown格式示例


# 标题
## 二级标题
### .......

​``` json
代码块
​```

表格
表头 | 表头 
---------- | -------
内容 | 内容 
内容 | 内容 

`Something`

表格

表头 表头
内容 内容
内容 内容

Json 是没有注释的 避免在json中写注释

Something 高亮

加粗 粗体

横线

下划线

斜体

链接

图片