(function () { // var TitName = $('.base_info li').eq(0).text().substring(5); var TitName = $('#company_name').val() var app = { textVlaue: '浣犲ソ锛屾杩庡厜涓? + $('.base_info li').eq(0).text().substring(5) + '锛岃鍙戦€佹偍瑕佸挩璇㈢殑鍐呭', imgsrc: '', name: '瀹㈡埛', imgarr: [ '//seoweb.715083.com/lks/img/c1.png', '//seoweb.715083.com/lks/img/c2.png', '//seoweb.715083.com/lks/img/c3.png', '//seoweb.715083.com/lks/img/c4.png' ], datalist: [ ], init: function () { app.name = $('.base_info li').eq(1).text().substring(4); app.imgsrc = app.imgarr[Math.floor(Math.random() * app.imgarr.length)]; app.html(); }, html: function () { html = `
`; $('body').append(html); app.mounted(); }, mounted: function () { //鍏抽棴 $('body').on('click', '.closer', function () { $('.app-pup,.app-pup-style').remove(); tiClickA('-1') }); //鍙戦€佷俊鎭 $('body').on('click', '.btnclick', function () { if ($('.modal-app-inp').is(':visible')) { app.getAjax(); } else { var msg = $('.modal-weChat-textarea').val(); let data = { type: 2, name: '鎴?, img: '//seoweb.715083.com/lks/img/w1.png', time: app.getNowTime(), content: msg }; app.datalist.push(data); app.getHtml(); } }); }, getHtml: function () { let html = ``; for (let index = 0; index < app.datalist.length; index++) { if (app.datalist[index].type == 1) { html += `
  • ${app.datalist[index].name} ${app.datalist[index].time}

    ${app.datalist[index].content}
  • ` } else { html += `
  • ${app.datalist[index].name} ${app.datalist[index].time}

    ${app.datalist[index].content}
  • ` } }; $('.weChat_message').append(html); $('.modal-weChat-textarea').val(''); app.datalist = []; }, getAjax: function () { var user_city = ''; var user_province = ''; var ss1 = ''; var ss2 = ''; var Ajax = function () { if (app.getUserCookie('titleText').length == 0) { var titleText = ''; } else { let encodedString = app.getUserCookie('titleText'); let decodedString = decodeURI(encodedString); var titleText = decodedString + ';'; } var msg = $('.modal-weChat-textarea').val().trim(); var linkman = $('#linkman').val(); var phone = $('#phone').val(); if (linkman.length == 0) { $('.col-md').html('*璇峰~鍐欎笅浣犵殑濮撳悕'); setTimeout(function () { $('.col-md').html(''); }, 2000); return; } else if (phone.length == 0 || validatePhoneNumber(phone) == false) { $('.col-md').html('*璇峰~鍐欎笅浣犵殑鎵嬫満鍙?) setTimeout(function () { $('.col-md').html(''); }, 2000); return; } else if (msg.length == 0) { $('.col-md').html('*璇峰~鍐欎笅浣犵殑闇€姹?) setTimeout(function () { $('.col-md').html(''); }, 2000); return; } let gongsi_id = $('#gongsi_id').val().replace(/\s*/g, ""); let shengid = $('#shengid').val().replace(/\s*/g, ""); var xhr = new XMLHttpRequest(); var url = "/saveInfo"; var params = "phone=" + phone + "&name=" + linkman + "&gid=" + gongsi_id + "&biaoid=" + shengid + "&type=1&content=" + titleText + msg + '&ss1=' + ss1 + '&ss2=' + ss2; xhr.open("POST", url, true); xhr.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); xhr.onreadystatechange = function () { if (xhr.readyState == 4 && xhr.status == 200) { let data = JSON.parse(xhr.responseText); console.log(data) if (data.code == 200) { $('.modal-app-inp').hide(); $('.cg').show(); $('.modal-weChat-textarea').val(''); let datab = [{ type: 2, name: '鎴?, img: '//seoweb.715083.com/lks/img/w1.png', time: app.getNowTime(), content: msg }, { type: 1, name: app.name, img: app.imgsrc, time: app.getNowTime(), content: '宸叉敹鍒版偍鐨勫挩璇俊鎭紝鎴戜滑浼氬敖蹇仈绯绘偍锛岃娉ㄦ剰鏉ョ數鎺ュ惉鍝︼綖', }]; app.datalist = datab; app.getHtml(); setTimeout(function () { $('.cg').remove(); }, 3000) } } } xhr.send(params); }; var $Ajax = function () { $.ajax({ url: "/ss.json?t=" + Date.now(), type: "GET", dataType: "json", success: function (data) { var optData1 = data; for (let i = 0; i < optData1.length; i++) { if (user_province == optData1[i].title) { let child = optData1[i].child; ss1 = optData1[i].id; for (let j = 0; j < child.length; j++) { if (user_city == child[j].title) { ss2 = child[j].id; Ajax(); break; } } break; } } }, error: function (xhr, status, error) { console.error("鍙戠敓閿欒锛? + error); // 鍦ㄦ帶鍒跺彴涓墦鍗伴敊璇俊鎭 } }); } $.ajax({ url: "/getUserCity", type: "GET", dataType: "json", success: function (data) { if (data.code == 200) { user_city = data.data.user_city; user_province = data.data.province; $Ajax(); } }, error: function (xhr, status, error) { console.error("鍙戠敓閿欒锛? + error); // 鍦ㄦ帶鍒跺彴涓墦鍗伴敊璇俊鎭 } }); }, getNowTime: function () { const nowDate = new Date(); const date = { year: nowDate.getFullYear(), month: nowDate.getMonth() + 1, date: nowDate.getDate(), hours: nowDate.getHours(), minutes: nowDate.getMinutes(), seconds: nowDate.getSeconds(), }; const newmonth = date.month > 10 ? date.month : "0" + date.month; const newday = date.date > 10 ? date.date : "0" + date.date; const newminutes = date.minutes > 10 ? date.minutes : "0" + date.minutes; const newseconds = date.seconds > 10 ? date.seconds : "0" + date.seconds; return ( date.year + "-" + newmonth + "-" + newday + " " + date.hours + ":" + newminutes + ":" + newseconds ); }, getUserCookie: function (name) { var strcookie = document.cookie;//鑾峰彇cookie瀛楃涓 var arrcookie = strcookie.split("; ");//鍒嗗壊 //閬嶅巻鍖归厤 for (var i = 0; i < arrcookie.length; i++) { var arr = arrcookie[i].split("="); if (arr[0] == name) { return arr[1]; } } return ""; }, }; function validatePhoneNumber(phoneNumber) { const pattern = /^1[3456789]\d{9}$/; return pattern.test(phoneNumber); }; function tiClickA(type) { const hm2 = document.createElement("script"); hm2.src = `//tj.fanppp.cn/api/likusou_click?type=${type}&land_url=${window.location.href}`; const s2 = document.getElementsByTagName("script")[0]; s2.parentNode.insertBefore(hm2, s2); } $('.WX').click(function () { app.init(); tiClickA(8) }).show(); })(); $(function () { const scrollContainer = document.getElementById('scroll-container'); const outerBoxHeight = document.querySelector('.outer-box').offsetHeight; const innerBoxHeight = document.querySelector('.inner-box').offsetHeight; let scrollPosition = 0; function scrollUp() { scrollPosition--; scrollContainer.style.transform = `translateY(${scrollPosition * outerBoxHeight}px)`; scrollContainer.style.transition = 'all .5s' // 褰撴粴鍔ㄥ埌鏈€鍚庝竴涓洅瀛愶紙Box 6锛夋椂锛屽揩閫熻皟鏁村埌绗竴涓洅瀛愮殑浣嶇疆 if (scrollPosition == -5) { scrollPosition = 0 setTimeout(function () { scrollContainer.style.transform = 'translateY(0px)' scrollContainer.style.transition = 'none' }, 500) } } // 璁剧疆瀹氭椂鍣ㄦ瘡2绉掓粴鍔ㄤ竴娆 setInterval(scrollUp, 3000); $('.ask').click(function () { var quesText = $(this).closest('.inner-box').find('.ques').text(); $('#phonenum .WX').click() $('#content').text(quesText) }); let tipsFix = document.getElementById('tipsFix'); let payPopup = document.getElementById('pay-popup') let priBtnIndex = 0 const priBtn = document.querySelector('.pri_btn'); priBtn.addEventListener('click', function () { priBtnIndex = 1 $('.app-main-con-3-1').text('3.9') $('.app-main-con-4').text('锛堝凡鐪?5鍏?') tipsFix.style.display = 'none'; payPopup.style.display = 'block' }); const closeEv = document.querySelector('.close_ev'); closeEv.addEventListener('click', function () { tipsFix.style.display = 'none'; }); $('body').on('click', '#ul_div .cus_ot_one', function () { $('#phonenum .WX').click() }) $('body').on('click', '.pp-close', function () { let getSingleid = getCookieFrom('strArr'); if ( decodeURIComponent(getSingleid) .split('&') .indexOf('' + gongsi + '') == -1 && $crut == 0 && priBtnIndex == 0 ) { tipsFix.style.display = 'block' return false } }) $('.spans').click(function () { $(this).hide(); $(this).parent().height('auto'); }); if ($('.img_cover').length == 0) { var a = $('#shengid').val(); var b = $('#gongsi_id').val(); $.ajax({ type: "get", url: "//img2.likuso.com/gen/" + a + "/" + b + "", data: '', dataType: 'json', success: function (response) { $('.profile_con .profile_txt').before('
    ').attr('class', 'profile_line') }, error: function (error) { } }); } // http://img2.likuso.com/gen/1/3189479 var _w = $('#card').width(); var _h = $('#card').height(); var vanvasOption = { allowTaint: true, imageTimeout: 2000000, width: _w, height: _h }; html2canvas(document.querySelector("#card"), vanvasOption).then(canvas => { document.querySelector("#card").innerHTML = ''; document.querySelector("#card").appendChild(canvas); }); var pagedom = $('.scrolldiv'); var windowHeight = $(window).height(); $(window).scroll(function () { var windowTop = $(document).scrollTop(); if (windowTop > 0) { $('.ul_div').show(); } else { $('.ul_div').hide(); $('.ul_div a').removeClass('on'); } for (var i = 0; i < pagedom.length; i++) { var scrollTop = $(pagedom[i]).offset().top; var scrollHeight = $(pagedom[i]).height(); if (scrollTop - windowTop <= 200 && (scrollTop + scrollHeight) - windowTop > 0) { $('.ul_div a').removeClass('on').eq(i).addClass('on'); } } ; }); $('body').on('click', '.ul_div a', function () { $('.ul_div a').removeClass('on'); $(this).addClass('on') }) var app = { init() { app.Event(); }, html(year, id) { $.ajax({ type: "get", dataType: "json", url: "/api/year_data", data: { company_regno: id, year: year }, success: function (res) { var data = res; var html = `

    浼佷笟鍩烘湰淇℃伅

    浼佷笟鍚嶇О ${data.data.info.basic_entname} 缁熶竴绀句細淇$敤浠g爜 ${data.data.info.basic_regno || '-'}
    鑱旂郴鐢佃瘽 ${data.data.info.basic_phone || '-'} 閭斂缂栫爜 ${data.data.info.basic_postalcode}
    鐢靛瓙閭 ${data.data.info.basic_email || '-'} 浼佷笟缁忚惀鐘舵€?/td> ${data.data.info.basic_openstatus}
    鏄惁鏈夌綉绔欐垨缃戝簵 ${data.data.info.basic_website || '-'} 浼佷笟鏄惁鏈夋姇璧勪俊鎭垨璐拱鍏朵粬鍏徃鑲℃潈 ${data.data.info.basic_invest || '-'}
    娉ㄥ唽鍦板潃 ${data.data.info.basic_address}

    鑲′笢鍙婂嚭璧勪俊鎭?/h3>
    ` $.each(data.data.contribution, function (i, k) { html += `` }) html += `
    搴忓彿 鑲′笢 璁ょ即鍑鸿祫棰滭/td> 璁ょ即鍑鸿祫鏃堕棿 璁ょ即鍑鸿祫鏂瑰紡 瀹炵即鍑鸿祫棰滭/td> 瀹炵即鍑鸿祫鏃堕棿 瀹炵即鍑鸿祫鏂瑰紡
    ${i + 1} ${k.name} ${k.subscribed_capital} ${k.subscribed_date} ${k.subscribed_type} ${k.subscribed_capital} ${k.real_data} ${k.subscribed_type}

    ` if (data.data.insuranceinfo.length != 0) { html += `

    绀句繚淇℃伅

    ` } html += `
    ` $('.year_box_con').html(html); } }); }, Event() { $('body').on('click', '.downtbn', function () { var year = $(this).attr('date-year'); var dateid = $(this).attr('date-id'); if (dateid.length != 0) { app.html(year, dateid); $('.year_wrap').show(); } }); $('body').on('click', '.claos', function () { $('.year_wrap').hide(); }) } } app.init(); }); (function () { var imgSRR = [ '//seoweb.715083.com/lks/img/c1.png', '//seoweb.715083.com/lks/img/c2.png', '//seoweb.715083.com/lks/img/c3.png', '//seoweb.715083.com/lks/img/c4.png' ]; $('.dianhua img').attr('src', imgSRR[Math.floor(Math.random() * imgSRR.length)]); if ($('.m-timer').length <= 0) { return false; } var timelimitMillisec = 2 * 60 * 1000; // 杞崲涓烘绉 fortime(timelimitMillisec); // 璁剧疆鏃跺垎绉掓绉 function fortime(millisec) { var second = Math.floor(millisec / 1000) % 60; var totalSecondMillisec = millisec - second * 1000; var minute = Math.floor(totalSecondMillisec / (1000 * 60)) % 60; var totalMinuteMillisec = totalSecondMillisec - minute * 60 * 1000; var millisecond = Math.floor(totalMinuteMillisec / 1000) % 1000; var formattedRemainingMillisecs = formatMillisec(totalMinuteMillisec); function formatMillisec(num) { return num.toString().padStart(3, '0'); } $('.m-timer .hournum').text(formatNum(minute)); $('.m-timer .minitenum').text(formatNum(second)); $('.m-timer .secondnum').text(formatNum(formattedRemainingMillisecs.slice(0, 2), 4)); } /** * 鏍煎紡鍖栨暟瀛 * @param {number} num // time * @param {number} [length=2] // 2-3 */ function formatNum(num, length = 2) { var len = length; if (len === 3) { return num < 100 ? ('0' + (num < 10 ? '0' + num : num)) : num; } else if (len == 4) { return num < 10 ? num : num; } else { return num < 10 ? '0' + num : num; } } var milliStep = 10; var stepTime = milliStep; // 淇敼涓烘绉掔骇鍒 window._limitTimer = setTimeout(timer, stepTime); var random = parseInt(Math.random() * 40 + 59); // 鏃堕棿瀹氭椂鍣 function timer() { timelimitMillisec -= milliStep; if (timelimitMillisec <= 0) { // 鍑忓皯涓€姣骞堕噸璁鹃〉闈㈡暟鎹 timelimitMillisec = 0; } fortime(timelimitMillisec); if (timelimitMillisec <= 0) { // 缁堟璁℃椂鍣 clearTimeout(window._limitTimer); } else { window._limitTimer = setTimeout(timer, stepTime); } } })(); var getSingleidABC = getCookieFrom('strArr'); let gongsi_id = $('#gongsi_id').val() console.log(getSingleidABC, 'getSingleidABC') var d_phone = $('#d_phone').val(); var m_phone = $('#m_phone').val(); if (d_phone.length != 0 && d_phone.indexOf('*') == -1) { if (getSingleidABC != undefined) { if (!getSingleidABC.includes(gongsi_id)) { d_phone = d_phone.substring(0, 5) + '*********'; } } else { d_phone = d_phone.substring(0, 5) + '*********'; } $('#phonenum .num').text(d_phone) $('#phonenum .num').css('display', 'inline-block') } if (m_phone.length != 0 && m_phone.indexOf('*') == -1) { if (getSingleidABC != undefined) { if (getSingleidABC.includes(gongsi_id)) { var m_ph = m_phone } else { var m_ph = m_phone.substring(0, 3) + '*****' + m_phone.substring(7); } } else { var m_ph = m_phone.substring(0, 3) + '*****' + m_phone.substring(7); } $('.m_phone .num').text(m_ph) $('.m_phone .num').css('display', 'inline-block') } $('.dh-b .c-btn').on('click', function () { $('#phonenum .num').text($('#d_phone').val()) $('.m_phone .num').text($('#m_phone').val()) $(this).css('display', 'none') })