渲染页面图片的时候,图片显示不出来,报错,其他文字都能显示,我把src里的地址写死,页面的图片是可以显示的,但是换成变量就不行???
请看代码:
<view class="page__hd">
<view class="weui-cell weui-cell-img">
<view class="weui-cell__hd" style="position: relative;margin-right: 10px;">
<image src="detail.user_info.avtor" style="width: 50px; height: 50px; display: block"/>
</view>
<view class="weui-cell__bd">
<view style="font-weight: bold;color: #668ABE;">{{ detail.user_info.name }}</view>
<view style="font-size: 13px;color: #888888;">{{ detail.create_date }}</view>
</view>
</view>
</view>
js里的数据:
报错:
src="detail.user_info.avtor" 这里写的有没问题吧,我换成src="../../assets/img/leyang.png"可以渲染出头像来的!!??
src="{{detail.user_info.avtor}}"