问题描述
我正在尝试使用存储在我的计算机上的图像及其在 mongoDB 图集中的链接来显示书籍图像。 当显示所有书籍时,没有任何图像被渲染,而当我查看 1 本书时,图像正在显示。此外,当我为任何一张图像(用于测试)硬编码书籍链接时,它们就会被渲染。
我正在使用 pug,这是我的代码
each book in book_list
div(class="w3-quarter")
a(href=book.url)
img(src=book.imgpath,alt=book.title,height="180px",width="200px",class="dp")
p(id="title") Title:- #{book.title}
p(id="author") Author:- #{book.author}
这是选择特定书籍时的代码
div(class="w3-container")
h1 #{title}: #{results.title}
img(src=results.imgpath,alt="",height="250px",width="250px",class="dp")
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)