add.md
3.99 KB
提交意见反馈
接口说明
-
接口名称:
addAPI -
接口路径:
/srv/?a=feedback&t=add - 请求方式: POST
-
调用示例:
addAPI({ category: '1', note: '反馈内容', images: 'url1,url2' })
请求参数
Body 参数(application/x-www-form-urlencoded)
| 参数名 | 类型 | 必填 | 说明 | 示例值 |
|---|---|---|---|---|
| category | string | 是 | 反馈类别。1=功能建议, 3=问题反馈, 7=其他问题 | "1" |
| note | string | 是 | 反馈内容 | "test" |
| images | array | 否 | 图片 URL 数组 | ["url1", "url2"] |
响应数据
成功响应
{
"code": 1,
"msg": "提交成功"
}
字段说明
| 字段名 | 类型 | 说明 |
|---|---|---|
| code | number | 状态码,1=成功 |
| msg | string | 消息描述 |
代码示例
import { addAPI } from '@/api/feedback'
// 提交意见反馈
const res = await addAPI({
category: '1', // 反馈类别:1=功能建议
note: '这是反馈内容', // 反馈内容
images: ['url1', 'url2', 'url3'] // 图片数组(可选)
})
if (res.code === 1) {
console.log('提交成功')
}
注意事项
-
category参数值说明:-
"1"- 功能建议 -
"3"- 问题反馈 -
"7"- 其他问题
-
images参数是可选的,直接传递图片 URL 数组后端统一返回格式为
{ code, msg },code === 1表示成功
OpenAPI Specification
openapi: 3.0.1
info:
title: ''
version: 1.0.0
paths:
/srv/:
post:
summary: 提交意见反馈
deprecated: false
description: ''
tags:
- 意见反馈
parameters:
- name: f
in: query
description: ''
required: true
example: jiangedianlv
schema:
type: string
- name: a
in: query
description: ''
required: true
example: common
schema:
type: string
- name: t
in: query
description: ''
required: true
example: submit_feedback
schema:
type: string
requestBody:
content:
application/x-www-form-urlencoded:
schema:
type: object
properties:
f:
example: manulife
type: string
a:
example: feedback
type: string
t:
example: add
type: string
category:
description: 反馈类别。1=功能建议, 3=问题反馈, 7=其他问题
example: '1'
type: string
note:
description: 反馈内容
example: test
type: string
images:
type: array
items:
type: string
description: 图片
required:
- f
- a
- t
- category
- note
- images
examples: {}
responses:
'200':
description: ''
content:
application/json:
schema:
type: object
properties:
code:
type: integer
msg:
type: string
required:
- code
- msg
x-apifox-orders:
- code
- msg
headers: {}
x-apifox-name: 成功
x-apifox-ordering: 0
security: []
x-apifox-folder: 意见反馈
x-apifox-status: testing
x-run-in-apifox: https://app.apifox.com/web/project/7792797/apis/api-413906671-run
components:
schemas: {}
responses: {}
securitySchemes: {}
servers: []
security: []