if(!Promise){ var Promise = require("bluebird"); // Configure Promise.config({ longStackTraces: true, warnings: true // note, run node with --trace-warnings to see full stack traces for warnings }) } require('../css/information.less') const { post, throttle, imageUrlPrefix, config, getUrlArgObject, openNewWin } = require('./promise.js'); const $ = require("jquery"); let showName,noticeName,clinicalPathwayName function getInfomation() { var param = { "type": getUrlArgObject('type'), "name": getUrlArgObject('name'), "position": getUrlArgObject('position'), "contentTypes":[1,2,3] }; const uname = getUrlArgObject('uname') showName = param.name // if (param.type == 5 || param.type == 51) { // param.type = 12; // param.name = uname; // } post(config.information, param).then((res) => { const data = res.data.data document.title = showName var str = ''; var anchors = ''; if (!data) { $("h1").html("暂时没有数据"); $(".anchors").css("display", "none"); return; } var detailList = data.details var staticKnowList = detailList['静态知识'] var noticeInfo = detailList['注意事项'] var clinicalPathwayInfo = detailList['临床路径'] noticeName = data.noticeName || "注意事项" clinicalPathwayName = data.clinicalPathwayName || "临床路径" // $("h1").css({ // "color": "#267FD7", // "borderBottom": "4px solid #E9E9E9", // "padding": "0px 60px 50px 0px" // }); renderTab(detailList) staticKnowList&&renderContent(staticKnowList,'staticKnowledge') noticeInfo&&renderContent(noticeInfo,'notice') clinicalPathwayInfo&&renderContent(clinicalPathwayInfo,'clinicalPathway') $('.content img').bind('contextmenu', function(){ return false }) }) } getInfomation(); function renderContent(list, contentWrapClassName){ for (var i = 0; i < list.length; i++) { var item = list[i]; item.content = item.content&&item.content.replace(/{imageUrlPrefix}/g, imageUrlPrefix); anchors = '
' + item.content + ''; str = `