1. 程式人生 > 其它 >大資料獲客系統及原始碼5

大資料獲客系統及原始碼5

今天給大家講講地圖獲客,通過關鍵詞搜尋出高德,百度,騰訊三大地圖店鋪對應的資訊;

 

 

 這裡我們可以看到對應城市的關鍵詞資訊,高德的比較全面,只要對應商家又在高德上認領自己的門店資訊都可以爬取出來。爬取下來的資訊會保留在我們的採集客戶庫裡,有對應的資訊

 

 

 

 

    <style>
        .table-select-all-input, .table-select-input {
            width: 15px;
            height: 15px;
        }
        .xv-author{text-align: center;max-width: 80px;}
        .xv
-author-avatar{width:64px; height: auto;} .tongji{display: flex;border: 1px solid #eee;border-radius: 5px;margin-bottom: 20px;} .tongji .tj-item{flex: 1;text-align: center;padding: 20px 0;} .tongji .tj-item:not(:last-child){border-right: 1px solid #eee;} .tongji .tj-item .tt{font-weight: bold;font-size: 15px;} .tongji .tj
-item .count{font-weight: bold;font-size: 30px;margin-top: 10px;font-family: DIN Alternate;} .tongji .tj-item .zt-tj{font-weight: bold;margin-top: 10px;} </style> <div class="card shadow mb-4"> <div class="card-header py-3"> <h6 class="m-0 font-weight-bold text-primary">地圖任務列表</h6> </div> <div class="card-body"> <!-- <div class="tongji"> <div class="tj-item"> <div class="tt">總監控數</div> <a href="/dydqtshoppc/scane/accountMonitorList" style="text-decoration:none;"> <div class="count" style="color: rgb(37, 122, 228);"><{$count_data['account_count']}></div> </a> <p class="zt-tj"> <a href="/dydqtshoppc/scane/accountMonitorList?status=open" style="text-decoration:none;"> <img data-v-0f121300="" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAEP0lEQVRo3u1YSWwbZRROASGVFolWXFBZJISgEheQeuPUQw9cempUxyRO0jYkKU2zNI3X1lMnUaQggbghQIKKC6JHhKg7ju06sR3b41VYleDSSoBQObheZjzj8czj/bNl7PTCAduR5kmfvu8tY79n/zPzzwwNWWaZZZZZZtn/ZFAIvAultQ0or7938JoH6hkorBWguAYIGfEDlDfeOjgDlAJ20rxcWgW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iHag3DhXa9n41aJer2CQy4EDII1BVmia+rkcIyn8Hx44M3GuTatD2k9J00KY2HxxpoGYQ3+EA16vB8x9Wfra/MbBv4B5Hho9io+O1X2xnn4TsbwLV5ycsyyyzzDLLLDtI9i9Asm92VQxmDQAAAABJRU5ErkJggg==" width="20px" alt="" class="iconImg"> 開啟中
<{$count_data['open_account_count']}> </a> </p> </div> <div class="tj-item"> <div class="tt">詢盤線索</div> <a href="/dydqtshoppc/scane/pinglunList?task=4" style="text-decoration:none;"> <div class="count" style="color: rgb(21, 197, 174);"><{$count_data['account_pinglun_count']}></div> </a> <p class="zt-tj"> <a href="/dydqtshoppc/scane/pinglunList?task=4&isdeal=no" style="text-decoration:none;"> <img data-v-0f121300="" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAABvFBMVEUAAAAA//8cxqoew60axrAZwasawaos074r1L4r1b8q1cAawa0bwawbwq4exrIbxa4dx7Ecxa8cxa8bxK8r1b0p1L8r1b8exrIex7EZwqsdxq8dxrAZwasawawp1L4awq0r070r1L8r1MAbw60bw64fx7IfyLIZwasZwqwZwq0awawawqwawq0bwq0bwq4bw60bw64bxK4bxa8cw64cxK4cxK8cxa8cxbAdxa8dxbAdxrAdxrEexrAexrEexrIex7Eex7IeyLIeyLMfx7Efx7Ifx7MfyLIfyLMfybMgyLMgybMgybQgyrQhybMhybQhyrMhyrQhyrUhy7UiyrQiyrUiy7Qiy7Uiy7YizLUizLYizLcjy7YjzLYjzLcjzbYjzbcjzrcjzrgkzbckzbgkzrckzrgkzrklzrglzrklz7glz7klz7omz7kmz7om0Lkm0Lom0Lsnz7sn0Lon0Lsn0bsn0bwn0rso0bso0bwo0rso0rwo0r0o07wo070o074p0rwp0r0p070p074p1L0p1L4p1L8p1b8q070q074q1L0q1L4q1L8q1b4q1b8q1cAr1L4r1L8r1b4r1b////8JvWTzAAAAJ3RSTlMAAQkiOkZOUlNUVVdfaHBycn+AgtLU1N7e4PT0+Pr7/Pz8/P7+/v7a56i9AAABzUlEQVQYGe3BOY5VSRCG0S9yqBKgwm/1KhqDVWGxABw2wJJYAFtASBgI0WKu4d7MjPjBeUHxmjJawsCoc7h16zcxfrhzdu9Rn3322ReiL/VJ59n5+SXJSKdPqww6XiQ3vusDFfr2ZOOgkc4GJ5iuON0pbZwK2zW745xtHBTS3fARV0SLOFl739h2v+pjG/g9UiU9hiltdW1lsWuOwgxfNsd68JyDRhqGVuDTGDoZqjsml6PipEYaxVztb372ZqJSSY00q8HiyARFkBpJi2jrlXPExDWNNE11SGFmeA0jMDOvhBVSIy0sVBagsFVUQ6YiV/VCaiSXoRoyBObsPSSj+rIgNdJVF5oP+dmLaWEiNZKrLP5jSCUKqZEmAp6jOFmiEm32KTOKOamRlvdJ32pZqy0bpggFFAWT1EhTge02SpSdqMFuUZBUEamS7D7DtOOsgN2cYRES4a/ec9BIXycR3d1kUYjAFKKNKj6TGulygk9DBXkNp0glPNy0kyppnF+e4RDBKhNHCrTMX7/9RDKuKQb2DyiqvfzEgYIfGtcE3y0Z5eO/n/m1xjHJ7cu7r9ygcWyaX74/5yaNY/KLDxfcqHHML94N/o+/Orf+fN8A16YvOMKGKrgAAAAASUVORK5CYII=" width="20px" alt="" class="iconImg"> 未處理 <{$count_data['account_nopinglun_count']}> </a> </p> </div> <div class="tj-item"> <div class="tt">行業商機</div> <a href="/dydqtshoppc/scane/userList?task=6" style="text-decoration:none;"> <div class="count" style="color: rgb(244, 187, 87);"><{$count_data['account_user_count']}></div> </a> <p class="zt-tj"> <a href="/dydqtshoppc/scane/userList?task=6&isdeal=no" style="text-decoration:none;"> <img data-v-0f121300="" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAACNFBMVEUAAAAA//8A/4AAv79Av78r1aogv58cxqocxsYazLMu0bkn2MQgv68r1bgbyK0pzr0axLEq1b4Zv6wfxrAs070lzrkgybQiy7cbxa0n0boZwqwo1LwYwKsr1b8dx7EfyLEk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qw0twvA0ZxsZPQqgKigiQXUQYUEP/97mnCk+ByIAAlHd+LpFMgZLccUDJDzCsAUkyES67caI+vCZMtMXpaGwzNhoM1MwVH/uFduzxBEeB8lac8LcCFSPnrzYmOJkEExKsjGiI0CYDNTzuGcmCAsDjeJ4MwvNn+cfrwnQKOjI4MhFDWt779ebwnQBKGoqKiAmHny06BKYA0CYUIaPKx1Zv+idYu0EA6/eDt59Hfh8BEwn5dYAIrtrb7M42ZUV4Dna33rTjbINPDyHCwvjGc/2LmhV+m0h6Dzg4b3wAAAABJRU5ErkJggg==" width="20px" alt="" class="iconImg"> 未處理 <{$count_data['account_nouser_count']}> </a> </p> </div> <div class="tj-item"> <div class="tt">監控視訊</div> <a href="/dydqtshoppc/scane/videoList?task=4" style="text-decoration:none;"> <div class="count" style="color: rgb(255, 150, 150);"><{$count_data['account_video_count']}></div> </a> </div> <div class="tj-item"> <div class="tt">開啟中粉絲檢索</div> <a href="/dydqtshoppc/scane/accountMonitorList?ispullfan=1" style="text-decoration:none;"> <div class="count" style="color: rgb(255, 150, 150);"><{$count_data['account_openfans_count']}></div> </a> </div> </div> --> <blockquote class="layui-elem-quote"> <p>特別提醒:總點數(<span style="color: #0B8E00;"><{$collect['cs_total_num']}>點</span>);已使用點數(<span style="color: #fa3e3d;"><{$collect['cs_used_num']}>點</span>);剩餘點數(<span style="color: #0a7bd5;"><{$collect['cs_surplus']}>點</span>)。</p> <p>特別提醒:地圖任務需要申請對應key並填入,任務中的過濾量是指搜尋到企業資訊,但由於沒有電話號碼而被忽略的資料。</p> </blockquote> <div style="margin-bottom: 10px;overflow: hidden;"> <div style="float: left;"> <a href="javascript:;" class="btn btn-success btn-sm btn-add-account">新增任務</a> <!-- <button class="btn btn-info btn-sm" onclick="batchOpen()">批量開啟</button> <button class="btn btn-warning btn-sm" onclick="batchClose()">批量關閉</button> --> <button class="btn btn-danger btn-sm" onclick="batchDelete()">批量刪除</button> <button class="btn btn-warning btn-sm" onclick="setGaodeKey(this, 'gaode')" data-key="<{$manager_info['ds_gaode_key']}>">設定高德key</button> <button class="btn btn-info btn-sm" onclick="setGaodeKey(this, 'baidu')" data-key="<{$manager_info['ds_baidu_key']}>">設定百度key</button> <button class="btn btn-success btn-sm" onclick="setGaodeKey(this, 'qq')" data-key="<{$manager_info['ds_qq_key']}>">設定騰訊key</button> </div> <div style="float: right;"> <form class="form-inline" role="form"> <div class="form-group" style="margin-right: 10px;"> <label class="" style="margin-right: 10px;">時間篩選</label> <input name="time_range" type="text" id="time-range" class="form-control" placeholder="請選擇新增時間" value="<{$time_range}>" style="width: 190px;" autocomplete="off"> </div> <button type="submit" class="btn btn-primary" style="margin-left: 10px;">搜尋</button> </form> </div> </div> <table class="table"> <thead> <tr> <th> <input type="checkbox" class="table-select-all-input" value="0"> </th> <th class="th-min-width90">城市</th> <th class="th-min-width90">關鍵詞</th> <th class="th-min-width90">任務型別</th> <th class="th-min-width90">獲客量</th> <th class="th-min-width90">過濾量</th> <th class="th-min-width90">新增時間</th> <th class="th-min-width90">執行時間</th> <th class="th-min-width90">操作</th> </tr> </thead> <tbody> <{foreach $auto_list as $user}> <tr> <td> <input type="checkbox" class="table-select-input" value="<{$user['mt_id']}>"> </td> <td> <p><{$user['mt_city_name']}></p> </td> <td> <p><{$user['mt_keyword']}></p> </td> <td> <p><{$map_source[$user['mt_source']]['name']}></p> </td> <td> <p><a href="/dydqtshoppc/scane/userList?key_id=<{$user['mt_id']}>&platform=<{$map_source[$user['mt_source']]['platform']}>"><{$user['mt_count']}></a></p> </td> <td> <p><{$user['mt_except']}></p> </td> <td> <p><{date('m-d H:i',$user['mt_create_time'])}></p> </td> <td> <p><{date('m-d H:i',$user['mt_complete_time'])}></p> </td> <td> <a href="javascript:;" onclick="confirmDelete(this)" class="btn btn-danger btn-sm btn-delete" data-id="<{$user['mt_id']}>">刪除</a> </td> </tr> <{/foreach}> </tbody> </table> <div> <{$pageHtml}> </div> </div> </div> <script> layui.use(['laydate'], function () { var laydate = layui.laydate; //日期範圍選擇 laydate.render({ elem: '#time-range', range: '~' }); }); //新增 $('.btn-add-account').on('click', function () { layer.open({ type: 2, title: '新增/編輯地圖獲客任務', content: '/dydqtshoppc/collect/addMapTask', area: '580px', success: function(layero, index) { //找到當前彈出層的iframe元素 let iframe = layui.$(layero).find('iframe'); //設定iframe的高度為當前iframe內body的高度 let iheight = Math.min(window.innerHeight-50, 750, iframe[0].contentDocument.body.offsetHeight); iframe.css('height', iheight); //重新調整彈出層的位置,保證彈出層在當前螢幕的中間位置 $(layero).css('top', (window.innerHeight - iheight -42) / 2); } }); }); //批量開啟 function batchOpen(){ //選中項 var ids = [];//批量id陣列 $("input[class='table-select-input']:checked").each(function() { ids.push($(this).val()); }); if(ids.length==0){ layer.msg("請選擇賬號資料"); return false; } this.toBatchOpenClose('open',ids); } //批量關閉 function batchClose(){ var ids = [];//批量id陣列 $("input[class='table-select-input']:checked").each(function() { ids.push($(this).val()); }); if(ids.length==0){ layer.msg("請選擇賬號資料"); return false; } this.toBatchOpenClose('close',ids); } //批量開啟關閉核心方法 function toBatchOpenClose(status,ids){ if(status == 'open'){ var title = '開啟'; }else if(status == 'close'){ var title = '關閉'; } layer.confirm('確定'+title+'選中監控賬號?', { title:'提示', btn: ['確定','取消'] //按鈕 }, function(){ layer.load(1); $.ajax({ url: '/dydqtshoppc/scane/openCloseAccount', type: 'post', data: { ids:ids, status:status, }, dataType: 'json', success: function (res) { layer.closeAll(); if (res.ec == 200) { window.location.reload(); } else { layer.msg(res.em); } }, }) }); } //批量刪除 function batchDelete(){ let ids = [];//批量id陣列 $("input[class='table-select-input']:checked").each(function() { ids.push($(this).val()); }); if(ids.length==0){ layer.msg("請選擇需要刪除的任務"); return false; } this.toDel(ids); } //刪除核心方法 function toDel(ids){ layer.confirm('確定要刪除選中的任務?', { title:'提示', btn: ['確定','取消'] //按鈕 }, function(){ layer.load(1); $.ajax({ url: '/dydqtshoppc/collect/deleteMapTask', type: 'post', data: { ids }, dataType: 'json', success: function (res) { layer.closeAll(); if (res.ec == 200) { window.location.reload(); } else { layer.msg(res.em); } } }) }); } /** * 刪除賬號 */ function confirmDelete(ele) { var id = $(ele).data('id'); var ids = [id]; this.toDel(ids); } /** * 關閉賬號 */ function closeAccount(ele) { var id = $(ele).data('id'); var status = 'close'; var ids = [id]; this.toBatchOpenClose(status,ids); } /** * 開啟賬號 */ function openAccount(ele) { var id = $(ele).data('id'); var status = 'open'; var ids = [id]; this.toBatchOpenClose(status,ids); } function openFollow(ele){ let id = $(ele).data('id'); let status = $(ele).data('type'); let tips = status == 'open' ? "開啟檢索賬號粉絲功能,需要檢索賬號是否開啟隱私保護,如果開啟,將無法檢索粉絲" : "確定關閉賬號粉絲檢索"; layer.confirm(tips, { title:'提示', btn: ['確定','取消'] //按鈕 }, function(){ $.ajax({ url: '/dydqtshoppc/scane/openCloseFollow', type: 'post', data: { fid:id, type:status, }, dataType: 'json', success: function (res) { if (res.ec == 200) { parent.window.location.reload(); } else { layer.msg(res.em); } }, }); }); } function setGaodeKey(ele, source) { var key = $(ele).data('key'); layer.prompt({title: '請輸入獲取的地圖key', value: key, maxlength: 140, formType: 2}, function(val, index){ if (val.length < 1) { layer.msg('請輸入正確的地圖key'); return false; } layer.close(index); layer.load(1); $.ajax({ url: '/dydqtshoppc/collect/submitMapKey', type: 'post', data: { key:val, type:source, }, dataType: 'json', success: function (res) { layer.closeAll(); if (res.ec == 200) { window.location.reload(); } else { layer.msg(res.em); } }, }); }); } </script>