图片显示
后台上传图片附件,路径是/storage/default/20250210/lunb917bce9646f82559ef2b1196579e9ee212aba0ba.png,uniapp前端显示https://servicewechat.com/storage/default/20250210/lunb917bce9646f82559ef2b1196579e9ee212aba0ba.png,
图片显示不出来,请大佬指教
请先登录
热门问题
后台上传图片附件,路径是/storage/default/20250210/lunb917bce9646f82559ef2b1196579e9ee212aba0ba.png,uniapp前端显示https://servicewechat.com/storage/default/20250210/lunb917bce9646f82559ef2b1196579e9ee212aba0ba.png,
图片显示不出来,请大佬指教
多图之间以逗号分割,在模型中定义获取器把字符串分割为数组就行了
{
"code": 1,
"msg": "ok",
"time": 1741141154,
"data": {
"adv_image": [
"/storage/default/20250210/lunb917bce9646f82559ef2b1196579e9ee212aba0ba.png",
"/storage/default/20250210/lunb251d38c518cbe19cb75a72b637f80ef0d4a93ba8a.png",
"/storage/default/20250210/lunb3a4c4224da30907e8779964f286c9d66cc836973c.png"
],
}
}
返回是这种格式的,但是还是显示不出来图片报错,但是前面加上域名就能访问,我是觉得系统存这种路径肯定是有方法访问的,如果实在不行就只能写一方法给上传的图片加上域名了
[渲染层网络层错误] Failed to load local image resource /storage/default/20250210/lunb917bce9646f82559ef2b1196579e9ee212aba0ba.png
the server responded with a status of 500 (HTTP/1.1 500 Internal Server Error)
(env: macOS,mp,1.06.2412050; lib: 3.4.5)
服务端使用
full_url
可处理资源路径- 1
前往