import { Result } from '../../types'; export interface Data { isCompleted: boolean; } export interface Params { success: (data: Result) => void; } /** * * @name readpdf * @title 本方法默认自动开启,需要获取状态只需要监听此接口,在pdf关闭时回调 * @param {Function} success - pdf关闭时回调 * @return {string} code - 200:成功 | 404:失败 * @return {string} msg - 响应信息 * @return {Object} data - Location模型 * @since 6.0.0 * @cb success({ code: 200, // 响应code, 200:成功 | 404:失败 msg: '', // 响应信息 data: true, // 是否完成阅读(阅读到最后一页) }) * @fragment * featch(params, callback) { return suplink.readpdf({ success: callback }) } * @example * import { readpdf } from '@suplink/jssdk'; * * readpdf({ success: (result) => console.log(result) }) */ export default function readpdf(params: Params): Promise;