Apicloud – chrome debug code in apiarady


apireadyThe code in is executed only when the real machine is debugged. Generally, the data request will be put in it. During the development, you want to debug the interface request and page rendering on chrome, so you can add these codes in JS.

setTimeout(function () {
    if (typeof api == 'undefined') {
        api = {
            pageParam: {}
}, 500);

It means a delay of 500 ms before checkingapiIf there is no description of whether the object exists, it should not be debugged in the real machine but in the browser, and it will be run directlyapiready()

The delay time can be increased or decreased according to the performance of the mobile phoneapireadyIt’s late, otherwise there will be other unknown problems.

For example, I set 200 at the beginningvueOf@clickNo execution, only JS nativeonclick

Recommended Today

Understand mybatis step by step through the project

Reprint please be sure to indicate the source, original is not easy! Related articles:Understand mybatis < 1 > step by step through the project All code address of the project:Github-Mybatis Mybatis solves the problem of JDBC programming 1. The frequent creation and release of database links results in the waste of system resources, which affects […]