v>

webapp.html 2.3KB

    <!DOCTYPE> <html> <head> <title></title> <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/> <script type="text/javascript" src="../internal.js"></script> <style type="text/css"> .wrapper{width: 540px; margin: 10px auto;} #appShow {border: 1px solid #ddd;} .errorMsg{font-size: 13px;margin: 10px;color: #dd0000} </style> </head> <body> <div class="wrapper"> <div id="appShow"></div> </div> <script type="text/javascript"> //此处配置您在百度上申请到的appkey。 var apikey = editor.options.webAppKey; if ( apikey && apikey.length == 24 ) { var searchConfig = { container:'appShow', //容器ID tips:"", //该值用于自动清空 search:1, //是否显示搜索框 ps:12, //每页显示的条数 suggest:1, //是否开启搜索自动完成 limit:0, //搜索结果显示条数,0表示无限制 searchNow:0, //是否在初始化完成时立即搜索 apikey:apikey, //每人得 pager:1, cid:7134562, outputHTML:1 },baiduApp; function clickCallback() { baiduApp.addEventListener( 'getAppHTML', function ( e, data ) { var url = 'http://app.baidu.com/app/enter?appid='+data.data['app_id'] +'&tn=app_canvas&app_spce_id=1&apikey='+apikey+'&api_key=' + apikey; editor.execCommand( "webapp", {url:url,width:data.uniWidth,height:data.uniHeight+60,logo:data.data['app_logo'],title:data.data['app_name']}); dialog.close(); } ); } var script = document.createElement( "script" ); script.type = "text/javascript"; script.src = "http://app.baidu.com/appweb/api/search?auto=yes&container=container&apikey=" + apikey + "&instanceName=baiduApp&callback=clickCallback&config=searchConfig"; document.body.appendChild( script ); } else { $G( "appShow" ).innerHTML = "<p class='errorMsg'>"+lang.tip1+"<a title='"+lang.anthorApi+"' href='http://app.baidu.com/static/cms/getapikey.html' target='_blank'>"+lang.applyFor+"</a></p><p class='errorMsg'>"+lang.tip2+"</p>" ; } </script> </body> </html>
jiapeng/portal-front - Gogs: Go Git Service

1 次代码提交 (14be9cd417462f01eeac69c5cefb898aff1f142e)

作者 SHA1 备注 提交日期
  jiapeng 50c93078f8 e3e 7 年之前
jiapeng/portal-front - Gogs: Go Git Service

2 次代碼提交 (1528a2a6ad2adbd942d9eb4656a979e25254bd52)

作者 SHA1 備註 提交日期
  luyanan 2997e9388d 企业版导航条和表单类表现方式和效果 7 年之前
  xuchunyang 1d2e5bae47 企业页面 7 年之前
jiapeng/portal-front - Gogs: Go Git Service

12 Commits (01adc65b74fe0c948c56e2d13915cd46770d212d)

Autore SHA1 Messaggio Data
  lyn7568 8fcd17157e pc调试 5 anni fa
  LIPENGTAO1313 1331229e06 修正 6 anni fa
  LIPENGTAO1313 3905fd95b6 修正 6 anni fa
  LIPENGTAO1313 cac28c3192 修正 6 anni fa
  luyanan 11bc56c74a 浏览页企业信息显示bug,企业工作台中相关列表样式统一 6 anni fa
  XMTT 84cebf3dc1 文章接口变动 6 anni fa
  li 11698b3f07 修正 6 anni fa
  luyanan 25d3a8ee07 服务H5跳转 6 anni fa
  luyanan 18676e38b2 服务添加浏览量 6 anni fa
  li f0a995e723 预览 6 anni fa
  li b3d979d8ae 服务 6 anni fa
  li d77c797674 服务 6 anni fa
portal-front - Gogs: Go Git Service

portal html css js resource

