mirror of
https://github.com/201206030/novel-front-web.git
synced 2025-04-27 07:50:50 +00:00
feat: 作家后台-小说章节删除
This commit is contained in:
parent
e14541134a
commit
2dd106c41e
@ -22,4 +22,8 @@ export function listChapters(bookId, params) {
|
|||||||
|
|
||||||
export function publishChapter(bookId,params) {
|
export function publishChapter(bookId,params) {
|
||||||
return request.post(`/author/book/chapter/${bookId}`, params);
|
return request.post(`/author/book/chapter/${bookId}`, params);
|
||||||
|
}
|
||||||
|
|
||||||
|
export function deleteChapter(id) {
|
||||||
|
return request.delete(`/author/book/chapter/${id}`);
|
||||||
}
|
}
|
@ -35,7 +35,7 @@
|
|||||||
<th class="name">章节名</th>
|
<th class="name">章节名</th>
|
||||||
<th class="goread">更新时间</th>
|
<th class="goread">更新时间</th>
|
||||||
<th class="goread">是否收费</th>
|
<th class="goread">是否收费</th>
|
||||||
<!-- <th class="goread">操作</th>-->
|
<th class="goread">操作</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody id="bookList">
|
<tbody id="bookList">
|
||||||
@ -46,17 +46,19 @@
|
|||||||
</td>
|
</td>
|
||||||
<td class="goread">{{item.chapterUpdateTime}}<br />更新</td>
|
<td class="goread">{{item.chapterUpdateTime}}<br />更新</td>
|
||||||
<td class="goread" valsc="291|2037554|1">{{item.isVip == 1 ? '收费' : '免费'}}</td>
|
<td class="goread" valsc="291|2037554|1">{{item.isVip == 1 ? '收费' : '免费'}}</td>
|
||||||
<!--
|
|
||||||
<td class="goread" id="opt1358314029098041344">
|
<td class="goread" id="opt1358314029098041344">
|
||||||
<a
|
<!-- <a
|
||||||
class="redBtn"
|
class="redBtn"
|
||||||
href='javascript:updateIndex("1358314029098041344",1)'
|
href='javascript:updateIndex("1358314029098041344",1)'
|
||||||
>修改 </a
|
>修改 </a
|
||||||
><br /><a
|
><br /> -->
|
||||||
href='javascript:deleteIndex("1358314029098041344")'
|
<a href="javascript:void(0);"
|
||||||
|
@click="deleteBookChapter(item.id)"
|
||||||
|
|
||||||
>删除 </a
|
>删除 </a
|
||||||
><br />
|
><br />
|
||||||
</td>-->
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
</tbody>
|
</tbody>
|
||||||
@ -112,7 +114,7 @@
|
|||||||
import "@/assets/styles/book.css";
|
import "@/assets/styles/book.css";
|
||||||
import { reactive, toRefs, onMounted, ref } from "vue";
|
import { reactive, toRefs, onMounted, ref } from "vue";
|
||||||
import { useRouter, useRoute } from "vue-router";
|
import { useRouter, useRoute } from "vue-router";
|
||||||
import { listChapters } from "@/api/author";
|
import { listChapters ,deleteChapter} from "@/api/author";
|
||||||
import AuthorHeader from "@/components/author/Header.vue";
|
import AuthorHeader from "@/components/author/Header.vue";
|
||||||
export default {
|
export default {
|
||||||
name: "authorChapterList",
|
name: "authorChapterList",
|
||||||
@ -149,10 +151,16 @@ export default {
|
|||||||
load();
|
load();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const deleteBookChapter = async (id) => {
|
||||||
|
await deleteChapter(id);
|
||||||
|
load();
|
||||||
|
};
|
||||||
|
|
||||||
return {
|
return {
|
||||||
...toRefs(state),
|
...toRefs(state),
|
||||||
handleCurrentChange,
|
handleCurrentChange,
|
||||||
load,
|
load,
|
||||||
|
deleteBookChapter
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user