Bladeren bron

针对https访问时,替换下载http链接为https链接。

zhengqiang 5 jaren geleden
bovenliggende
commit
ed04be435b

+ 4 - 0
src/views/base/deviceInfo-list.vue

@@ -615,6 +615,10 @@ export default {
           
           if(jsonData.result) {
             if(exportFlag){
+              if(document.location.href.startsWith("https://")){
+                  jsonData.data = jsonData.data.replace("http://","https://");
+              }
+
               //导出
               self.$message({
                 showClose: true,

+ 4 - 0
src/views/base/personInfo-list.vue

@@ -1268,6 +1268,10 @@ export default {
         var jsonData = response.data;
         if (jsonData.result) {
           if (jsonData.data != null) {
+            if(document.location.href.startsWith("https://")){
+                jsonData.data = jsonData.data.replace("http://","https://");
+            }
+            
             self.$message({
               showClose: true,
               type: "success",

+ 4 - 0
src/views/business/billPush-checkIn-detail.vue

@@ -217,6 +217,10 @@ export default {
 
                 if(jsonData.result) {
                     if(exportFlag){
+                        if(document.location.href.startsWith("https://")){
+                            jsonData.data = jsonData.data.replace("http://","https://");
+                        }
+                        
                         //导出
                         self.$message({
                             showClose: true,

+ 4 - 0
src/views/business/billPush-detail-list.vue

@@ -294,6 +294,10 @@ export default {
 
                 if(jsonData.result) {
                     if(exportFlag){
+                        if(document.location.href.startsWith("https://")){
+                            jsonData.data = jsonData.data.replace("http://","https://");
+                        }
+
                         //导出
                         self.$message({
                             showClose: true,

+ 4 - 0
src/views/business/requestForLeave-list.vue

@@ -285,6 +285,10 @@ export default {
 
           if(jsonData.result) {
             if(exportFlag){
+              if(document.location.href.startsWith("https://")){
+                  jsonData.data = jsonData.data.replace("http://","https://");
+              }
+              
               //导出
               self.$message({
                 showClose: true,

+ 4 - 0
src/views/business/workAttendance-list.vue

@@ -499,6 +499,10 @@ export default {
             self.downloadLoading = false;
 
             if (jsonData.result) {
+              if(document.location.href.startsWith("https://")){
+                  jsonData.data = jsonData.data.replace("http://","https://");
+              }
+
               self.$message({
                 type: "success",
                 message: `报表已生成,<a href="${jsonData.data}">请点击链接下载</a>`,

+ 4 - 0
src/views/old/oldPersonInfo-list.vue

@@ -1197,6 +1197,10 @@ export default {
         var jsonData = response.data;
         if (jsonData.result) {
           if (jsonData.data != null) {
+            if(document.location.href.startsWith("https://")){
+                jsonData.data = jsonData.data.replace("http://","https://");
+            }
+
             self.$message({
               showClose: true,
               type: "success",