123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128 |
- 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;
- }
- $(".ljqw em").html(city_name)
- $(".goOfficialNetwork i").html(city_name)
- goBack()
- cituInfoData()
- loanClick();
- });
- //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;
- goCopy(goUrl)
- // window.location.href = "iframeUrl.html?url=" + goUrl;
- // window.webkit.messageHandlers.OutPushMessageHandler.postMessage({'name':city_name,'url':goUrl});
- }else if(item.URL.web){
- goUrl=item.URL.web;
- goCopy(goUrl)
- // window.location.href = "iframeUrl.html?url=" + goUrl;
- // window.webkit.messageHandlers.OutPushMessageHandler.postMessage({'name':city_name,'url':goUrl});
- }else{
- $(".tips .ljqw").html("")
- }
- }
- })
- }
- //帮助文案
- function cituInfoData () {
- $.ajax({
- type:"POST",
- url: "/api/city/listinfo",
- data:{
- 'region': qs.name
- },
- dataType:'json',
- success: function (res) {
- console.log(res)
- if(res.errno == 0 && res.rst.city && res.rst.city.city){
- var data = res.rst.city.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",
- "font-family": "微软雅黑"
- })
- $(".container strong").css({"color":"#333333","font-weight":"bold","font-size":"0.16rem"})
- $(".container strong span").css({"color":"#333333","font-weight":"bold","font-size":"0.1rem"})
- $(".container strong").find("span").css({"color":"#333333"})
- $(".goGjj").html(`<div class="ljqw">前往<em>${city_name}</em>公积金官网注册 <span onclick="goZhuce()">复制链接 </span>
- </div>`)
- }else{
- $(".container").html(`<h3 class="title">如何获取查询密码/公积金帐号</h3>
- <p class="goOfficialNetwork">如果您还未在最新版,<i>${city_name}</i>公积金官网主注册并设置相关信息;<span onclick="goZhuce()">复制链接</span></p>
- <p class="goOfficialNetwork">注册完成后即可使用APP查询。</p>`)
- }
- }else{
- showMsg(res.err)
- }
- }
- });
- }
- //推广统计的接口
- function extension_statistics (id,name) {
- $.ajax({
- type:"POST",
- url: "/api/hot/getactivitylink",
- data:{
- 'id': id
- },
- dataType:'json',
- success: function (res) {
- if(res.errno == 0 && res.rst){
- var url = res.rst.link;
- window.location.href = url;
- // url = encodeURIComponent(url);
- // window.location.href='loan.html?url=' + url
- }else{
- showMsg(res.err)
- }
- }
- });
- }
- function loanClick () {
- $(".mySwiper").click(function () {
- extension_statistics(129,"贷款")
- })
- }
|