|
|
@@ -250,10 +250,10 @@ var app = new Vue({ |
|
|
|
if(response.data.categories) { |
|
|
|
app.categories = response.data.categories ; |
|
|
|
if(app.countProductsByCategory(response.data.categories[0])) { |
|
|
|
app.setCategoryCurrent(response.data.categories[0]) ; |
|
|
|
app.setCategoryCurrent(response.data.categories[0], true) ; |
|
|
|
} |
|
|
|
else { |
|
|
|
app.setCategoryCurrent(response.data.categories[1]) ; |
|
|
|
app.setCategoryCurrent(response.data.categories[1], true) ; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
@@ -611,8 +611,8 @@ var app = new Vue({ |
|
|
|
|
|
|
|
return count ; |
|
|
|
}, |
|
|
|
setCategoryCurrent: function(category) { |
|
|
|
if(this.categoryCurrent && this.categoryCurrent.id == category.id) { |
|
|
|
setCategoryCurrent: function(category, first) { |
|
|
|
if(this.categoryCurrent && this.categoryCurrent.id == category.id && !first) { |
|
|
|
this.categoryCurrent = null ; |
|
|
|
} |
|
|
|
else { |