Click the question twice when the mobile terminal requests data

clipboard.png

as shown in the picture, send the data to the background when you click OK, and close the window when you receive the reply data.
write in js or layer, will require two clicks to close.
the request has been sent and the return value has been received the first time, but there is no corresponding action in the success. The shutdown event will only be triggered on the second click.
would like to ask, do you know what the reason is?

    var callBackFn; //
    $("-sharpbntConfirm").on("click", function() {
        // 
        ...

        callBackFn = function(res) {
            if(res.success) {
                $("-sharpbtn").parent().hide();
            }
        } 
    })

(the data interaction part is encapsulated by the company, so it is not posted, it is briefly described)

Sep.06,2021

try touchstart instead of click

Menu