|
@@ -168,7 +168,7 @@ var _page = {
|
|
|
this.initHotIndustrySearch()
|
|
|
this.initDocsDescTab()
|
|
|
this.docImgClick()
|
|
|
-
|
|
|
+ this.docImgPlaceholder()
|
|
|
},
|
|
|
// 计算九宫格高度
|
|
|
initUserInfoCard: function () {
|
|
@@ -383,6 +383,16 @@ var _page = {
|
|
|
var href = $(this).parents().siblings('a').attr('href')
|
|
|
window.open(href)
|
|
|
})
|
|
|
+ },
|
|
|
+ // 处理文图图片访问不到时用默认图片占位
|
|
|
+ docImgPlaceholder: function() {
|
|
|
+ var $img = $('.doc-card-list-item .doc-main-img')
|
|
|
+ $img.each(function() {
|
|
|
+ if (!this.complete || typeof this.naturalWidth == "undefined" || this.naturalWidth == 0) {
|
|
|
+ this.src = '/images/pc/doc-error.png'
|
|
|
+ $(this).parents('.doc-card-list-item-img').css({"border": "0"})
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
}
|
|
|
|