jquery.imagezoom.min.js 3.0KB

    (function($){$.fn.imagezoom=function(options){var settings={xzoom:310,yzoom:310,offset:10,position:"BTR",preload:1};if(options){$.extend(settings,options);} var noalt='';var self=this;$(this).bind("mouseenter",function(ev){var imageLeft=$(this).offset().left;var imageTop=$(this).offset().top;var imageWidth=$(this).get(0).offsetWidth;var imageHeight=$(this).get(0).offsetHeight;var boxLeft=$(this).parent().offset().left;var boxTop=$(this).parent().offset().top;var boxWidth=$(this).parent().width();var boxHeight=$(this).parent().height();noalt=$(this).attr("alt");var bigimage=$(this).attr("rel");$(this).attr("alt",'');if($("div.zoomDiv").get().length==0){$(document.body).append("<div class='zoomDiv'><img class='bigimg' src='"+bigimage+"'/></div><div class='zoomMask'>&nbsp;</div>");} if(settings.position=="BTR"){if(boxLeft+boxWidth+settings.offset+settings.xzoom>screen.width){leftpos=boxLeft-settings.offset-settings.xzoom;}else{leftpos=boxLeft+boxWidth+settings.offset;}}else{leftpos=imageLeft-settings.xzoom-settings.offset;if(leftpos<0){leftpos=imageLeft+imageWidth+settings.offset;}} $("div.zoomDiv").css({top:boxTop,left:leftpos});$("div.zoomDiv").width(settings.xzoom);$("div.zoomDiv").height(settings.yzoom);$("div.zoomDiv").show();$(this).css('cursor','crosshair');$(document.body).mousemove(function(e){mouse=new MouseEvent(e);if(mouse.x<imageLeft||mouse.x>imageLeft+imageWidth||mouse.y<imageTop||mouse.y>imageTop+imageHeight){mouseOutImage();return;} var bigwidth=$(".bigimg").get(0).offsetWidth;var bigheight=$(".bigimg").get(0).offsetHeight;var scaley='x';var scalex='y';if(isNaN(scalex)|isNaN(scaley)){var scalex=(bigwidth/imageWidth);var scaley=(bigheight/imageHeight);$("div.zoomMask").width((settings.xzoom)/scalex);$("div.zoomMask").height((settings.yzoom)/scaley);$("div.zoomMask").css('visibility','visible');} xpos=mouse.x-$("div.zoomMask").width()/2;ypos=mouse.y-$("div.zoomMask").height()/2;xposs=mouse.x-$("div.zoomMask").width()/2-imageLeft;yposs=mouse.y-$("div.zoomMask").height()/2-imageTop;xpos=(mouse.x-$("div.zoomMask").width()/2<imageLeft)?imageLeft:(mouse.x+$("div.zoomMask").width()/2>imageWidth+imageLeft)?(imageWidth+imageLeft-$("div.zoomMask").width()):xpos;ypos=(mouse.y-$("div.zoomMask").height()/2<imageTop)?imageTop:(mouse.y+$("div.zoomMask").height()/2>imageHeight+imageTop)?(imageHeight+imageTop-$("div.zoomMask").height()):ypos;$("div.zoomMask").css({top:ypos,left:xpos});$("div.zoomDiv").get(0).scrollLeft=xposs*scalex;$("div.zoomDiv").get(0).scrollTop=yposs*scaley;});});function mouseOutImage(){$(self).attr("alt",noalt);$(document.body).unbind("mousemove");$("div.zoomMask").remove();$("div.zoomDiv").remove();} count=0;if(settings.preload){$('body').append("<div style='display:none;' class='jqPreload"+count+"'></div>");$(this).each(function(){var imagetopreload=$(this).attr("rel");var content=jQuery('div.jqPreload'+count+'').html();jQuery('div.jqPreload'+count+'').html(content+'<img src=\"'+imagetopreload+'\">');});}}})(jQuery);function MouseEvent(e){this.x=e.pageX;this.y=e.pageY;}