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; } goBack() cituInfoData() }); //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}); } } }) } //帮助文案 function cituInfoData () { $.ajax({ type:"POST", url: "/api/city/info", headers:{ 'token': '5dac206be8b1f5736285fc03a08adb3c' }, data:{ 'region': qs.name }, dataType:'json', success: function (res) { console.log(res) if(res.errno == 0 && res.rst.data && res.rst.data.city){ var data = res.rst.data.city; if(data.help_info && data.help_info != ""){ $(".container").html(data.help_info); $(".container").find("p").css({ "line-height":'0.2rem', "font-size":"0.14rem", "color":"#666666" }).find("span").css({ "line-height":"0.26rem", "font-size":"0.14rem", "color":"#666666" }) $(".container strong").css({"color":"#333333","font-weight":"bold","font-size":"0.16rem"}) $(".container strong").find("span").css({"color":"#333333"}) $(".goGjj").html(`
前往${city_name}公积金官网注册 立即前往 >>
`) }else{ $(".container").html(`

如何获取查询密码/公积金帐号

如果您还未在最新版,${city_name}公积金官网主注册并设置相关信息;立即前往 >>

注册完成后即可使用APP查询。

`) } }else{ showMsg(res.err) } } }); } /** * [showMsg 提示各种错误信息,3s后消失] */ function showMsg(msg) { var msgBox = $('.alert-info'); msgBox.children('p').text(msg); msgBox.show(); setTimeout(function() { msgBox.hide(); }, 3000); }