dlt.queryShortcutExists
简介
用于查询是否已经添加到桌面的 API。
参数
Object object
| 属性 | 类型 | 默认值 | 必填 | 说明 |
|---|---|---|---|---|
| success | function | 否 | 接口调用成功的回调函数 | |
| fail | function | 否 | 接口调用失败的回调函数 | |
| complete | function | 否 | 接口调用结束的回调函数(调用成功、失败都会执行) |
返回值
| 属性 | 类型 | 描述 |
|---|---|---|
| isExist | Boolean | 是否已经添加到桌面 true 已经添加,false 未添加 |
| latestShowTime | Number | 最近一次弹出添加到桌面的时间戳 单位毫秒 |
示例代码
Page({
onLoad() {
dlt.queryShortcutExists({
success: function (res) {},
fail: function (res) {},
complete: function (res) {},
});
},
});