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:
@@ -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;
|
||||
},
|
||||
|
||||
// 获取订单状态文案
|
||||
|
||||
Reference in New Issue
Block a user