diff --git a/pages/upload/upload.vue b/pages/upload/upload.vue index b3c49bd..a9e2e44 100644 --- a/pages/upload/upload.vue +++ b/pages/upload/upload.vue @@ -319,7 +319,7 @@ - {{ item }} + {{ item.showName || item }}{{ item.showValue ? '(' + item.showValue + ')' : '' }} @@ -1929,7 +1929,7 @@ export default { } // 更新出版社(最多20条) if (pressList.length > 0) { - this.noIsbnPublisherOptions = pressList.map(function(item) { return item.showName }).slice(0, 20) + this.noIsbnPublisherOptions = pressList.slice(0, 20) this.noIsbnPublisherDropdownVisible = true } else { this.noIsbnPublisherOptions = [] @@ -3453,7 +3453,7 @@ export default { // 无ISBN - 选择出版社 selectNoIsbnPublisher(item) { - this.noIsbnPublisher = item + this.noIsbnPublisher = typeof item === 'string' ? item : (item.showName || '') this.noIsbnPublisherDropdownVisible = false }, diff --git a/utils/kongfz.js b/utils/kongfz.js index 950d711..03002ae 100644 --- a/utils/kongfz.js +++ b/utils/kongfz.js @@ -312,7 +312,7 @@ export function searchCategories(keyword, options = {}) { * 获取孔网出版社列表(根据书名) * @param {string} keyword 书名 * @param {object} options { phpsessid, userArea } - * @returns {Promise>} 出版社列表 + * @returns {Promise>} 出版社列表 */ export function searchPresses(keyword, options = {}) { const { phpsessid = '', userArea = '1006000000' } = options @@ -350,7 +350,7 @@ export function searchPresses(keyword, options = {}) { if (res.statusCode === 200 && res.data && res.data.status === 1 && res.data.data) { var labels = res.data.data.labels || [] resolve(labels.map(function(item) { - return { showName: item.showName } + return { showName: item.showName, showValue: item.showValue } })) } else { resolve([])