|
|
|
|
@ -53,7 +53,7 @@
|
|
|
|
|
<div class="xy-table-item-content">
|
|
|
|
|
|
|
|
|
|
<div v-if="detail.small_cover" style="position: relative;">
|
|
|
|
|
<img :src="detail.small_cover" class="avatar" style="width:120px;height:120px">
|
|
|
|
|
<img :src="detail.small_cover" class="avatar" style="width:120px;height:120px">
|
|
|
|
|
<Button shape="circle" icon="md-close" type="error" size="small" class="img__delete"
|
|
|
|
|
@click="detail.small_cover = '',detail.small_cover=''"></Button>
|
|
|
|
|
</div>
|
|
|
|
|
@ -125,6 +125,15 @@
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<template v-slot:publish_house>
|
|
|
|
|
<div class="xy-table-item">
|
|
|
|
|
<div class="xy-table-item-label">出版社
|
|
|
|
|
</div>
|
|
|
|
|
<div class="xy-table-item-content">
|
|
|
|
|
<el-input clearable placeholder="请填写出版社" v-model="detail.publish_house" style="width: 150px;" />
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<template v-slot:font_total>
|
|
|
|
|
@ -168,7 +177,9 @@
|
|
|
|
|
<script>
|
|
|
|
|
import {
|
|
|
|
|
save,
|
|
|
|
|
show
|
|
|
|
|
show,
|
|
|
|
|
isbn,
|
|
|
|
|
isbnCheck
|
|
|
|
|
} from "@/api/bookStore/bookIndex";
|
|
|
|
|
import {
|
|
|
|
|
list as bookTypeIndex
|
|
|
|
|
@ -252,6 +263,7 @@
|
|
|
|
|
this.type = ''
|
|
|
|
|
this.$refs['addActivity'].reset();
|
|
|
|
|
|
|
|
|
|
this.detail.id = "";
|
|
|
|
|
this.detail.small_cover = "";
|
|
|
|
|
this.detail.big_cover = "";
|
|
|
|
|
}
|
|
|
|
|
@ -284,14 +296,29 @@
|
|
|
|
|
this.$Message.error("请正确输入ISBN");
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
get_isbn({
|
|
|
|
|
|
|
|
|
|
isbnCheck({
|
|
|
|
|
isbn: e
|
|
|
|
|
}, function(res) {
|
|
|
|
|
console.log(res)
|
|
|
|
|
if (res.error_code != 0) {
|
|
|
|
|
}).then(r => {
|
|
|
|
|
|
|
|
|
|
console.log("r", r)
|
|
|
|
|
this.getISBN(e);
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
getISBN(isbnNo) {
|
|
|
|
|
let that = this;
|
|
|
|
|
isbn({
|
|
|
|
|
isbn: isbnNo
|
|
|
|
|
}).then(res => {
|
|
|
|
|
console.log("res", res)
|
|
|
|
|
|
|
|
|
|
console.log("res.msg", res.msg);
|
|
|
|
|
var json = JSON.parse(res.msg);
|
|
|
|
|
console.log("json", json);
|
|
|
|
|
if (json.error_code != 0) {
|
|
|
|
|
that.$Message.error("存在错误" + res.error_code);
|
|
|
|
|
} else {
|
|
|
|
|
let book = res.result.data;
|
|
|
|
|
let book = json.result.data;
|
|
|
|
|
that.detail.name = book.title;
|
|
|
|
|
that.detail.sub_title = book.subtitle;
|
|
|
|
|
that.detail.author = book.author;
|
|
|
|
|
|