The get request of AJAX always executes the result under error

normally, ajax uses get to request the server, and the server accepts parameters and returns data in json format
{"num": "20012", "msg": "u6210u529fu63a5u542c", "state": 1}
now after starting the ajax request, F12 results are as follows, blank in Response. However, the assigned request url can receive the returned data when it is opened directly in the browser. I would like to ask how to solve this situation, please.
Picture description

$.ajax({
              type:"GET",                    
              url:"xxxxxxxx",
              data:{num:num,onvideo:onvideo,own_num:own_num},
              dataType:"json",  
               
              success:function(data){
                  alert(data.msg);
                
              },
              error:function(data){
                  console.log(data);
                  alert("");
              }
          });
May.12,2022

you can compare the difference between the requests made by ajax and those developed directly in the browser, and it's best to post them.


1. You can look at the status code returned by the request. For example, the following one is considered successful only if it returns 200. If 200 is returned, but no data is obtained, you can ask the backend of this API to write
clipboard.png

at this time.

2. Troubleshoot the problem according to your status code. Different status codes have different meanings. After you request this interface, look at the meaning of the status code and then Baidu's corresponding status code. I think the problem should be solved

.

Thank you. It has been dealt with, which is caused by cross-domain.
when using jsonp for the first time, please note that the data returned by the backend should be stitched with the parameters of jsonp.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b37628-2c097.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b37628-2c097.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?