var odetail = document.getElementById("detail"); //详细描述 var ohezuo = document.getElementById("hezuo"); //合作备注 var oEnter = document.getElementById("fess"); var ofielddiv = document.getElementById("fielddiv"); //学术领域容器 var oapplydiv = document.getElementById("applydiv"); //应用行业容器 var odetaildiv = document.getElementById("detaildiv"); //详细描述容器 var ohezuodiv = document.getElementById("hezuodiv"); //合作备注容器 function ziyuaninfo(resourceId) { $.ajax({ url: '../ajax/resource/resourceInfo', data: { 'resourceId': resourceId }, dataType: 'json', //服务器返回json格式数据 type: 'get', //HTTP请求类型 async:false, timeout: 10000, //超时时间设置为10秒; success: function(data) { if(data.success) { console.log(JSON.stringify(data)); var mydata = data.data; //资源名称 professorId = mydata['editProfessor']['id']; var userid = GetQueryString('userid'); if(professorId == userid) { document.getElementsByClassName("footbox")[0].style.display = "none"; } (mydata['resourceName']) ? oresourceName.innerHTML = mydata['resourceName']: oresourceName.innerHTML = ''; //title标题栏 shareTitle = "【科袖资源】" + mydata['resourceName']; window.setInterval(function() { document.title = "【科袖资源】" + mydata['resourceName']; }, 500); //专家信息 proId = mydata['editProfessor']['id']; //专家id //专家名字 (mydata['editProfessor']["name"]) ? oproname.innerText = mydata['editProfessor']["name"]: oproname.innerText = ''; //职称 (mydata['editProfessor']["title"]) ? oprotitle.innerHTML = mydata['editProfessor']["title"]: oprotitle.innerHTML = ''; //职位 if(mydata['editProfessor']["office"] == null || mydata['editProfessor']["office"] == undefined) { oprooffice.innerHTML = ''; } else { if(mydata['editProfessor']["title"]) { oprooffice.innerHTML = ',' + mydata['editProfessor']["office"]; //职位 } oprooffice.innerHTML = mydata['editProfessor']["office"]; //职位 }; //所在机构 (mydata['editProfessor']["orgName"]) ? oproorgName.innerHTML = mydata['editProfessor']["orgName"]: oproorgName.innerHTML = ''; //所在地 (mydata['editProfessor']["address"]) ? oproadress.innerHTML = mydata['editProfessor']["address"]: oproadress.innerHTML = ''; /*是否认证*/ var oStyT=autho(mydata['editProfessor'].authType,mydata['editProfessor'].orgAuth,mydata['editProfessor'].authStatus); opromodify.classList.add(oStyT.sty); opromodify.setAttribute("title",oStyT.title); /*专家头像*/ (mydata['editProfessor']["hasHeadImage"] == 0) ? oproimg.setAttribute('src', '../images/default-photo.jpg'): oproimg.setAttribute('src', '../images/head/' + mydata['editProfessor']['id'] + '_m.jpg'); //资源基本信息 //(mydata['images']['imageSrc']) ? oziyuanimg.setAttribute('src', mydata['images']['imageSrc']): oziyuanimg.setAttribute('src', '../images/default-resource.jpg'); //资源图片 var imgRes = "../images/resource/" + mydata.resourceId + ".jpg"; if(mydata['images'].length) { oziyuanimg.setAttribute('src', imgRes) } else { oziyuanimg.setAttribute('src', '../images/default-resource.jpg') } (mydata['supportedServices']) ? oyongtu.innerHTML = mydata['supportedServices']: oyongtu.innerHTML = ''; //应用用途 descContent = "应用用途:" + mydata['supportedServices']; //学术领域 if(mydata['subject']) { if(mydata['subject'].indexOf(',') != -1) { //字符串是否包含, var fieldlist = mydata['subject'].split(","); console.log(fieldlist.length); for(var i = 0; i < fieldlist.length; i++) { var oli = document.createElement('li'); oli.innerText = fieldlist[i]; ofield.appendChild(oli); } } else { var oli = document.createElement('li'); oli.innerText = mydata['subject']; ofield.appendChild(oli); } } else { ofielddiv.style.display = 'none'; } //应用行业 if(mydata['industry']) { if(mydata['industry'].indexOf(',') != -1) { //字符串是否包含, var applylist = mydata['industry'].split(","); console.log(applylist.length); for(var i = 0; i < applylist.length; i++) { var oli = document.createElement('li'); oli.innerText = applylist[i]; oapply.appendChild(oli); } } else { var oli = document.createElement('li'); oli.innerText = mydata['industry']; oapply.appendChild(oli); } } else { oapplydiv.style.display = 'none'; } //详细描述 if(mydata['descp']) { odetail.innerHTML = mydata['descp']; var pWidth = $("#detail").find("p").width(); var leng = $("#detail").find("img").length; for(var i = 0; i < leng; i++) { (function(i) { $("#detail").find("img").eq(i).load(function() { var imgWidth = $("#detail").find("img").eq(i).width(); if(imgWidth > pWidth) { $("#detail").find("img").eq(i).css({ "width": "100%" }) } }) })(i); } } else { odetaildiv.style.display = 'none'; } //合作备注 if(mydata['cooperationNotes']) { ohezuo.innerHTML = mydata['cooperationNotes']; } else { ohezuodiv.style.display = 'none'; } } }, error: function(e) { return; } }); } //资源信息 ziyuaninfo(resourceId); /*微信分享*/ $.ajax({ url: "../ajax/weixin/jsapiTicket", type: 'get', dataType: 'json', contentType: "application/x-www-form-urlencoded; charset=utf-8", data: { 'url': location.href.split('#')[0] }, success: function(data) { if(data.data) { wx.config({ debug: false, //调试模式好犀利 appId: data.data.appId, timestamp: data.data.timestamp, nonceStr: data.data.nonceStr, signature: data.data.signature, jsApiList: [ // 所有要调用的 API 都要加到这个列表中 "onMenuShareAppMessage", "onMenuShareTimeline", "onMenuShareQQ", "onMenuShareQZone", "scanQRCode", ] }); wx.ready(function() { // 在这里调用 API wx.onMenuShareAppMessage({ //分享给朋友 title: shareTitle, // 分享标题 desc: descContent, // 分享描述 link: lineLink, // 分享链接 imgUrl: imgUrl, // 分享图标 success: share_success_callback, cancel: share_cancel_callback }); wx.onMenuShareTimeline({ //分享到朋友圈 title: shareTitle, // 分享标题 desc: descContent, // 分享描述 link: lineLink, // 分享链接 imgUrl: imgUrl, // 分享图标 success: share_success_callback, cancel: share_cancel_callback }); wx.onMenuShareQQ({ //分享到QQ title: shareTitle, // 分享标题 desc: descContent, // 分享描述 link: lineLink, // 分享链接 imgUrl: imgUrl, // 分享图标 success: share_success_callback, cancel: share_cancel_callback }); wx.onMenuShareQZone({ //分享到QQ空间 title: shareTitle, // 分享标题 desc: descContent, // 分享描述 link: lineLink, // 分享链接 imgUrl: imgUrl, // 分享图标 success: share_success_callback, cancel: share_cancel_callback }); }); //分享成功后的回调函数 function share_success_callback() {} //用户取消分享后执行的回调函数 function share_cancel_callback() {} } } }); /*标志*/ function autho() { if(arguments[0] == 1) { return { "sty": "authicon-pro", "title": "科袖认证专家" } } else { if(arguments[1] == 1) { return { "sty": "authicon-staff-ok", "title": "企业认证员工" } } else { if(arguments[2] == 3) { return { "sty": "authicon-real", "title": "实名认证用户" } } else { return { "sty": "e ", "title": " " } } } } } }); </script> </body> </html> portal-front - Gogs: Go Git Service

