|
@@ -2,7 +2,21 @@
|
|
<div v-if="!loading" class="box-border pb-85">
|
|
<div v-if="!loading" class="box-border pb-85">
|
|
<div v-if="!previewOptions.show">
|
|
<div v-if="!previewOptions.show">
|
|
<CreateNoteHeaderBanner v-model:bannerUrl="noteJson.travelNotesBanner" />
|
|
<CreateNoteHeaderBanner v-model:bannerUrl="noteJson.travelNotesBanner" />
|
|
-
|
|
|
|
|
|
+ <div class="mt-12">
|
|
|
|
+ <van-cell-group class="border" inset>
|
|
|
|
+ <van-field
|
|
|
|
+ v-model="noteJson.projectTitle"
|
|
|
|
+ rows="1"
|
|
|
|
+ autosize
|
|
|
|
+ clearable
|
|
|
|
+ type="textarea"
|
|
|
|
+ @update:model-value="handleInsertOrEditProjectTitle"
|
|
|
|
+ placeholder="从这里开始游记大标题..."
|
|
|
|
+ maxlength="50"
|
|
|
|
+ show-word-limit
|
|
|
|
+ ></van-field>
|
|
|
|
+ </van-cell-group>
|
|
|
|
+ </div>
|
|
<CreateNoteForm
|
|
<CreateNoteForm
|
|
v-model:departureTime="noteJson.departureTime"
|
|
v-model:departureTime="noteJson.departureTime"
|
|
v-model:countTimes="noteJson.countTimes"
|
|
v-model:countTimes="noteJson.countTimes"
|
|
@@ -18,21 +32,7 @@
|
|
<div class="w-2 h-14 bg-[#FF9300] mr-16"></div>
|
|
<div class="w-2 h-14 bg-[#FF9300] mr-16"></div>
|
|
<h1 class="text-sm font-bold">编辑游记文章</h1>
|
|
<h1 class="text-sm font-bold">编辑游记文章</h1>
|
|
</div>
|
|
</div>
|
|
- <div class="mb-12">
|
|
|
|
- <van-cell-group class="border" inset>
|
|
|
|
- <van-field
|
|
|
|
- v-model="noteJson.projectTitle"
|
|
|
|
- rows="1"
|
|
|
|
- autosize
|
|
|
|
- clearable
|
|
|
|
- type="textarea"
|
|
|
|
- @update:model-value="handleInsertOrEditProjectTitle"
|
|
|
|
- placeholder="从这里开始游记大标题..."
|
|
|
|
- maxlength="50"
|
|
|
|
- show-word-limit
|
|
|
|
- ></van-field>
|
|
|
|
- </van-cell-group>
|
|
|
|
- </div>
|
|
|
|
|
|
+
|
|
<VueDraggable v-model="noteJson.travelNotesContent" :options="dragOptions">
|
|
<VueDraggable v-model="noteJson.travelNotesContent" :options="dragOptions">
|
|
<template v-for="(item, index) in noteJson.travelNotesContent" :key="item.tmpId">
|
|
<template v-for="(item, index) in noteJson.travelNotesContent" :key="item.tmpId">
|
|
<div v-if="item.type === defaultSectionTitle.type" class="h-50 mb-12 box-border">
|
|
<div v-if="item.type === defaultSectionTitle.type" class="h-50 mb-12 box-border">
|
|
@@ -151,7 +151,7 @@
|
|
<div
|
|
<div
|
|
class="w-86 flex justify-between items-center h-16 absolute top-10 right-26 z-100"
|
|
class="w-86 flex justify-between items-center h-16 absolute top-10 right-26 z-100"
|
|
>
|
|
>
|
|
- <span @click="handleSaveCover(item)" class="text-sm text-black-3">
|
|
|
|
|
|
+ <span @click="showToast('请上传图片')" class="text-sm text-black-3">
|
|
设为封面图
|
|
设为封面图
|
|
</span>
|
|
</span>
|
|
<div class="w-16 h-16 inline-block">
|
|
<div class="w-16 h-16 inline-block">
|
|
@@ -432,6 +432,7 @@ const defaultNoteJson = {
|
|
travelNotesBanner: null,
|
|
travelNotesBanner: null,
|
|
projectTitle: null,
|
|
projectTitle: null,
|
|
departureTime: null,
|
|
departureTime: null,
|
|
|
|
+ endPlaceId: null,
|
|
countTimes: null,
|
|
countTimes: null,
|
|
endPlace: null,
|
|
endPlace: null,
|
|
role: null,
|
|
role: null,
|
|
@@ -598,15 +599,6 @@ async function handleCropperOk(data) {
|
|
|
|
|
|
/******************插入图片逻辑*******************/
|
|
/******************插入图片逻辑*******************/
|
|
|
|
|
|
-// function handleInsertImageOk(fileUrlList) {
|
|
|
|
-// const imageList = fileUrlList.map((e) => ({
|
|
|
|
-// type: defaultSectionImage.type,
|
|
|
|
-// content: e.fileUrl,
|
|
|
|
-// tmpId: nanoid()
|
|
|
|
-// }))
|
|
|
|
-// noteJson.travelNotesContent = (noteJson.travelNotesContent ?? []).concat(imageList)
|
|
|
|
-// }
|
|
|
|
-
|
|
|
|
function handleDeleteImage(index) {
|
|
function handleDeleteImage(index) {
|
|
showConfirmDialog(deleteDialogContent)
|
|
showConfirmDialog(deleteDialogContent)
|
|
.then(() => {
|
|
.then(() => {
|
|
@@ -707,9 +699,14 @@ async function handlePublish() {
|
|
}
|
|
}
|
|
|
|
|
|
const publishLoading = ref(false)
|
|
const publishLoading = ref(false)
|
|
|
|
+// async
|
|
async function requestPublish() {
|
|
async function requestPublish() {
|
|
try {
|
|
try {
|
|
publishLoading.value = true
|
|
publishLoading.value = true
|
|
|
|
+
|
|
|
|
+ noteJson.endPlace = noteJson.endPlaceId
|
|
|
|
+ delete noteJson.endPlaceId
|
|
|
|
+ console.log(noteJson, 'noteJson')
|
|
await request('/website/tourism/publishTravelNotes/publishDraft', {
|
|
await request('/website/tourism/publishTravelNotes/publishDraft', {
|
|
method: 'post',
|
|
method: 'post',
|
|
body: {
|
|
body: {
|