dlt.setKeepScreenOn
Introduction
Sets whether to keep the screen on. It only takes effect in the current mini-program and becomes invalid after leaving the mini-program.
Parameters
Object object
Property | Type | Default | Required | Description |
---|---|---|---|---|
keepScreenOn | Boolean | Yes | Whether to keep the screen on | |
success | function | No | Callback function for a successful API call | |
fail | function | No | Callback function for a failed API call | |
complete | function | No | Callback function for the end of an API call (executed regardless of success or failure) |
Sample Code
dlt.setKeepScreenOn({
keepScreenOn: true,
success: function (res) {},
fail: function (res) {},
complete: function (res) {},
});