...
|
...
|
@@ -4,9 +4,11 @@ |
|
|
* @date: 2015/11/12
|
|
|
*/
|
|
|
var $ = require('jquery');
|
|
|
var $userAvatar = $('.user-avatar');
|
|
|
var myImage = new Image();
|
|
|
|
|
|
require('../product/recommend-for-you.js');
|
|
|
|
|
|
$('.user-avatar').on('error', function() {
|
|
|
$(this).attr('src', 'http://static.dev.yohobuy.com/img/me/index/user-avatar.png');
|
|
|
}); |
|
|
\ No newline at end of file |
|
|
myImage.src = $userAvatar.attr('src');
|
|
|
myImage.onerror = function() {
|
|
|
$userAvatar.attr('src', 'http://static.dev.yohobuy.com/img/me/index/user-avatar.png');
|
|
|
}; |
...
|
...
|
|