|
@@ -100,6 +100,18 @@ 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) {
|
|
|
// 提示
|
|
@@ -110,24 +122,12 @@ 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 };
|
|
|
|