|
@@ -2,8 +2,8 @@
|
|
//定义几个项目的全局变量[如果用户修改了项目的名称,请更新以下几个变量]
|
|
//定义几个项目的全局变量[如果用户修改了项目的名称,请更新以下几个变量]
|
|
var tiantiAdminName = 'tianti-module-admin';
|
|
var tiantiAdminName = 'tianti-module-admin';
|
|
var tiantiInterfaceName = 'tianti-module-interface';
|
|
var tiantiInterfaceName = 'tianti-module-interface';
|
|
- var tiantiGateway = 'tianti-module-gateway';
|
|
|
|
-
|
|
|
|
|
|
+ var tiantiGateway = 'gateway';
|
|
|
|
+
|
|
window.isLocalhost = window.location.hostname == "localhost";
|
|
window.isLocalhost = window.location.hostname == "localhost";
|
|
window.ctx = "";
|
|
window.ctx = "";
|
|
if (window.location.protocol == "file:") {
|
|
if (window.location.protocol == "file:") {
|
|
@@ -12,36 +12,38 @@
|
|
window.ctx = url[0] + "/";
|
|
window.ctx = url[0] + "/";
|
|
}
|
|
}
|
|
}else {
|
|
}else {
|
|
- window.ctx = window.location.protocol + "//" + window.location.host + "/"+tiantiGateway+"/";
|
|
|
|
|
|
+ window.ctx = window.location.protocol + "//" + window.location.host + "/";
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
window.root = window.ctx + "tianti/";
|
|
window.root = window.ctx + "tianti/";
|
|
window.static = window.ctx + "static/";
|
|
window.static = window.ctx + "static/";
|
|
window.notImgUrl = window.static + "images/img_null.png";
|
|
window.notImgUrl = window.static + "images/img_null.png";
|
|
-
|
|
|
|
|
|
+
|
|
window.server = window.location.protocol + "//" + window.location.host +"/";
|
|
window.server = window.location.protocol + "//" + window.location.host +"/";
|
|
- window.serverPath = window.server + tiantiInterfaceName+"/";
|
|
|
|
|
|
+ // window.serverPath = window.server + tiantiInterfaceName+"/";
|
|
|
|
+ window.serverPath = "http://if.cmms.org.cn/";
|
|
//后台上传的图片地址
|
|
//后台上传的图片地址
|
|
- window.serverUploadPath = window.server + tiantiAdminName+"/";
|
|
|
|
-
|
|
|
|
|
|
+ // window.serverUploadPath = window.server + tiantiAdminName+"/";
|
|
|
|
+ window.serverUploadPath = "http://admin.cmms.org.cn:8081";
|
|
|
|
+
|
|
jc.require.url.push(window.static + "js/jquery.pagination.js");
|
|
jc.require.url.push(window.static + "js/jquery.pagination.js");
|
|
jc.require.url.push(window.static + "js/jquery.nicescroll.min.js");
|
|
jc.require.url.push(window.static + "js/jquery.nicescroll.min.js");
|
|
jc.require.url.push(window.static + "css/common.css");
|
|
jc.require.url.push(window.static + "css/common.css");
|
|
jc.require.url.push(window.static + "js/uiExtend.js");
|
|
jc.require.url.push(window.static + "js/uiExtend.js");
|
|
-
|
|
|
|
|
|
+
|
|
jc.require.success = function () {
|
|
jc.require.success = function () {
|
|
if ($("html").niceScroll) {
|
|
if ($("html").niceScroll) {
|
|
$("html").niceScroll({ zindex: 9999, autohidemode: false, cursorwidth: "4px", cursorcolor: "#333", cursorborder: 0, cursoropacitymax: 0.8 });
|
|
$("html").niceScroll({ zindex: 9999, autohidemode: false, cursorwidth: "4px", cursorcolor: "#333", cursorborder: 0, cursoropacitymax: 0.8 });
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
window.routerList = {
|
|
window.routerList = {
|
|
index: window.root + "index/index.html",
|
|
index: window.root + "index/index.html",
|
|
menuAndTextlist: window.root + "menuAndTextlist/menuAndTextlist.html",
|
|
menuAndTextlist: window.root + "menuAndTextlist/menuAndTextlist.html",
|
|
menuAndDetail: window.root + "menuAndDetail/menuAndDetail.html"
|
|
menuAndDetail: window.root + "menuAndDetail/menuAndDetail.html"
|
|
}
|
|
}
|
|
-
|
|
|
|
-
|
|
|
|
|
|
+
|
|
|
|
+
|
|
window.path = {
|
|
window.path = {
|
|
cmsApiColumnList: window.serverPath + "cms/api/column/list",
|
|
cmsApiColumnList: window.serverPath + "cms/api/column/list",
|
|
cmsApiArticleList: window.serverPath + "cms/api/article/list",
|
|
cmsApiArticleList: window.serverPath + "cms/api/article/list",
|
|
@@ -49,7 +51,7 @@
|
|
cmsApiArticleNext: window.serverPath + "cms/api/article/next",
|
|
cmsApiArticleNext: window.serverPath + "cms/api/article/next",
|
|
cmsApiArticlePre: window.serverPath + "cms/api/article/pre"
|
|
cmsApiArticlePre: window.serverPath + "cms/api/article/pre"
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
window.arraySortASC = function (array, keyName) {
|
|
window.arraySortASC = function (array, keyName) {
|
|
if (!array) return array;
|
|
if (!array) return array;
|
|
array.sort(function (num1, num2) {
|
|
array.sort(function (num1, num2) {
|
|
@@ -57,8 +59,8 @@
|
|
});
|
|
});
|
|
return array;
|
|
return array;
|
|
}
|
|
}
|
|
-
|
|
|
|
-
|
|
|
|
|
|
+
|
|
|
|
+
|
|
window.resource = function (path, data, fnSuccess, async) {
|
|
window.resource = function (path, data, fnSuccess, async) {
|
|
var _data = data;
|
|
var _data = data;
|
|
if (async == undefined) {
|
|
if (async == undefined) {
|
|
@@ -89,7 +91,7 @@
|
|
async: async
|
|
async: async
|
|
});
|
|
});
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
window.router = function (routerListName, param, only) {
|
|
window.router = function (routerListName, param, only) {
|
|
var nowParam = jc.param.getObject();
|
|
var nowParam = jc.param.getObject();
|
|
var resultParam = "";
|
|
var resultParam = "";
|