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