Explorar o código

Merge branch 'dev_1.1.5' of https://git.yishihui.com/DeNet/de-net into dev_1.1.5

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

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

@@ -100,18 +100,6 @@ const searchHandler = async () => {
 
   let siteRes = await axios.get(siteUrl.value);
 
-  let currentApp = {
-    appId: '',
-    cateId: '',
-    createType: '',
-    defaultUrl: siteUrl.value,
-    guideData: '',
-    iconPath: favicon,
-    interactType: '',
-    linkImagePath: "",
-    name: siteTitle,
-  }
-
   if (siteRes) {
     if (siteRes.headers['content-type'].indexOf('text/html') < 0 || siteRes.request.status > 399) {
       // 提示
@@ -122,12 +110,24 @@ const searchHandler = async () => {
       siteTitle = getTitleByHtmlStr(siteRes.data);
       if (!siteTitle) {
         siteTitle = urlObj.hostname;
-        currentApp.defaultTit = siteTitle;
       }
+      console.log(siteTitle)
     }
     favicon = urlObj.origin + '/favicon.ico';
   }
 
+  let currentApp = {
+    appId: '',
+    cateId: '',
+    createType: '',
+    defaultUrl: siteUrl.value,
+    guideData: '',
+    iconPath: favicon,
+    interactType: '',
+    linkImagePath: "",
+    name: siteTitle,
+  }
+
   let convertRes = await convertUrl({ params: { originUrl: siteUrl.value } });
   let params = { convertUrl: siteUrl.value, originUrl: siteUrl.value, appId: '', currentApp };