fix: 修复入驻误校验与商品品牌显示 0,并优化分类、运费模板交互

- 入驻第三步改为先回填再渲染,避免空字段进页即提示
- 入驻协议无内容时按空字符串处理,避免读取 null
- 商品品牌空值展示占位符,提交时再转为 0
- 店内分类为空时横向展示「暂无分类」
- 运费模板选择地址默认折叠,操作文案改为「选择地址」
This commit is contained in:
田香琪
2026-08-20 16:55:05 +08:00
parent 9540a1b98b
commit 085674dfa7
6 changed files with 99 additions and 45 deletions

View File

@@ -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() {