Resource/Js/Admin.js
(完整代码) 1KB//*****获取根路径Start*****
function getRootPath() {
var curPageUrl = window.document.location.href;
var rootPath = "";
rootPath = curPageUrl.split("//")[1].split("/")[0];
rootPath = rootPath.slice(0, 9);
if (rootPath === "localhost") {
rootPath = curPageUrl.split("//")[0] + "//" + curPageUrl.split("//")[1].split("/")[0];
} else {
rootPath = curPageUrl.split("//")[0] + "//" + curPageUrl.split("//")[1].split("/")[0];
}
return rootPath;
}
//判断url是否在iframe打开
if (window.frames.length == parent.frames.length) {
//alert('不在iframe中' + window.document.location.href);
window.location.replace(getRootPath() + '/Views/Default?url=' + encodeURIComponent(window.document.location.href));
//window.location.replace(getRootPath() + '/Views/Default?url=' + window.document.location.href);
}
layui.config({
base: getRootPath() + '/layuiadmin/' //静态资源所在路径
//, version: true
}).extend({
index: 'lib/index' //主入口模块
//, echarts: 'lib/extend/echarts' //自定义模块
//, micro: '{/}/layuiadmin/lib/extend/micro' //自定义模块
//, micro: 'lib/extend/micro'
}).use(['index', 'micro'], function () {
//设置水印
var micro = layui.micro;
micro.setWaterMark();
});
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。
