From 085674dfa7153a0288350a1337bebbd97333a542 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=94=B0=E9=A6=99=E7=90=AA?= <624506849@qq.com> Date: Thu, 20 Aug 2026 16:55:05 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=85=A5=E9=A9=BB?= =?UTF-8?q?=E8=AF=AF=E6=A0=A1=E9=AA=8C=E4=B8=8E=E5=95=86=E5=93=81=E5=93=81?= =?UTF-8?q?=E7=89=8C=E6=98=BE=E7=A4=BA=200=EF=BC=8C=E5=B9=B6=E4=BC=98?= =?UTF-8?q?=E5=8C=96=E5=88=86=E7=B1=BB=E3=80=81=E8=BF=90=E8=B4=B9=E6=A8=A1?= =?UTF-8?q?=E6=9D=BF=E4=BA=A4=E4=BA=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 入驻第三步改为先回填再渲染,避免空字段进页即提示 - 入驻协议无内容时按空字符串处理,避免读取 null - 商品品牌空值展示占位符,提交时再转为 0 - 店内分类为空时横向展示「暂无分类」 - 运费模板选择地址默认折叠,操作文案改为「选择地址」 --- buyer/src/pages/shopEntry/ShopEntry.vue | 20 +++--- buyer/src/pages/shopEntry/ThirdApply.vue | 48 ++++++++++--- .../views/goods/goods-seller/addGoods.scss | 3 +- .../goods/goods-seller/goodsOperationSec.vue | 70 +++++++++++++------ .../views/lili-components/multiple-region.vue | 1 - seller/src/views/shop/ship/shipTemplate.vue | 2 +- 6 files changed, 99 insertions(+), 45 deletions(-) diff --git a/buyer/src/pages/shopEntry/ShopEntry.vue b/buyer/src/pages/shopEntry/ShopEntry.vue index 92698666..778c9014 100644 --- a/buyer/src/pages/shopEntry/ShopEntry.vue +++ b/buyer/src/pages/shopEntry/ShopEntry.vue @@ -130,9 +130,9 @@ export default { Object.assign(this.thirdData, Object.fromEntries(third.map((key) => [key, data[key]]))); }, getArticle() { - // 入驻协议 + // 入驻协议:库中无 STORE_REGISTER 文章时 result 为 null,不能直接读 content agreement().then((res) => { - this.agreementCon = res.result.content; + this.agreementCon = res.result?.content || ""; }); }, getData(status) { @@ -164,21 +164,19 @@ export default { }); }, refreshApplyData() { - applyStatus().then((res) => { + return applyStatus().then((res) => { if (res.success && res.result) { this.assignApplyData(res.result); } - }); + }).catch(() => {}); }, - // 下一步 - nextPage(step) { + // 下一步:先拉最新申请数据,再切步骤,避免第三步挂载后再改 content 触发校验 + async nextPage(step) { if (typeof step !== "number") return; - this.currentIndex = step; - if (step > 0 && step < 3) { - this.refreshApplyData(); - } else if (step === 3) { - this.refreshApplyData(); + if (step > 0 && step <= 3) { + await this.refreshApplyData(); } + this.currentIndex = step; }, }, created() { diff --git a/buyer/src/pages/shopEntry/ThirdApply.vue b/buyer/src/pages/shopEntry/ThirdApply.vue index 3c40b8b8..d827d0be 100644 --- a/buyer/src/pages/shopEntry/ThirdApply.vue +++ b/buyer/src/pages/shopEntry/ThirdApply.vue @@ -126,6 +126,12 @@ export default { form: { // 表单数据 storeLogo: [], goodsManagementCategory: [], + storeName: "", + storeAddressDetail: "", + storeDesc: "", + storeAddressIdPath: "", + storeAddressPath: "", + storeCenter: "", }, rules: { // 验证规则 goodsManagementCategory: [ @@ -244,18 +250,42 @@ export default { (id) => this.normalizeCategoryId(id) ); }, + createEmptyForm () { + return { + storeLogo: [], + goodsManagementCategory: [], + storeName: "", + storeAddressDetail: "", + storeDesc: "", + storeAddressIdPath: "", + storeAddressPath: "", + storeCenter: "", + }; + }, + initFormFromContent (content) { + const src = content && Object.keys(content).length + ? JSON.parse(JSON.stringify(content)) + : {}; + this.form = { + ...this.createEmptyForm(), + ...src, + }; + this.form.storeLogo = src.storeLogo + ? String(src.storeLogo).split(",").filter(Boolean) + : []; + this.form.goodsManagementCategory = src.goodsManagementCategory + ? String(src.goodsManagementCategory).split(",").filter(Boolean) + : []; + ["storeName", "storeAddressDetail", "storeDesc", "storeAddressIdPath", "storeAddressPath", "storeCenter"].forEach((key) => { + if (this.form[key] == null) this.form[key] = ""; + }); + }, + }, + created () { + this.initFormFromContent(this.content); }, mounted () { this.accessToken.accessToken = storage.getItem('accessToken'); - if (this.content && Object.keys(this.content).length) { - this.form = JSON.parse(JSON.stringify(this.content)); - this.form.storeLogo = this.content.storeLogo - ? String(this.content.storeLogo).split(',').filter(Boolean) - : []; - this.form.goodsManagementCategory = this.content.goodsManagementCategory - ? String(this.content.goodsManagementCategory).split(',').filter(Boolean) - : []; - } this.getCategoryList(); } }; diff --git a/seller/src/views/goods/goods-seller/addGoods.scss b/seller/src/views/goods/goods-seller/addGoods.scss index 7a937f0c..71d154b8 100644 --- a/seller/src/views/goods/goods-seller/addGoods.scss +++ b/seller/src/views/goods/goods-seller/addGoods.scss @@ -524,8 +524,9 @@ div.base-info-item { } .tree-bar { + width: 100%; height: auto !important; - max-height: auto !important; + max-height: none !important; min-height: 240px !important; } diff --git a/seller/src/views/goods/goods-seller/goodsOperationSec.vue b/seller/src/views/goods/goods-seller/goodsOperationSec.vue index 8077853f..a76178f2 100644 --- a/seller/src/views/goods/goods-seller/goodsOperationSec.vue +++ b/seller/src/views/goods/goods-seller/goodsOperationSec.vue @@ -28,7 +28,6 @@ -