|
|
|
|
@ -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">
|
|
|
|
|
<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>
|
|
|
|
|
@ -76,7 +76,7 @@
|
|
|
|
|
<div class="xy-table-item-content">
|
|
|
|
|
|
|
|
|
|
<div v-if="detail.big_cover" style="position: relative;">
|
|
|
|
|
<img :src="detail.big_cover" class="avatar">
|
|
|
|
|
<img :src="detail.big_cover" class="avatar" style="width:280px;height:280px">
|
|
|
|
|
<Button shape="circle" icon="md-close" type="error" size="small" class="img__delete"
|
|
|
|
|
@click="detail.big_cover = '',detail.big_cover_id=''"></Button>
|
|
|
|
|
</div>
|
|
|
|
|
@ -178,7 +178,6 @@
|
|
|
|
|
get_isbn
|
|
|
|
|
} from "@/api/bookStore/interface";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import {
|
|
|
|
|
uploadFile,
|
|
|
|
|
uploadFileByUrl
|
|
|
|
|
@ -251,11 +250,16 @@
|
|
|
|
|
} else {
|
|
|
|
|
this.id = ''
|
|
|
|
|
this.type = ''
|
|
|
|
|
this.$refs['addActivity'].reset();
|
|
|
|
|
|
|
|
|
|
this.detail.small_cover = "";
|
|
|
|
|
this.detail.big_cover = "";
|
|
|
|
|
this.$refs['addActivity'].reset();
|
|
|
|
|
|
|
|
|
|
this.detail.small_cover = "";
|
|
|
|
|
this.detail.big_cover = "";
|
|
|
|
|
}
|
|
|
|
|
let that = this;
|
|
|
|
|
this.$nextTick(function() {
|
|
|
|
|
console.log(that.$refs.inputisbn)
|
|
|
|
|
that.$refs.inputisbn.focus();
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
@ -281,28 +285,28 @@
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
get_isbn({
|
|
|
|
|
sub: e
|
|
|
|
|
isbn: e
|
|
|
|
|
}, function(res) {
|
|
|
|
|
console.log(res)
|
|
|
|
|
if (res.error_code != 0) {
|
|
|
|
|
that.$Message.error("存在错误" + res.error_code);
|
|
|
|
|
} else {
|
|
|
|
|
let book = res.result;
|
|
|
|
|
let book = res.result.data;
|
|
|
|
|
that.detail.name = book.title;
|
|
|
|
|
that.detail.sub_title = book.subtitle;
|
|
|
|
|
that.detail.author = book.author;
|
|
|
|
|
that.detail.bind_way = book.binding;
|
|
|
|
|
that.detail.publish_date = book.pubdate;
|
|
|
|
|
that.detail.bind_way = book.paper;
|
|
|
|
|
that.detail.publish_date = book.pubDate;
|
|
|
|
|
that.detail.publish_house = book.publisher;
|
|
|
|
|
that.detail.font_total = book.pages;
|
|
|
|
|
that.detail.content = book.summary;
|
|
|
|
|
that.detail.font_total = book.wordNum;
|
|
|
|
|
that.detail.content = book.gist;
|
|
|
|
|
|
|
|
|
|
if (book.images_medium && book.images_medium != '') {
|
|
|
|
|
that.downloadByBlob(book.images_medium, "small_cover", "small_cover_id");
|
|
|
|
|
if (book.smallImg && book.smallImg != '') {
|
|
|
|
|
that.downloadByBlob(book.smallImg, "small_cover", "small_cover_id");
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
if (book.images_large && book.images_large != '') {
|
|
|
|
|
that.downloadByBlob(book.images_medium, "big_cover", "big_cover_id");
|
|
|
|
|
if (book.img && book.img != '') {
|
|
|
|
|
that.downloadByBlob(book.img, "big_cover", "big_cover_id");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
@ -376,7 +380,7 @@
|
|
|
|
|
editor() {
|
|
|
|
|
|
|
|
|
|
if (this.detail.id == "") {
|
|
|
|
|
let _arr = [];
|
|
|
|
|
let _arr = [];
|
|
|
|
|
console.log(this.detail.stockNum)
|
|
|
|
|
for (var i = 0; i < this.detail.stockNum; i++) {
|
|
|
|
|
_arr.push({
|
|
|
|
|
@ -384,7 +388,7 @@
|
|
|
|
|
remark: "",
|
|
|
|
|
status: 0,
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
console.log(this.detail.id)
|
|
|
|
|
this.detail.details = _arr;
|
|
|
|
|
}
|
|
|
|
|
@ -409,7 +413,11 @@
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
mounted() {
|
|
|
|
|
|
|
|
|
|
let that = this;
|
|
|
|
|
that.$nextTick(function() {
|
|
|
|
|
console.log(that.$refs.inputisbn)
|
|
|
|
|
that.$refs.inputisbn.focus();
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
|