ajax encapsulates a method, which can be used normally in the same domain. It still doesn"t work to change dataType to "jsonp" after cross-domain. What"s wrong with it? The code is as follows:
SendGetMessage (uri, args = {}, callBack) {
args["test"] = 1;
let URL = TEST_SERVERE_URL;
$.ajax({
type: "GET",
url: URL + uri + "?t=" + Math.random(),
data: args,
dataType: "jsonp",
success: function(response) {
callBack(response);
}
});
The data,F12 returned by },
console request returns an error as follows