Eddie 3 anni fa
parent
commit
e4ac8c874e
2 ha cambiato i file con 9 aggiunte e 3 eliminazioni
  1. +3
    -2
      src/api/books-management.js
  2. +6
    -1
      src/views/books-management/article-page/components/edit-dialog.vue

+ 3
- 2
src/api/books-management.js Vedi File

@@ -28,10 +28,11 @@ export function getBooksList(params) {
})
}

export function updateBooks(id) {
export function updateBooks(id, params) {
return request({
url: `/book/update/${id}`, // 编辑书籍
method: 'put'
method: 'put',
params: params
})
}



+ 6
- 1
src/views/books-management/article-page/components/edit-dialog.vue Vedi File

@@ -126,7 +126,12 @@ export default {
},
methods: {
_postRequest() {
updateBooks(Number(this.formData.id)).then(resp => {
const params = {
name: this.formData.book_name,
category_id: this.formData.book_type,
desc: this.formData.book_intro
}
updateBooks(Number(this.formData.id), params).then(resp => {
if (parseInt(resp.error_code) === 0) {
this.$message.success('操作成功!')
this.$emit('handle-success')


Caricamento…
Annulla
Salva