feed_back
Updated: 2022-08-16 14:47:23
Submit Feedback
Initialization
import { FeedBack } from '@polyv/interactions-receive-sdk';
const feedBackSdk = new FeedBack();
// 销毁 SDK 实例,清除逻辑
feedBackSdk.destroy();
Get Verification Code
Retrieve the verification code required for submitting feedback. Upon success, it will return the captchaId and captchaDataURI.
await feedBackSdk.getcode();
Submit Complaint Feedback
After the user completes the form, the following interface can be used to submit the information to the system backend.
await feedBackSdk.feedbackSave({
/** 反馈类型,必填 */
type: string;
/** 所属分类,必填 */
label: string;
/** 验证码ID,必填 */
captchaId: string;
/** 验证码值,必填 */
captchaValue: string;
/** 反馈详细内容 */
content: string;
/** 联系方式 */
contact: string;
/** 图片,数组格式,binary文件 */
imageFiles: string[];
});
Note
If the complaint feedback SDK is no longer needed, call the destroy method of the SDK instance to destroy it.
