mirror of
https://github.com/201206030/novel-front-web.git
synced 2025-04-26 23:40:51 +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) {
|
||||
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="goread">更新时间</th>
|
||||
<th class="goread">是否收费</th>
|
||||
<!-- <th class="goread">操作</th>-->
|
||||
<th class="goread">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="bookList">
|
||||
@ -46,17 +46,19 @@
|
||||
</td>
|
||||
<td class="goread">{{item.chapterUpdateTime}}<br />更新</td>
|
||||
<td class="goread" valsc="291|2037554|1">{{item.isVip == 1 ? '收费' : '免费'}}</td>
|
||||
<!--
|
||||
|
||||
<td class="goread" id="opt1358314029098041344">
|
||||
<a
|
||||
<!-- <a
|
||||
class="redBtn"
|
||||
href='javascript:updateIndex("1358314029098041344",1)'
|
||||
>修改 </a
|
||||
><br /><a
|
||||
href='javascript:deleteIndex("1358314029098041344")'
|
||||
><br /> -->
|
||||
<a href="javascript:void(0);"
|
||||
@click="deleteBookChapter(item.id)"
|
||||
|
||||
>删除 </a
|
||||
><br />
|
||||
</td>-->
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
@ -112,7 +114,7 @@
|
||||
import "@/assets/styles/book.css";
|
||||
import { reactive, toRefs, onMounted, ref } from "vue";
|
||||
import { useRouter, useRoute } from "vue-router";
|
||||
import { listChapters } from "@/api/author";
|
||||
import { listChapters ,deleteChapter} from "@/api/author";
|
||||
import AuthorHeader from "@/components/author/Header.vue";
|
||||
export default {
|
||||
name: "authorChapterList",
|
||||
@ -149,10 +151,16 @@ export default {
|
||||
load();
|
||||
};
|
||||
|
||||
const deleteBookChapter = async (id) => {
|
||||
await deleteChapter(id);
|
||||
load();
|
||||
};
|
||||
|
||||
return {
|
||||
...toRefs(state),
|
||||
handleCurrentChange,
|
||||
load,
|
||||
deleteBookChapter
|
||||
};
|
||||
},
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user