Eddie 3 jaren geleden
bovenliggende
commit
e4ac8c874e
2 gewijzigde bestanden met toevoegingen van 9 en 3 verwijderingen
  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 Bestand weergeven

@@ -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 Bestand weergeven

@@ -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')


Laden…
Annuleren
Opslaan