瀏覽代碼

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

zhangwei 2 年之前
父節點
當前提交
fb1e669919
共有 1 個文件被更改,包括 7 次插入4 次删除
  1. 7 4
      src/view/iframe/publish/tool-box/child/preview.vue

+ 7 - 4
src/view/iframe/publish/tool-box/child/preview.vue

@@ -257,11 +257,10 @@ const submitPublish = () => {
     if (submitIng.value) {
         return;
     }
-
-    setHistoryData(currentApp);
-
     let linkTitle = props.resourceInfo.title;
 
+    setHistoryData(currentApp, {linkTitle: !appId ? linkTitle : ''});
+
     let postBizData = {
         convertUrl,
         originUrl,
@@ -306,9 +305,13 @@ const submitPublish = () => {
     });
 }
 
-const setHistoryData = async (params) => {
+const setHistoryData = async (params, {linkTitle = ''}) => {
     const maxLength = 9;
     let { list = [] } = await getChromeStorage('toolBoxAppHistoryData') || {};
+    if (linkTitle) {
+      params.name = linkTitle;
+    }
+
     if (list.length) {
         let hasSite = list.find(item => item.defaultUrl == params.defaultUrl);
         if (hasSite) {