Pass parameters? Judge? Judge the parameters?

var uid = users.id;     
console.log(uid);//ID
console.log(returnCitySN["cip"]);ip

if (uidsand undefined) {}
$(function () {
/ page rendering /
$.ajax ({

)
type:"POST",
 dataType: "json",

url: "URL",
data: {ip:returnCitySN ["cip"]}, this is the parameter to be passed.

now I want to make a judgment. If you can get the user"s id, you should wear data: {uid:uid};
if you can"t get the user"s id, send data: {ip:returnCitySN ["cip"]};
ask God for help?

Mar.01,2021


var aData;<br>if(uid){

aData={uid:uid};

} else {

aData={ip:returnCitySN["cip"]};

}
$.ajax ({

)
data:aData

});

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-1bce4a8-30bf4.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-1bce4a8-30bf4.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?