登录验证
This commit is contained in:
parent
3f65103dea
commit
cdd028cc68
@ -126,8 +126,11 @@ var Blitter = null;
|
||||
var Mixer = null;
|
||||
var MixerInput = null;
|
||||
var timerID = null;
|
||||
window.onload = function () {
|
||||
// if (!games[location.hash.substr(1)]) {
|
||||
|
||||
|
||||
|
||||
function startGame(){
|
||||
// if (!games[location.hash.substr(1)]) {
|
||||
// alert("Invalid game request!");
|
||||
// return;
|
||||
// }
|
||||
@ -147,6 +150,57 @@ window.onload = function () {
|
||||
downloadBIOS();
|
||||
vm.initCtrl()
|
||||
}
|
||||
function checkSession_id(res){
|
||||
try{
|
||||
if(JSON.parse(res.target.response).errcode==0){
|
||||
startGame();
|
||||
}
|
||||
}catch(e){}
|
||||
}
|
||||
window.onload = function(){
|
||||
var account_id = getParameter("account_id")
|
||||
var session_id = getParameter("session_id")
|
||||
var url;
|
||||
if(getParameter("version")==="product"){
|
||||
url = "https://login.kingsome.cn/webapp/index.php?c=Login&a=sessionAuth"
|
||||
}
|
||||
else{
|
||||
url = "https://login-test.kingsome.cn/webapp/index.php?c=Login&a=sessionAuth"
|
||||
}
|
||||
url += "&account_id=";
|
||||
url += account_id;
|
||||
url += "&session_id=";
|
||||
url += session_id;
|
||||
|
||||
var ajax = new XMLHttpRequest();
|
||||
ajax.onload = checkSession_id;
|
||||
ajax.open("GET", url, true);
|
||||
ajax.send(null);
|
||||
|
||||
}
|
||||
|
||||
|
||||
// window.onload = function () {
|
||||
// // if (!games[location.hash.substr(1)]) {
|
||||
// // alert("Invalid game request!");
|
||||
// // return;
|
||||
// // }
|
||||
// //Initialize Iodine:
|
||||
// Iodine = new GameBoyAdvanceEmulator();
|
||||
// //Initialize the graphics:
|
||||
// registerBlitterHandler();
|
||||
// //Initialize the audio:
|
||||
// registerAudioHandler();
|
||||
// //Register the save handler callbacks:
|
||||
// registerSaveHandlers();
|
||||
// //Hook the GUI controls.
|
||||
// registerGUIEvents();
|
||||
// //Enable Sound:
|
||||
// Iodine.enableAudio();
|
||||
// //Download the BIOS:
|
||||
// downloadBIOS();
|
||||
// vm.initCtrl()
|
||||
// }
|
||||
|
||||
function getParameter (t) {
|
||||
var e = window.location.search,
|
||||
|
Loading…
x
Reference in New Issue
Block a user