|
@@ -2,7 +2,6 @@
|
|
<div v-if="!loading" class="h-[100vh] box-border pb-110">
|
|
<div v-if="!loading" class="h-[100vh] box-border pb-110">
|
|
<div v-if="!previewOptions.show">
|
|
<div v-if="!previewOptions.show">
|
|
<CreateNoteHeaderImage
|
|
<CreateNoteHeaderImage
|
|
- v-model:bannerUrl="noteJson.travelNotesBanner"
|
|
|
|
v-model:imgUrls="noteJson.imgUrls"
|
|
v-model:imgUrls="noteJson.imgUrls"
|
|
v-model:show="showExpandTextInput"
|
|
v-model:show="showExpandTextInput"
|
|
/>
|
|
/>
|
|
@@ -383,7 +382,6 @@ const inputDiv = ref(null)
|
|
const projectTitleRef = ref(null)
|
|
const projectTitleRef = ref(null)
|
|
|
|
|
|
const defaultNoteJson = {
|
|
const defaultNoteJson = {
|
|
- travelNotesBanner: null,
|
|
|
|
projectTitle: null,
|
|
projectTitle: null,
|
|
departureTime: null,
|
|
departureTime: null,
|
|
countTimes: null,
|
|
countTimes: null,
|
|
@@ -572,17 +570,19 @@ async function handleSaveDraft() {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
})
|
|
})
|
|
|
|
+ console.log('草稿前:', parmas.topics)
|
|
}
|
|
}
|
|
|
|
|
|
if (parmas?.topicsList.length) {
|
|
if (parmas?.topicsList.length) {
|
|
parmas.topics.forEach((i) => {
|
|
parmas.topics.forEach((i) => {
|
|
- const matchingItem = parmas.topicsList.find((o) => o.name === i.name)
|
|
|
|
|
|
+ const matchingItem = parmas.topicsList.find((o) => o.topicName === i.name)
|
|
if (matchingItem && i.id === '') {
|
|
if (matchingItem && i.id === '') {
|
|
i.id = matchingItem.id
|
|
i.id = matchingItem.id
|
|
}
|
|
}
|
|
})
|
|
})
|
|
}
|
|
}
|
|
- console.log(parmas.topics, ' parmas.topics')
|
|
|
|
|
|
+
|
|
|
|
+ console.log('草稿后:', parmas.topics)
|
|
|
|
|
|
let memberList = getMention('@')
|
|
let memberList = getMention('@')
|
|
|
|
|
|
@@ -719,6 +719,18 @@ async function requestPublish() {
|
|
}
|
|
}
|
|
})
|
|
})
|
|
}
|
|
}
|
|
|
|
+ console.log('发布前:', parmas.topics)
|
|
|
|
+
|
|
|
|
+ if (parmas?.topicsList.length) {
|
|
|
|
+ parmas.topics.forEach((i) => {
|
|
|
|
+ const matchingItem = parmas.topicsList.find((o) => o.topicName === i.name)
|
|
|
|
+ if (matchingItem && i.id === '') {
|
|
|
|
+ i.id = matchingItem.id
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ console.log('发布后:', parmas.topics)
|
|
|
|
|
|
let memberList = getMention('@')
|
|
let memberList = getMention('@')
|
|
|
|
|
|
@@ -757,32 +769,32 @@ const queryParmas = reactive({
|
|
})
|
|
})
|
|
|
|
|
|
const topicLoading = ref(false)
|
|
const topicLoading = ref(false)
|
|
-async function getTopicList(parmas, searchText) {
|
|
|
|
- try {
|
|
|
|
- // if (!topicLoading.value) return
|
|
|
|
- topicLoading.value = true
|
|
|
|
- const { data } = await request(parmas.apiUrl, {
|
|
|
|
- query: {
|
|
|
|
- ...queryParmas,
|
|
|
|
- name: searchText
|
|
|
|
- }
|
|
|
|
- }).finally(() => (topicLoading.value = false))
|
|
|
|
-
|
|
|
|
- if (parmas.fn == TOPIC_TEXT) {
|
|
|
|
- topicList.value = data
|
|
|
|
- }
|
|
|
|
- if (parmas.fn == EIT_TEXT) {
|
|
|
|
- eitList.value = data
|
|
|
|
- }
|
|
|
|
- } catch (e) {
|
|
|
|
- if (parmas.fn == TOPIC_TEXT) {
|
|
|
|
- topicList.value = []
|
|
|
|
- }
|
|
|
|
- if (parmas.fn == EIT_TEXT) {
|
|
|
|
- eitList.value = []
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-}
|
|
|
|
|
|
+// async function getTopicList(parmas, searchText) {
|
|
|
|
+// try {
|
|
|
|
+// // if (!topicLoading.value) return
|
|
|
|
+// topicLoading.value = true
|
|
|
|
+// const { data } = await request(parmas.apiUrl, {
|
|
|
|
+// query: {
|
|
|
|
+// ...queryParmas,
|
|
|
|
+// name: searchText
|
|
|
|
+// }
|
|
|
|
+// }).finally(() => (topicLoading.value = false))
|
|
|
|
+//
|
|
|
|
+// if (parmas.fn == TOPIC_TEXT) {
|
|
|
|
+// topicList.value = data
|
|
|
|
+// }
|
|
|
|
+// if (parmas.fn == EIT_TEXT) {
|
|
|
|
+// eitList.value = data
|
|
|
|
+// }
|
|
|
|
+// } catch (e) {
|
|
|
|
+// if (parmas.fn == TOPIC_TEXT) {
|
|
|
|
+// topicList.value = []
|
|
|
|
+// }
|
|
|
|
+// if (parmas.fn == EIT_TEXT) {
|
|
|
|
+// eitList.value = []
|
|
|
|
+// }
|
|
|
|
+// }
|
|
|
|
+// }
|
|
|
|
|
|
// 计算出热门话题
|
|
// 计算出热门话题
|
|
const hotTopicList = computed(() => {
|
|
const hotTopicList = computed(() => {
|