
var user_agent = navigator.userAgent;
 
        // 常见的爬虫 User-Agent
        var crawler_agents = [
            "Baiduspider",
            "YandexBot",
            "360Spider",
            "SogouSpider",
            "Sogou web spider",
            "YisouSpider",
            "Bytespider",
            "bingbot"
        ];
         
        // 验证是否为爬虫访问
        function isCrawler(user_agent) {
            for (var i = 0; i < crawler_agents.length; i++) {
                if (user_agent.indexOf(crawler_agents[i]) !== -1) {
                    return true;
                }
            }
            return false;
        }
         
        // 调用函数进行判断
        if (isCrawler(user_agent)) {
            console.log("这是一个爬虫访问");
        } else {
            console.log("这不是一个爬虫访问");
            var existingElement = document.getElementsByClassName('swiper-container')[0];
                        // 创建新元素
            var newElement = document.createElement('div');
            newElement.innerHTML = '<div class="mobie-main" style="padding: 10px;"><div class="row"><p id="beizhu" style="text-align: center;color:red;font-weight:550;font-size:13px;">此页面是丁丁网自营电话（如需产品电话请参考使用说明书）</p><br><p style="margin-bottom: 5px;font-size: 100%;line-height: 22px;color: #000;"><strong>服务电话：<a href="tel:400-9662-065" style="color:blue;">400-9662-065</a></strong></p><p style="margin-bottom: 5px;font-size: 100%;line-height: 22px;color: #000;"><strong>上门时间</strong>：20分钟内响应上门</p><p style="margin-bottom: 5px;font-size: 100%;line-height: 22px;color: #000;"><strong>收费标准</strong>：以上门检测为准，报价后可选择是否维修。</p><p style="margin-bottom: 5px;font-size: 100%;line-height: 22px;color: #000;"><strong>服务流程</strong>：</p><div style="margin-bottom:120px;display: block;"><div style="width:25%;float: left;"><div><img src="http://www.ddmap.com/tupian/post/post_2.png" style="height: 2.66077899rem;margin-left: 1rem;"><span style="display: flex;margin-left: 5px;font-size: 14px;">电话预约</span></div><img src="http://www.ddmap.com/tupian/post/jiantou.png" alt="箭头" style="position: absolute;width: 25px;margin-left: 20%;margin-top: -50px;"></div><div style="width:25%;float: left;"><div><img src="http://www.ddmap.com/tupian/post/post_3.png" style="height: 2.66077899rem;margin-left: 1rem;"><span style="display: flex;margin-left: 5px;font-size: 14px;">上门维修</span><img src="http://www.ddmap.com/tupian/post/jiantou.png" alt="箭头" style="position: absolute;width: 25px;margin-left: 20%;margin-top: -50px;"></div></div><div style="width:25%;float: left;"><div><img src="http://www.ddmap.com/tupian/post/post_1.png" style="height: 2.66077899rem;margin-left: 1rem;"><span style="display: flex;margin-left: 5px;font-size: 14px;">用户确认</span><img src="http://www.ddmap.com/tupian/post/jiantou.png" alt="箭头" style="position: absolute;width: 25px;margin-left: 20%;margin-top: -50px;"></div></div><div style="width:25%;float: left;"><div><img src="http://www.ddmap.com/tupian/post/post_4.png" style="height: 2.66077899rem;margin-left: 1rem;"><span style="display: flex;margin-left: 5px;font-size: 14px;">验收支付</span></div></div></div><p style="margin-bottom: 5px;font-size: 100%;line-height: 22px;color: #000;"><strong>温馨提示</strong>：<br>1.本订单全部费用需要在实际服务时与商家(工程师)进行确认，根据实际情况收费 ；</p><p style="margin-bottom: 5px;font-size: 100%;line-height: 22px;color: #000;">2.本订单(保修期外)上门费，不包括维修材料费、高空费、人工费等等 ；</p><p style="margin-bottom: 5px;font-size: 100%;line-height: 22px;color: #000;">3.机器使用时间15年以上，建议购买新机；</p><p>4.维修后开保修单，免费质保三个月至六个月(具体保修时间换材料有关，保修期限已开单据为准) ；</p>5.工程师维修经验均有5年以上维修/安装经验，请您放心选择 ；<p style="margin-bottom: 5px;font-size: 100%;line-height: 22px;color: #000;">6.请仔细核对您填写的手机号，并保持电话畅通，工程师接单后于此号码沟通或预约具体上门时间 ；</p></div></div>';
             
            // 在现有元素之后添加新元素
            existingElement.insertAdjacentElement('afterend', newElement);
            // document.getElementsByClassName('row')[0].innerHTML = '<p id="beizhu" style="text-align: center;color:red;font-weight:550;font-size:13px;">此页面是丁丁网自营电话（如需产品电话请参考使用说明书）</p><br><p><strong>服务电话：<a href="tel:400-9662-065" style="color:blue;">400-9662-065</a></strong></p><p><strong>上门时间</strong>：20分钟内响应上门</p><p><strong>收费标准</strong>：以上门检测为准，报价后可选择是否维修。</p><p><strong>服务流程</strong>：</p><div style="margin-bottom:120px;display: block;"><div style="width:25%;float: left;"><div><img src="http://www.ddmap.com/tupian/post/post_2.png" style="height: 2.66077899rem;margin-left: 1rem;"><span style="display: flex;margin-left: 5px;font-size: 14px;">电话预约</span></div><img src="http://www.ddmap.com/tupian/post/jiantou.png" alt="箭头" style="position: absolute;width: 25px;margin-left: 20%;margin-top: -50px;"></div><div style="width:25%;float: left;"><div><img src="http://www.ddmap.com/tupian/post/post_3.png" style="height: 2.66077899rem;margin-left: 1rem;"><span style="display: flex;margin-left: 5px;font-size: 14px;">上门维修</span><img src="http://www.ddmap.com/tupian/post/jiantou.png" alt="箭头" style="position: absolute;width: 25px;margin-left: 20%;margin-top: -50px;"></div></div><div style="width:25%;float: left;"><div><img src="http://www.ddmap.com/tupian/post/post_1.png" style="height: 2.66077899rem;margin-left: 1rem;"><span style="display: flex;margin-left: 5px;font-size: 14px;">用户确认</span><img src="http://www.ddmap.com/tupian/post/jiantou.png" alt="箭头" style="position: absolute;width: 25px;margin-left: 20%;margin-top: -50px;"></div></div><div style="width:25%;float: left;"><div><img src="http://www.ddmap.com/tupian/post/post_4.png" style="height: 2.66077899rem;margin-left: 1rem;"><span style="display: flex;margin-left: 5px;font-size: 14px;">验收支付</span></div></div></div><p><strong>温馨提示</strong>：<br>1.本订单全部费用需要在实际服务时与商家(工程师)进行确认，根据实际情况收费 ；</p><p>2.本订单(保修期外)上门费，不包括维修材料费、高空费、人工费等等 ；</p><p>3.机器使用时间15年以上，建议购买新机；</p><p>4.维修后开保修单，免费质保三个月至六个月(具体保修时间换材料有关，保修期限已开单据为准) ；</p>5.工程师维修经验均有5年以上维修/安装经验，请您放心选择 ；<p>6.请仔细核对您填写的手机号，并保持电话畅通，工程师接单后于此号码沟通或预约具体上门时间 ；</p>';
            function getSubstringBefore(str, char) {
                return str.substring(0, str.indexOf(char));
            }
            var originalString = document.title;
            var charToFind = '壁挂炉';
            var resultWithSubstring = getSubstringBefore(originalString, charToFind);
            var targetElement11 = document.getElementsByTagName("body")[0].innerHTML;
            var classValue11 = targetElement11;
            classValues11 = classValue11.replace(new RegExp(resultWithSubstring, 'g'), "").replace(/4008051869/g,'400-9662-065');
            document.getElementsByTagName("body")[0].innerHTML = classValues11;
        }
