dlt.queryShortcutExists
Introduction
This API is used to query whether the mini-program has been added to the desktop.
Parameters
Object object
| Property | Type | Default | Required | Description | 
|---|---|---|---|---|
| success | function | No | Callback function that is called when the query is successful. | |
| fail | function | No | Callback function that is called when the interface call fails. | |
| complete | function | No | Callback function that is called when the interface call is complete, whether it succeeds or fails. | 
Return Value
| Property | Type | Description | 
|---|---|---|
| isExist | Boolean | Whether the mini-program has been added to the desktop. true if added, false if not added. | 
| latestShowTime | Number | Timestamp of the most recent prompt to add to the desktop, in milliseconds. | 
Sample Code
Page({
  onLoad() {
    dlt.queryShortcutExists({
      success: function (res) {},
      fail: function (res) {},
      complete: function (res) {},
    });
  },
});