Authored by 姜枫

处理js bug

... ... @@ -271,16 +271,19 @@ var YohoListPage = {
showGoodsWrapper: function(e) {
var position = $(e.currentTarget).position();
var productId = $(e.currentTarget).data('id');
var url = $(e.currentTarget).data('url');
var imgsSize = $(e.currentTarget).find('.goods-list i').length;
var imgsCol;
var imgsCol, url;
var pos = {};
var self = this;
if (YohoListPage.goodsWrapperState && YohoListPage.productId !== productId) {
YohoListPage.goodsWrapperState = false;
}
if (!YohoListPage.goodsWrapperState) {
url = $(e.currentTarget).data('url');
YohoListPage.productId = productId;
pos.top = position.top + 10;
... ... @@ -316,7 +319,7 @@ var YohoListPage = {
$('.goods-img-list img', this.goodsWrapper).hover(function() {
var _url = $(this).data('url');
$('.goods', this.goodsWrapper).data('url', _url);
$('.goods', self.goodsWrapper).data('url', _url);
$('.goods .goods-img img', YohoListPage.goodsWrapper).attr('src', $(this).attr('src'));
});
$('.goods-img-list img', this.goodsWrapper).click(function() {
... ...