Explorar o código

Merge branch 'dev_v1.1.4' into dev_1.1.5

wenliming %!s(int64=2) %!d(string=hai) anos
pai
achega
676eeddd40
Modificáronse 1 ficheiros con 6 adicións e 1 borrados
  1. 6 1
      src/view/iframe/publish/tool-box/child/editor.vue

+ 6 - 1
src/view/iframe/publish/tool-box/child/editor.vue

@@ -79,7 +79,7 @@ const emits = defineEmits(["changeShowCom"]);
 
 const searchHandler = async () => {
   let siteTitle = '', favicon = '';
-  
+  let timer = null;
   if(!siteUrl.value) {
     return;
   }
@@ -92,6 +92,10 @@ const searchHandler = async () => {
     return;
   } 
   const loadingHide = message.loading('loading...', 0);
+  timer = setTimeout(() => {
+    loadingHide();
+    message.error('Page loading failed');
+  }, 1000 * 15);
   let siteRes = await axios.get(siteUrl.value);
 
   if(siteRes) {
@@ -126,6 +130,7 @@ const searchHandler = async () => {
   let params = { convertUrl: siteUrl.value, originUrl: siteUrl.value, appId: '', currentApp };
 
   loadingHide();
+  clearTimeout(timer);
 
   if(convertRes && convertRes.code == 0) {
     let {convertUrl} = convertRes.data || {};