fix: pre-process order userbAvatar in JS, simplify WXML image tags

Move image URL construction from WXML ternary to JS pre-processing.
This ensures fixImageUrl() is properly applied before template rendering.
Also reverts fixImageUrl to use API base URL (images served via backend).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
renjianbo
2026-06-07 11:53:49 +08:00
parent f5024c0ed0
commit ade42d9b27
6 changed files with 22 additions and 14 deletions

View File

@@ -107,11 +107,11 @@ App({
};
},
// 修复图片路径:相对路径补全图片基地址,绝对 URL 或空值原样返回
// 修复图片路径:相对路径补全 baseUrl,绝对 URL 或空值原样返回
fixImageUrl: function (path) {
if (!path) return '';
if (path.indexOf('http') === 0) return path;
return this.globalData.imageBaseUrl + path;
return this.globalData.url + path;
},
// 获取订单状态文案