腾讯小店

腾讯小店下载页

腾讯小店

折扣道具等你来  精彩活动乐不停

优惠道具
优惠道具
手游礼包
手游礼包
活动中心
活动中心
内容资讯
内容资讯
内容资讯
内容资讯

于你。刚满足了一个人的心愿

内容资讯
内容资讯
").appendTo("body"); frame.attr("src","http://game.qq.com/setcookie.html?cookie="+encodeURIComponent(JSON.stringify(cookieObj))+"&callback="+callbackName); //postMessage方式 frame.postMessage({ action:'cookie', callbackName:"callback_xxx",//标识请求,回调 cookieObj:{ openid:["openidtest","pathtest",600], access_token:["access_token_test","/",600] } }) window.parent.postMessage({ action:"done", callbackName:"callback_xxx"//标识请求,回调 },"*") */ // 针对lol环境特殊处理 function isLoLEnv() { try { // 检查 navigator 对象是否存在 if (typeof navigator === 'undefined' || navigator === null) { return false; } // 检查 userAgent 是否存在且是字符串 var ua = navigator.userAgent; if (typeof ua !== 'string') { return false; } // 使用 indexOf 检查 LeagueOfLegendsClient return ua.indexOf('LeagueOfLegendsClient') > -1; } catch (e) { // 捕获任何可能的异常(极少数情况下) return false; } } var cookieUtil={ set : function(sName,sValue,iExpireSec,sDomain,sPath,bSecure,sSameSite){ if(sName==undefined) { return; } if(sValue==undefined) { sValue=""; } var oCookieArray = [sName+"="+escape(sValue)]; if(!isNaN(iExpireSec)){ var oDate = new Date(); oDate.setTime(oDate.getTime()+iExpireSec*1000); oCookieArray.push("expires=" + oDate.toGMTString()); } if(sDomain!=undefined){ oCookieArray.push("domain="+sDomain); } if(sPath!=undefined){ oCookieArray.push("path="+sPath); } if(bSecure){ oCookieArray.push("secure"); } if(sSameSite!=undefined){ oCookieArray.push("SameSite="+sSameSite); } document.cookie=oCookieArray.join("; "); }, /** * 获取cookie * @param {string} sName cookie名 * @param {string} sValue 默认值 * @return {string} cookie值 */ get : function(sName,sDefaultValue){ var sRE = "(?:; |^)" + sName + "=([^;]*);?"; var oRE = new RegExp(sRE); if (oRE.test(document.cookie)) { return unescape(RegExp["$1"]); } else { return sDefaultValue||null; } }, /** * 获取cookie * @param {string} sName cookie名 * @param {string} sDomain 作用域 * @param {sPath} sPath 作用路径 * @return {void} */ clear : function(sName, sDomain, sPath){ var oDate = new Date(); this.set(sName,"", -oDate.getTime()/1000, sDomain, sPath); } } //获取url参数 var getUrlVal=function(pa){ var url = window.location.href.replace(/#+.*$/, ''), params = url.substring(url.indexOf("?")+1,url.length).split("&"), param = {} ; for (var i=0; i