From 6876084ffc4a01c1eca6a609dec8c176efc59aae Mon Sep 17 00:00:00 2001
From: zhang <zc857179121@qq.com>
Date: 星期四, 22 一月 2026 15:16:45 +0800
Subject: [PATCH] 1
---
zy-acs-cv/src/main/webapp/static/js/common.js | 38 +++++++++++++++++++-------------------
1 files changed, 19 insertions(+), 19 deletions(-)
diff --git a/zy-acs-cv/src/main/webapp/static/js/common.js b/zy-acs-cv/src/main/webapp/static/js/common.js
index 3dbaab4..4b31eec 100644
--- a/zy-acs-cv/src/main/webapp/static/js/common.js
+++ b/zy-acs-cv/src/main/webapp/static/js/common.js
@@ -1,8 +1,8 @@
-var baseUrl = "/xgmFlwcs";
+var baseUrl = "/cv";
// 璧嬪��
function setVal(el, val) {
- if (el.text() !== val){
+ if (el.text() !== val) {
el.html(val);
}
}
@@ -13,7 +13,7 @@
var detailWidth = '90%';
// 闈炵┖鍒ゆ柇
-function isEmpty(obj){
+function isEmpty(obj) {
return typeof obj == "undefined" || obj == null || obj === "";
}
@@ -47,7 +47,7 @@
// 娓呯悊瀵硅薄null鍊�
function reObject(data) {
for (var obj in data) {
- if (data[obj]===null){
+ if (data[obj] === null) {
delete data[obj];
}
}
@@ -64,25 +64,25 @@
}
// 鏉冮檺
-function limit(child){
- if (child == null){
+function limit(child) {
+ if (child == null) {
child = false;
}
- var param = (child?parent.window:window).location.href.split("?")[1];
+ var param = (child ? parent.window : window).location.href.split("?")[1];
if (null != param) {
var resourceId = param.split("=")[1];
$.ajax({
- url: baseUrl+"/power/menu/"+resourceId+"/auth",
+ url: baseUrl + "/power/menu/" + resourceId + "/auth",
headers: {'token': localStorage.getItem('token')},
method: 'GET',
async: false,
success: function (res) {
- if (res.code === 200){
- for(var i = 0, len = res.data.length; i < len; i++) {
- (child?parent:window).$('#'+res.data[i].code).css("display", "inline-block");
- (child?parent:window).$('.'+res.data[i].code).css("display", "inline-block");
+ if (res.code === 200) {
+ for (var i = 0, len = res.data.length; i < len; i++) {
+ (child ? parent : window).$('#' + res.data[i].code).css("display", "inline-block");
+ (child ? parent : window).$('.' + res.data[i].code).css("display", "inline-block");
}
- } else if (res.code === 403){
+ } else if (res.code === 403) {
window.location.href = baseUrl;
} else {
layer.msg(res.msg)
@@ -92,7 +92,6 @@
}
}
-
// http璇锋眰
@@ -137,11 +136,11 @@
timeout: 10000,
cache: false,
success: function (res) {
- if (res.code === 200){
+ if (res.code === 200) {
callback(res);
- } else if (res.code === 403){
- parent.location.href = baseUrl+"/login";
- } else {
+ } else if (res.code === 403) {
+ parent.location.href = baseUrl + "/login";
+ } else {
layer.msg(res.msg, {icon: 2});
}
},
@@ -170,11 +169,12 @@
return null;
}
-function getDateFormat(value){
+function getDateFormat(value) {
var date = new Date();// 鑾峰彇褰撳墠鏃堕棿
date.setDate(date.getDate() + value);// 璁剧疆澶╂暟 -1 澶�
return date.Format("MM-dd");
}
+
/**
* 鏃ユ湡鏍煎紡鍖�
*/
--
Gitblit v1.9.1