storage url o'zgartirildi
This commit is contained in:
@@ -1033,7 +1033,9 @@ export default {
|
||||
|
||||
watch: {
|
||||
"products.category_id": function (newVal) {
|
||||
this.getCharacteristics(newVal);
|
||||
if (newVal) {
|
||||
this.getCharacteristics(newVal);
|
||||
}
|
||||
},
|
||||
|
||||
"category.first": function (newVal) {
|
||||
@@ -1050,8 +1052,8 @@ export default {
|
||||
this.DetectCategoryTwo();
|
||||
} else {
|
||||
if (newVal.id) {
|
||||
this.product.category_id = newVal.id;
|
||||
this.getCharacteristics(newVal);
|
||||
this.products.category_id = newVal.id;
|
||||
this.getCharacteristics(newVal.id);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1178,7 +1180,7 @@ export default {
|
||||
this.category.two_view = true;
|
||||
} else {
|
||||
this.getCharacteristics(this.category.first.id);
|
||||
this.product.category_id = this.category.first.id;
|
||||
this.products.category_id = this.category.first.id;
|
||||
}
|
||||
},
|
||||
|
||||
@@ -1197,6 +1199,13 @@ export default {
|
||||
},
|
||||
|
||||
async getCharacteristics(id) {
|
||||
id = id && id.id ? id.id : id;
|
||||
|
||||
if (!id) {
|
||||
this.characteristics = [];
|
||||
return;
|
||||
}
|
||||
|
||||
const { data } = await axios.get(
|
||||
"/dashboard/products/characteristics/" + id
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user