Parcourir la source

优化代码,处理线上脏数据

yanglzh il y a 3 ans
Parent
commit
394777eacd

+ 3 - 1
src/views/rule-engine/edit.vue

@@ -43,7 +43,9 @@ const props = defineProps({
 const headers = {
 	Authorization: 'Bearer ' + JSON.parse(sessionStorage.token),
 };
-const flowsUrl = window.location.protocol + '//' + window.location.hostname + '/rule-engine/flow';
+const flowsUrl = window.location.origin + '/rule-engine/flow';
+// const flowsUrl = 'http://zhgy.sagoo.cn/rule-engine/flow';
+
 
 const showDialog = ref(false);
 const formRef = ref();

+ 3 - 1
src/views/rule-engine/index.vue

@@ -60,7 +60,9 @@ const { params, tableData, getList, loading } = useSearch<any[]>(api.getList, 'D
 const headers = {
 	Authorization: 'Bearer ' + JSON.parse(sessionStorage.token),
 };
-const flowsUrl = window.location.protocol + '//' + window.location.hostname + '/rule-engine/flows';
+
+const flowsUrl = window.location.origin + '/rule-engine/flows';
+// const flowsUrl = 'http://zhgy.sagoo.cn/rule-engine/flows';
 
 getList();
 

+ 1 - 1
src/views/rule-engine/send.vue

@@ -60,7 +60,7 @@ const { params, tableData, getList, loading } = useSearch<any[]>(api.getList, 'D
 const headers = {
 	Authorization: 'Bearer ' + JSON.parse(sessionStorage.token),
 };
-const flowsUrl = window.location.protocol + '//' + window.location.hostname + '/rule-engine/flows';
+const flowsUrl = window.location.origin + '/rule-engine/flows';
 
 getList();