瀏覽代碼

修改问题

leihy 3 年之前
父節點
當前提交
ad137a6e25

+ 10 - 3
spring-cloud/server-page/src/main/resources/static/ipad/js/basic/direct/index.js

@@ -39,7 +39,14 @@ const UI = {
 			  btn: ['确认','取消']
 			}, () => {
 				sessionStorage.clear();
-				window.location.href = 'login.html';
+				const path = location.pathname.split("/")
+                let fileName = path[path.length - 1].split(".")
+                fileName = fileName[0].split("_")[1]
+                if(fileName){
+                    window.location.href = 'login_' + fileName + '.html';
+				}else{
+					window.location.href = 'login.html';
+				}
 			});
 		});
 		// 点击收起底部
@@ -145,7 +152,7 @@ const UI = {
 					// 	}
 					// }));
 					util.get({
-						url: DPZHD_PATH + '/automation/guide/switch',
+						url: DPZHD_PATH + 'automation/guide/switch',
 						data: {
 							id: data.systemInfo.system_id
 						},
@@ -235,7 +242,7 @@ const UI = {
 			});
 		}
 		customLayui.post({
-			url: DPZHD_PATH + '/automation/guide/init',
+			url: DPZHD_PATH + 'automation/guide/init',
 			data: JSON.stringify({'init': JSON.stringify(array)}),
 			success: function(res) {
 				console.log(res)

+ 8 - 2
spring-cloud/server-page/src/main/resources/static/ipad/js/util.min.js

@@ -42,7 +42,6 @@ var util = {
                     const path = location.pathname.split("/")
                     let fileName = path[path.length - 1].split(".")
                     fileName = fileName[0].split("_")[1]
-                    console.log(fileName)
                     if(fileName){
 	                    window.location.href = 'login_' + fileName + '.html';
 					}else{
@@ -100,7 +99,14 @@ var util = {
                 btn: ['确认', '取消']
             }, function() {
                 sessionStorage.clear();
-                window.location.href = 'login.html';
+                const path = location.pathname.split("/")
+                let fileName = path[path.length - 1].split(".")
+                fileName = fileName[0].split("_")[1]
+                if(fileName){
+                    window.location.href = 'login_' + fileName + '.html';
+				}else{
+					window.location.href = 'login.html';
+				}
             });
         });
     },