tencent cloud

All product documents
Tencent Cloud Super App as a Service
Basic Function
Last updated: 2024-11-28 10:37:30
Basic Function
Last updated: 2024-11-28 10:37:30

console

Print the log to the debug panel. console Is a global object that can be accessed directly. In the WeChat client, to vConsole Output log in.

method

Print to Debug Panel debug journal;
Print to Debug Panel log journal;
Print to Debug Panel info journal;
Print to Debug Panel warn journal;
Print to Debug Panel error journal;
Create a new grouping in the debug panel. Any subsequent output is indented to indicate that it belongs to the current group. call console.groupEnd after the group;
Ending by console.group Group created.

Be careful

Due to the limited functionality of vConsole and the variations in support for console methods across clients, it is recommended that developers only use the methods provided in this document in their mini programs.

Timer

setTimeout

This API uses number setTimeout(function callback, number delay, any rest)
Function: Set a timer. Execute the registered callback function after the timer expires.
Parameters and description:
function callback, callback function;
number delay, the delay time, the function will be called after the delay, in ms;
any rest, param1, param2, ... , paramN, etc., which are passed as arguments to the callback function.
Return value: number, the number of the timer, this value can be passed to clearTimeout to cancel the timer.

clearTimeout

The API method is clearTimeout(number timeoutID).
Function: cancels the timer set by setTimeout.
Arguments and description: number timeoutID, the ID of the timer to be cancelled.

setInterval

The API uses number setInterval(function callback, number delay, any rest)
Function: Set a timer. Execute the registered callback function according to the specified period (in milliseconds).
Parameters and description:
function callback, the callback function;
number delay, the time interval between the execution of the callback function, in ms;
any rest, param1, param2, ... , paramN and so on, which will be passed as parameters to the callback function.
Return value: number, the number of the timer, this value can be passed to clearInterval to cancel the timer.

clearInterval

The API method is clearInterval(number intervalID)
Function: cancels the timer set by setInterval.
Parameters and description: number intervalID, the ID of the timer to be cancelled.
Was this page helpful?
You can also Contact Sales or Submit a Ticket for help.
Yes
No

Feedback

Contact Us

Contact our sales team or business advisors to help your business.

Technical Support

Open a ticket if you're looking for further assistance. Our Ticket is 7x24 available.

7x24 Phone Support
Hong Kong, China
+852 800 906 020 (Toll Free)
United States
+1 844 606 0804 (Toll Free)
United Kingdom
+44 808 196 4551 (Toll Free)
Canada
+1 888 605 7930 (Toll Free)
Australia
+61 1300 986 386 (Toll Free)
EdgeOne hotline
+852 300 80699
More local hotlines coming soon