portal html css js resource

wechat_icon_mima_nor@3x.png 1.6KB

portal-front - Gogs: Go Git Service

portal html css js resource

style.css 1.1KB

    img{ border:0px; } li{ list-style:none; } a{ text-decoration:none; outline:none; } input{ outline:none; } /*以下为新加select样式*/ .divselect{width:175px; float:left; position:relative;} .input_select{ width:173px; height:26px; border-radius:5px; border:1px #f99550 solid; box-shadow:0 0 1px #f99550 inset; background:url(../images/downselect.png) no-repeat 150px center; float:left;font-size:14px;line-height:26px; color:#000; padding-left:15px; cursor:pointer; display: block; font-style:normal; } .divselect ul{ width:170px; border:1px #f99550 solid; box-shadow:0 0 1px #f99550 inset; background-color:#ffffff; display:none; color: #999; font:font-size:14px;line-height:26px; position:absolute; z-index:10000; top:22px; } .divselect ul li{height:24px; line-height:24px;} .divselect ul li a{ display:block; height:24px; color:#333333; text-decoration:none; padding-left:15px; padding-right:15px; color: #a1a1a1; font-size:14px;line-height:26px; } .divselect ul li a:hover{background-color:#f9f9f9;}
jiapeng/console-front - Gogs: Go Git Service

1 Ревизии (3ef08aa633cf04a4b891ed307b61556bba6cb948)

Автор SHA1 Съобщение Дата
  jiapeng e551a43561 init преди 7 години
portal-front - Gogs: Go Git Service

portal html css js resource

g_article_icon_caogao_hig.png 1.1KB