Ajax is not allowed cross-domain requests, today when using bootstap-table, Data-url Use the address is an absolute address, rather than a relative address, so when loading data in error.
Use is http://127.0.0.1 when starting, and it is not allowed to use address http://localhost when requested.
Therefore, use the relative address rather than the absolute address when using AJAX later.
There are a lot of difficulties in finding this problem, and if I start to call Ajax and fail, maybe I can quickly realize that it is an AJAX cross-domain problem. But because you use a control that someone else has written, the interior is encapsulated, so you can't quickly locate the problem. I used the JS debugging tool to track the bootstrap-table internal debugging before I finally realized the problem.
This is the disadvantage of using the control, the control can simplify the work, but when encountering a problem, if it is written in the language, we can use the language itself to solve the problem of the rules. The encapsulation of controls prevents us from being aware of problems quickly.
Ajax cross-domain request issues