> For the complete documentation index, see [llms.txt](https://polyv.gitbook.io/document/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://polyv.gitbook.io/document/docs/live/js/new-sdk/interactions-receive-sdk/sdk/feed_back.md).

# Feed Back

## 初始化

```javascript
import { FeedBack } from '@polyv/interactions-receive-sdk';

const feedBackSdk = new FeedBack();
// 销毁 SDK 实例，清除逻辑
feedBackSdk.destroy();
```

### 获取验证码

获取投诉反馈中需要用到的验证码，成功后将返回 captchaId 和 captchaDataURI

```javascript
await feedBackSdk.getcode();
```

### 提交投诉反馈

用户填写完成后，可以使用以下接口，将信息提交至系统后台。

```javascript
await feedBackSdk.feedbackSave({
  /** 反馈类型，必填 */
  type: string;
  /** 所属分类，必填 */
  label: string;
  /** 验证码ID，必填 */
  captchaId: string;
  /** 验证码值，必填 */
  captchaValue: string;
  /** 反馈详细内容 */
  content: string;
  /** 联系方式 */
  contact: string;
  /** 图片，数组格式，binary文件 */
  imageFiles: string[];
});
```

### 注意

如果不需要再使用投诉反馈SDK时，请调用SDK实例的destroy方法去销毁实例。


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://polyv.gitbook.io/document/docs/live/js/new-sdk/interactions-receive-sdk/sdk/feed_back.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
