| 客户端 | Android | iOS |
|---|---|---|
| 支持说明 | 支持 | 支持 |
import { MDownloader } from "@yl/super-jssdk";
MDownloader.interruptDownload(optional)
| 参数 | 类型 | 必填 | 作用 |
|---|---|---|---|
| optional | Object | 是 | 必填参数 |
optional
| 参数 | 类型 | 必填 | 作用 |
|---|---|---|---|
| queueId | string | 是 | 下载队列的id(通过下载队列的start回调取得) |
| 参数 | 类型 | 作用 |
|---|---|---|
| resolve | Function | 完成回调 |
| reject(err) | Function | 失败回调,err为详细错误信息,是一个json对象,例如:{"errCode":-1,"errMsg":"出错啦"} |
MDownloader.interruptDownload({queueId: '123'})
.then() => {
console.log("success", res);
})
.catch((err) => {
console.log("fail", err);
});