From 7e77e1a9e3b99ac34b278792e3d0d87758b6b79e Mon Sep 17 00:00:00 2001 From: "97694732@qq.com" Date: Wed, 3 Jun 2026 17:13:14 +0800 Subject: [PATCH] =?UTF-8?q?Revert=20"userArea=E5=8A=A8=E6=80=81=E5=8C=96:?= =?UTF-8?q?=20=E5=AD=98=E5=82=A8/=E8=AF=BB=E5=8F=96/=E5=8F=AF=E7=BC=96?= =?UTF-8?q?=E8=BE=91,=20=E4=B8=8D=E5=86=8D=E7=A1=AC=E7=BC=96=E7=A0=8113003?= =?UTF-8?q?000000"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit e4b396dc4bdfc48aa8cfcea756cf3392c166e78d. --- pages/upload/upload.vue | 26 ++++---------------------- utils/kongfz.js | 4 ++-- 2 files changed, 6 insertions(+), 24 deletions(-) diff --git a/pages/upload/upload.vue b/pages/upload/upload.vue index 7885b49..3d6b95d 100644 --- a/pages/upload/upload.vue +++ b/pages/upload/upload.vue @@ -244,15 +244,7 @@ - - - 搜索区域 - - - - 孔夫子API搜索区域代码,登录后可修改 - - + @@ -829,7 +821,6 @@ export default { rememberPassword: false, blockedList: '', kongfzToken: '', - kongfzUserArea: '', savedAccountList: [], // 定价策略 @@ -851,12 +842,10 @@ export default { // 恢复登录状态 const savedToken = uni.getStorageSync('kongfz_phpsessid') const savedName = uni.getStorageSync('kongfz_shop_name') - const savedArea = uni.getStorageSync('kongfz_user_area') if (savedToken && savedName) { this.kongfzToken = savedToken this.shopName = savedName this.shopRegion = uni.getStorageSync('kongfz_shop_region') || '孔夫子旧书网' - this.kongfzUserArea = savedArea || '13003000000' this.isLoggedIn = true } // 恢复记住的账号 @@ -998,14 +987,13 @@ export default { // 2. 搜索孔夫子 - 获取在售商品信息 const phpsessid = this.kongfzToken || uni.getStorageSync('kongfz_phpsessid') || '' - const userArea = this.kongfzUserArea || uni.getStorageSync('kongfz_user_area') || '13003000000' // 排序参数:7=总价从低到高(含运费) 5=书价从低到高 const sortType = this.sortBy === 'book' ? '5' : '7' // 并行请求:商品列表 + 品相统计(在售)+ 品相统计(已售) Promise.all([ - searchProducts(keyword, { phpsessid, sortType, userArea }), - searchFacet(keyword, { phpsessid, dataType: 0, userArea }), - searchFacet(keyword, { phpsessid, dataType: 1, userArea }) + searchProducts(keyword, { phpsessid, sortType }), + searchFacet(keyword, { phpsessid, dataType: 0 }), + searchFacet(keyword, { phpsessid, dataType: 1 }) ]).then(([productsData, onSaleFacet, soldFacet]) => { this.isLoading = false if (productsData && productsData.total > 0) { @@ -1366,20 +1354,14 @@ export default { this.shopName = '' this.shopRegion = '' this.kongfzToken = '' - this.kongfzUserArea = '' uni.removeStorageSync('kongfz_phpsessid') uni.removeStorageSync('kongfz_shop_name') uni.removeStorageSync('kongfz_shop_region') - uni.removeStorageSync('kongfz_user_area') } } }) }, - saveUserArea() { - uni.setStorageSync('kongfz_user_area', this.kongfzUserArea) - }, - // 加载已保存账号列表 loadSavedAccounts() { try { diff --git a/utils/kongfz.js b/utils/kongfz.js index 8ec078f..0a05c00 100644 --- a/utils/kongfz.js +++ b/utils/kongfz.js @@ -190,13 +190,13 @@ export function fetchItems(token, params = {}, onProgress) { * list中每项: {id, title, author, press, priceText, imgBigUrl, shopName, qualityText, pubDateText, postage} */ export function searchProducts(keyword, options = {}) { - const { phpsessid = '', page = 1, sortType = '', userArea = '13003000000' } = options + const { phpsessid = '', page = 1, sortType = '' } = options return new Promise((resolve, reject) => { const reqData = { dataType: 0, keyword: keyword, page: page, - userArea: userArea + userArea: '13003000000' } if (sortType) { reqData.sortType = sortType