今天给大家讲讲地图获客,通过关键词搜索出高德,百度,腾讯三大地图店铺对应的信息;
这里我们可以看到对应城市的关键词信息,高德的比较全面,只要对应商家又在高德上认领自己的门店信息都可以爬取出来。爬取下来的信息会保留在我们的采集客户库里,有对应的信息
<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/ZFAIvAultQ0or7938JoH6hkorBWguAYIGfEDlDfeOjgDlAJ20rxcWgW5uKqzCKXVL4FZf2XgB5BLgbJcDAAuI/wHCJMBAiCrPieVAhuQp14a2AGkAvW9XLgFUv4WEJZ11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9Wfra/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/4AAv79Av78r1aogv58cxqocxsYazLMu0bkn2MQgv68r1bgbyK0pzr0axLEq1b4Zv6wfxrAs070lzrkgybQiy7cbxa0n0boZwqwo1LwYwKsr1b8dx7EfyLEkzrgm0Lsbw60ZwawYwasp1L0n0rwq1b8aw6wp1L0cxa8n0LohybQbxK0hy7Yn1Lw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ES67caI+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>