fix:出版社显示格式改为 showName(showValue)

This commit is contained in:
ShenQiLun 2026-07-01 14:30:32 +08:00
parent 03102f1739
commit 8de408974a
2 changed files with 5 additions and 5 deletions

View File

@ -319,7 +319,7 @@
<input class="form-input" v-model="noIsbnPublisher" placeholder="出版社" style="flex:1;" />
<view class="dropdown-btn" @click.stop="noIsbnPublisherDropdownVisible = !noIsbnPublisherDropdownVisible"></view>
<view v-if="noIsbnPublisherDropdownVisible && noIsbnPublisherOptions.length > 0" class="dropdown-list">
<view class="dropdown-item" v-for="(item, idx) in noIsbnPublisherOptions" :key="idx" @click="selectNoIsbnPublisher(item)">{{ item }}</view>
<view class="dropdown-item" v-for="(item, idx) in noIsbnPublisherOptions" :key="idx" @click="selectNoIsbnPublisher(item)">{{ item.showName || item }}{{ item.showValue ? '' + item.showValue + '' : '' }}</view>
</view>
</view>
</view>
@ -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
},

View File

@ -312,7 +312,7 @@ export function searchCategories(keyword, options = {}) {
* 获取孔网出版社列表根据书名
* @param {string} keyword 书名
* @param {object} options { phpsessid, userArea }
* @returns {Promise<Array<{showName:string}>>} 出版社列表
* @returns {Promise<Array<{showName:string, showValue:string}>>} 出版社列表
*/
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([])