var token = ''; var city_name = ''; var returnUrl = ''; var code = ''; var goUrl = ""; var httpStr = ""; var qs = parseQueryString(window.location.href); $().ready(function() { if (qs.returnUrl) { returnUrl = qs.returnUrl; } if (qs.httpStr) { httpStr = qs.httpStr; } if (qs.name) { city_name = qs.name; } if (qs.code) { code = qs.code; } if (qs.token) { token = qs.token; } $(".goOfficialNetwork i").html(city_name) goBack() }); //nav返回上一页 function goBack () { $("nav i").click(function () { window.location.href = httpStr + "&name=" + city_name + "&code=" + code + "&token=" + token; }) } //各城市对应注册地址 function goZhuce () { tips.find(function(item,index) { if(item.region == city_name){ if(item.URL.register){ goUrl=item.URL.register; // window.location.href = goUrl; window.webkit.messageHandlers.OutPushMessageHandler.postMessage({'name':city_name,'url':goUrl}); }else{ goUrl=item.URL.web; // window.location.href = goUrl; window.webkit.messageHandlers.OutPushMessageHandler.postMessage({'name':city_name,'url':goUrl}); } } }) }