fix(templates): URI编码

This commit is contained in:
xiongxiaoyang
2025-07-12 18:32:28 +08:00
parent d54eda2366
commit 6452c1603f
28 changed files with 38 additions and 38 deletions

View File

@@ -110,7 +110,7 @@
} else if (data.code == 1001) { } else if (data.code == 1001) {
//未登录 //未登录
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href); location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href);
} else { } else {
layer.alert(data.msg); layer.alert(data.msg);

View File

@@ -182,7 +182,7 @@
} else if (data.code == 1001) { } else if (data.code == 1001) {
//未登录 //未登录
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href); location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href);
} else { } else {
layer.alert(data.msg); layer.alert(data.msg);
@@ -226,7 +226,7 @@
} else if (data.code == 1001) { } else if (data.code == 1001) {
//未登录 //未登录
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href); location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href);
} else { } else {
layer.alert(data.msg); layer.alert(data.msg);

View File

@@ -217,7 +217,7 @@
loadPage(data.data); loadPage(data.data);
} else if (data.code == 1001) { } else if (data.code == 1001) {
//未登录 //未登录
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href); location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href);
} else { } else {
layer.alert(data.msg); layer.alert(data.msg);

View File

@@ -273,7 +273,7 @@
} else if (data.code == 1001) { } else if (data.code == 1001) {
//未登录 //未登录
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href); location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href);
}else { }else {
layer.alert(data.msg); layer.alert(data.msg);

View File

@@ -260,7 +260,7 @@
} else if (data.code == 1001) { } else if (data.code == 1001) {
//未登录 //未登录
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href); location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href);
} else { } else {
layer.alert(data.msg); layer.alert(data.msg);

View File

@@ -260,7 +260,7 @@
} else if (data.code == 1001) { } else if (data.code == 1001) {
//未登录 //未登录
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href); location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href);
} else { } else {
layer.alert(data.msg); layer.alert(data.msg);

View File

@@ -273,7 +273,7 @@
} else if (data.code == 1001) { } else if (data.code == 1001) {
//未登录 //未登录
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href); location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href);
}else { }else {
layer.alert(data.msg); layer.alert(data.msg);

View File

@@ -176,7 +176,7 @@
} else if (data.code == 1001) { } else if (data.code == 1001) {
//未登录 //未登录
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href); location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href);
}else { }else {
layer.alert(data.msg); layer.alert(data.msg);
@@ -206,7 +206,7 @@
} else if (data.code == 1001) { } else if (data.code == 1001) {
//未登录 //未登录
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href); location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href);
}else { }else {
layer.alert(data.msg); layer.alert(data.msg);

View File

@@ -182,7 +182,7 @@
} else if (data.code == 1001) { } else if (data.code == 1001) {
//未登录 //未登录
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href); location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href);
}else { }else {
layer.alert(data.msg); layer.alert(data.msg);
@@ -212,7 +212,7 @@
} else if (data.code == 1001) { } else if (data.code == 1001) {
//未登录 //未登录
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href); location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href);
}else { }else {
layer.alert(data.msg); layer.alert(data.msg);

View File

@@ -231,7 +231,7 @@
} else if (data.code == 1001) { } else if (data.code == 1001) {
//未登录 //未登录
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href); location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href);
} else { } else {
layer.alert(data.msg); layer.alert(data.msg);
@@ -261,7 +261,7 @@
} else if (data.code == 1001) { } else if (data.code == 1001) {
//未登录 //未登录
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href); location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href);
} else { } else {
layer.alert(data.msg); layer.alert(data.msg);

View File

@@ -213,7 +213,7 @@
} else if (data.code == 1001) { } else if (data.code == 1001) {
//未登录 //未登录
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href); location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href);
} else { } else {
layer.alert(data.msg); layer.alert(data.msg);
@@ -273,7 +273,7 @@
} else if (data.code == 1001) { } else if (data.code == 1001) {
//未登录 //未登录
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href); location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href);
}else { }else {
layer.alert(data.msg); layer.alert(data.msg);
@@ -311,7 +311,7 @@
} else if (data.code == 1001) { } else if (data.code == 1001) {
//未登录 //未登录
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href); location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href);
} else { } else {
layer.alert(data.msg); layer.alert(data.msg);

View File

@@ -380,7 +380,7 @@
} else if (data.code == 1001) { } else if (data.code == 1001) {
//未登录 //未登录
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href); location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href);
} else { } else {
layer.alert(data.msg); layer.alert(data.msg);

View File

@@ -274,7 +274,7 @@
} else if (data.code == 1001) { } else if (data.code == 1001) {
//未登录 //未登录
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href); location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href);
} else { } else {
layer.alert(data.msg); layer.alert(data.msg);

View File

@@ -182,7 +182,7 @@
} else if (data.code == 1001) { } else if (data.code == 1001) {
//未登录 //未登录
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href); location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href);
} else { } else {
layer.alert(data.msg); layer.alert(data.msg);

View File

@@ -244,7 +244,7 @@
} else if (data.code == 1001) { } else if (data.code == 1001) {
//未登录 //未登录
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href); location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href);
} else { } else {
layer.alert(data.msg); layer.alert(data.msg);

View File

@@ -99,7 +99,7 @@
} else if (data.code == 1001) { } else if (data.code == 1001) {
//未登录 //未登录
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href); location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href);
} else { } else {
layer.alert(data.msg); layer.alert(data.msg);

View File

@@ -109,7 +109,7 @@
} else if (data.code == 1001) { } else if (data.code == 1001) {
//未登录 //未登录
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href); location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href);
}else { }else {
layer.alert(data.msg); layer.alert(data.msg);

View File

@@ -144,7 +144,7 @@
} else if (data.code == 1001) { } else if (data.code == 1001) {
//未登录 //未登录
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href); location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href);
}else { }else {
layer.alert(data.msg); layer.alert(data.msg);

View File

@@ -74,7 +74,7 @@
} else if (data.code == 1001) { } else if (data.code == 1001) {
//未登录 //未登录
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href); location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href);
} else { } else {
layer.alert(data.msg); layer.alert(data.msg);

View File

@@ -109,7 +109,7 @@
} else if (data.code == 1001) { } else if (data.code == 1001) {
//未登录 //未登录
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href); location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href);
}else { }else {
layer.alert(data.msg); layer.alert(data.msg);

View File

@@ -131,7 +131,7 @@
} else if (data.code == 1001) { } else if (data.code == 1001) {
//未登录 //未登录
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href); location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href);
}else { }else {
layer.alert(data.msg); layer.alert(data.msg);

View File

@@ -61,7 +61,7 @@
} else if (data.code == 1001) { } else if (data.code == 1001) {
//未登录 //未登录
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href); location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href);
} else { } else {
layer.alert(data.msg); layer.alert(data.msg);
@@ -96,7 +96,7 @@
} else if (data.code == 1001) { } else if (data.code == 1001) {
//未登录 //未登录
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href); location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href);
} else { } else {
$("#LabErr").html(data.msg); $("#LabErr").html(data.msg);

View File

@@ -72,7 +72,7 @@
} else if (data.code == 1001) { } else if (data.code == 1001) {
//未登录 //未登录
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href); location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href);
} else { } else {
$("#LabErr").html(data.msg); $("#LabErr").html(data.msg);

View File

@@ -58,7 +58,7 @@
} else if (data.code == 1001) { } else if (data.code == 1001) {
//未登录 //未登录
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href); location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href);
} else { } else {
layer.alert(data.msg); layer.alert(data.msg);
@@ -81,7 +81,7 @@
} else if (data.code == 1001) { } else if (data.code == 1001) {
//未登录 //未登录
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href); location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href);
} else { } else {
layer.alert(data.msg); layer.alert(data.msg);

View File

@@ -79,7 +79,7 @@
} else if (data.code == 1001) { } else if (data.code == 1001) {
//未登录 //未登录
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href); location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href);
} else { } else {
layer.alert(data.msg); layer.alert(data.msg);
@@ -118,7 +118,7 @@
} else if (data.code == 1001) { } else if (data.code == 1001) {
//未登录 //未登录
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href); location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href);
} else { } else {
layer.alert(data.msg); layer.alert(data.msg);

View File

@@ -100,7 +100,7 @@
} else if (data.code == 1001) { } else if (data.code == 1001) {
//未登录 //未登录
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href); location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href);
} else { } else {
layer.alert(data.msg); layer.alert(data.msg);

View File

@@ -35,7 +35,7 @@
} else if (data.code == 1001) { } else if (data.code == 1001) {
//未登录 //未登录
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href); location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href);
} else { } else {
layer.alert(data.msg); layer.alert(data.msg);
@@ -121,7 +121,7 @@
} else if (data.code == 1001) { } else if (data.code == 1001) {
//未登录 //未登录
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href); location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href);
} else { } else {
layer.alert(data.msg); layer.alert(data.msg);

View File

@@ -106,7 +106,7 @@ Array.prototype.remove = function (val) {
var token = $.cookie('Authorization'); var token = $.cookie('Authorization');
if (!token) { if (!token) {
if (needLoginPath.indexOf(window.location.pathname) != -1) { if (needLoginPath.indexOf(window.location.pathname) != -1) {
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href); location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href);
} }
$(".user_link").html("<a href=\"/user/login.html\">登录</a><a href=\"/user/register.html\">注册</a>"); $(".user_link").html("<a href=\"/user/login.html\">登录</a><a href=\"/user/register.html\">注册</a>");