图片如果不是地址使用默认的

This commit is contained in:
HelloWorld 2020-05-06 10:08:17 +08:00
parent 8d9f3b20ba
commit a0242aa1a8
1 changed files with 1 additions and 1 deletions

View File

@ -17,7 +17,7 @@
</div>
</div>
<div class="image hot-image" href="{{ bookmark.url }}" style="cursor: pointer;" ng-click="detailBookmark(bookmark)">
<img ng-src="{{bookmark.snap}}" err-src="{{bookmark.snap.replace('https://', 'http://')}}" />
<img ng-src="{{bookmark.snap}}" err-src="{{bookmark.snap.startsWith('https://') ? bookmark.snap.replace('https://', 'http://') : './images/default.jpg'}}" />
</div>
<div class="extra content" ng-show="!bookmark.edit">
<img class="ui avatar image" style="width: 16px; height: 16px;" ng-src="{{bookmark.icon}}" />