88 lines
3.2 KiB
HTML
88 lines
3.2 KiB
HTML
<!--编辑器开始-->
|
||
<script>
|
||
$(function () {
|
||
//循环实例化编辑器
|
||
$(".news_editor").each(function(){
|
||
var editor_name=$(this).attr("editor_name");
|
||
var editor_width=$(this).attr("editor_width");
|
||
var editor_height=$(this).attr("editor_height");
|
||
var imgwidth=$(this).attr("imgwidth");
|
||
var imgheight=$(this).attr("imgheight");
|
||
var ue = UE.getEditor(editor_name, {
|
||
initialFrameHeight: editor_height>0?editor_height:"0",
|
||
initialFrameWidth: editor_width>0?editor_width:'90%',
|
||
imgwidth: imgwidth,
|
||
imgheight: imgheight,
|
||
});
|
||
//启用抓取微信文章功能
|
||
if(editor_name=="newstext"){
|
||
$(".subWxCrawler").show();
|
||
}
|
||
})
|
||
|
||
})
|
||
</script>
|
||
<!--编辑器结束-->
|
||
|
||
<!---百度地图--->
|
||
|
||
<script type="text/javascript" src="/Public/baidumap/setpoint.js"></script>
|
||
<script>
|
||
$(".baidu_map_field").each(function(){
|
||
var baidu_map=new baidumap();
|
||
baidu_map.map_search_value_id=$(this).find(".map_search_value").attr("id");
|
||
baidu_map.map_search_button_id=$(this).find(".map_search_button").attr("id");
|
||
baidu_map.map_field_id=$(this).find(".map_point").attr("id");
|
||
baidu_map.map_show_id=$(this).find(".map_show").attr("id");
|
||
baidu_map.showPoint=0;//如果修改信息的话需要显示之前的标记,这里请设置1 增加信息设置0
|
||
//启动地图显示区方法
|
||
baidu_map.newmap();
|
||
//启动地址模糊搜索方法
|
||
baidu_map.map_search();
|
||
//启动鼠标点击拾取坐标方法
|
||
baidu_map.map_position();
|
||
})
|
||
</script>
|
||
|
||
|
||
<!---微信抓取--->
|
||
<script>
|
||
//
|
||
function subWxCrawler(){
|
||
layer.prompt({title: '请输入微信推文地址', formType: 2,area: ['500px', '50px'],btn:"开始采集",maxlength:"10240"}, function(text,index){
|
||
var index=layer.load(0,{time:10000});//
|
||
$.ajax({
|
||
url:"/index.php?m=Admin&c=Tool&a=GetWxCrawler&pubid={$r.pubid}",
|
||
type:'post',
|
||
async:true,
|
||
data:{"url":text},
|
||
dataType:'json',
|
||
success:function(result){
|
||
var status=result.status;
|
||
var info=result.info;
|
||
if(status){
|
||
$("input[name='title']").val(info.title);
|
||
$("input[name='thumb']").val(info.cover);
|
||
$("input[name='newstime']").val(info.date);
|
||
$("input[name='description']").val(info.digest);
|
||
$("input[name='title']").val(info.title);
|
||
var ue= UE.getEditor("newstext");
|
||
ue.ready(function(){
|
||
ue.setContent(info.content_html);
|
||
});
|
||
layer.closeAll();
|
||
}else{
|
||
layer.alert(info);
|
||
}
|
||
},
|
||
error:function(xhr,textStatus){
|
||
alert("程序错误");
|
||
},
|
||
complete:function(){
|
||
layer.close(index);
|
||
}
|
||
})
|
||
});
|
||
}
|
||
</script>
|