COCOS CREATOR network request

var appScript = {ip: "https://game.zuiqiangyingyu. net/wb", version: "1.0.0", Get: function(url,reqData,callback){ var self = this; url += "?"; for< /span>(var item in reqData){ url += item +"=" +reqData[item] +"&";} // console.log (self.ip + url) var xhr = new XMLHttpRequest(); xhr.onreadystatechange = function () { if (xhr.readyState == 4){ if(xhr.status >= 200 && xhr.status <400){ var response = xhr. responseText; // console.log(response) if(response){ var responseJson = JSON.parse(response); callback(responseJson); }else.parse(response); span>{ console.log("Returned data does not exist") callback(false);} }else{ console.log("Request failed") callback(false);}} }; xhr.open("GET", self.ip + url, true); xhr.send(); }, Post: function (url, reqData, callback) { var self = this; // console.log(url) // console.log(reqData) //1. Splicing request parameters var param = "" ; for(var item in reqData){ param += item + "=" + reqData[item] + "&";} //2. Initiate a request var xhr = new span> XMLHttpRequest(); xhr.onreadystatechange = function () { if (xhr.readyState == 4){ if(xhr.status >= 200 && xhr.status <400 ){ var response = xhr.responseText; // console.log(response) if(response){ var re sponseJson = JSON.parse(response); callback(responseJson); }else{ console.log(< span class="hljs-string">"The returned data does not exist") callback(false);} }else{ console.log("Request failed") callback(false);} } }; xhr.open("POST", self.ip + url, true); xhr. setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xhr .send(param);//reqData is in the form of a string: "key=value" },};module.exports = appScript;

WordPress database error: [Table 'yf99682.wp_s6mz6tyggq_comments' doesn't exist]
SELECT SQL_CALC_FOUND_ROWS wp_s6mz6tyggq_comments.comment_ID FROM wp_s6mz6tyggq_comments WHERE ( comment_approved = '1' ) AND comment_post_ID = 3639 ORDER BY wp_s6mz6tyggq_comments.comment_date_gmt ASC, wp_s6mz6tyggq_comments.comment_ID ASC

Leave a Comment

Your email address will not be published.