/**
|
* 加载后台运行时支持的css样式和js脚本
|
* by 姜友瑶
|
* 2015-12-1
|
*/
|
function getRootPath() {
|
var curWwwPath = window.document.location.href;
|
let url="";
|
var pathName = window.document.location.pathname;
|
if(pathName&&pathName!="/"){
|
url= curWwwPath.substring(0, curWwwPath.indexOf(pathName));
|
}else{
|
url= curWwwPath;
|
}
|
console.log(url);
|
return url;
|
|
// if(url.indexOf('localhost')>0){
|
// return url++- pathName.substring(0, pathName.substr(1).indexOf('/') + 1);
|
// console.log("1"+url);
|
// }
|
// if(url.split(".").length==4){
|
// return url+ pathName.substring(0, pathName.substr(1).indexOf('/') + 1);
|
// console.log("2"+url);
|
// }
|
|
}
|
/** 全局路径,代表当前网站的根URL */
|
var basePath = getRootPath();
|
|
/*******************************************************************************
|
* base style and script not change the file order
|
******************************************************************************/
|
document.write('<link href="' + basePath + '/plugin/bootstrap-3.3.5/css/bootstrap.min.css" rel="stylesheet" type="text/css" />'
|
+ '<link href="' + basePath + '/plugin/Validform_v5.3.2/style.css" rel="stylesheet" type="text/css" />'
|
+ '<link href="' + basePath + '/plugin/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css" />'
|
+ '<link href="' + basePath + '/css/styleOne/animate.min.css" rel="stylesheet" type="text/css" />'
|
+ '<link href="' + basePath + '/css/styleOne/style.min.css" rel="stylesheet" type="text/css" />'
|
+ '<link href="' + basePath + '/css/styleOne/iconfont.css" rel="stylesheet" type="text/css" />'
|
+ '<link href="' + basePath + '/css/styleOne/awesome-bootstrap-checkbox.css" rel="stylesheet" type="text/css" />'
|
|
+ ' <link href="' + basePath + '/plugin/datetimrpicker/bootstrap-datetimepicker.css" rel="stylesheet">'
|
+ '<link href="' + basePath + '/plugin/bootstrap-table/bootstrap-table.css" rel="stylesheet" type="text/css" />'
|
+ '<link href="' + basePath + '/plugin/bootstrap-table/extensions/fixed-columns/bootstrap-table-fixed-columns.css" rel="stylesheet" type="text/css" />'
|
+ '<link href="' + basePath + '/plugin/select2/select2.min.css" rel="stylesheet" />'
|
+ '<link href="' + basePath + '/plugin/bootstrapvalidator/css/bootstrapValidator.css" rel="stylesheet" />'
|
/*全页面图标*/
|
+ '<link rel="shortcut icon" href="' + basePath + '/images/favicon.ico">'
|
);
|