javascript - After the form ajax is submitted, it jumps, and the mobile phone presses return to enter the form page again!!
怪我咯2017-07-05 10:44:07
0
4
951
After the ajax form is submitted, it jumps, and the mobile phone presses return to enter the form page again!! If the submission is successful, the go(-1) page does not refresh, I don’t know what to do...
First of all, you should use replace() to replace the history record of the form page after logging in as mentioned above. Secondly, your routing should determine whether your application is logged in or not. Before each jump, you need to check your login Status check.
JS returns such as lcoalhost.back() on mobile phones may cause jump loop problems, especially in webview, the effect is inconsistent with the system's return key,
Emphasis: Different Androids may be different, such as some models of Huawei, Samsung, and Xiaomi,
The project team has used Hbuilder’s 5+ SDK. If you have done streaming applications such as webview, you can try it
There is a method:
lcoalhost.replace()
: Replace the current page with the new url
In this way, if you press the return key, you will not return to the current page
Since you want to jump, why do you need AJAX submission? . ? I don’t quite understand
First of all, you should use replace() to replace the history record of the form page after logging in as mentioned above. Secondly, your routing should determine whether your application is logged in or not. Before each jump, you need to check your login Status check.
JS returns such as lcoalhost.back() on mobile phones may cause jump loop problems, especially in webview, the effect is inconsistent with the system's return key,
Emphasis: Different Androids may be different, such as some models of Huawei, Samsung, and Xiaomi,
The project team has used Hbuilder’s 5+ SDK. If you have done streaming applications such as webview, you can try it