diff --git a/.eslintrc.js b/.eslintrc.js index 935b1c68..a563f065 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -13,7 +13,7 @@ module.exports = { parser: '@typescript-eslint/parser', }, rules: { - 'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off', + 'no-console': 'off', 'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off', 'vue/no-deprecated-slot-attribute': 'off', '@typescript-eslint/no-explicit-any': 'off', diff --git a/src/router/index.ts b/src/router/index.ts index f734ae93..7e78e2c6 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -63,7 +63,7 @@ const routes: Array = [ beforeEnter: authGuard }, { - path: '/catalog-product-details/:groupId/:productId', + path: '/catalog-product-details/:productId/:variantId', name: 'Catalog-product-details', component: CatalogProductdetails, beforeEnter: authGuard diff --git a/src/views/catalog-product-details.vue b/src/views/catalog-product-details.vue index bd1c80a0..de2efd17 100644 --- a/src/views/catalog-product-details.vue +++ b/src/views/catalog-product-details.vue @@ -105,7 +105,7 @@ export default defineComponent({ }) }, async mounted() { - await this.store.dispatch('product/setCurrentCatalogProduct', { productId: this.$route.params.groupId }) + await this.store.dispatch('product/setCurrentCatalogProduct', { productId: this.$route.params.productId }) if (this.product.variants) { this.getFeatures() this.updateVariant() @@ -128,7 +128,7 @@ export default defineComponent({ Object.keys(features).forEach((color) => this.features[color] = sortSizes(features[color])) - const openedVariant = this.product.variants.find((variant: any) => variant.productId === this.$route.params.productId) + const openedVariant = this.product.variants.find((variant: any) => variant.productId === this.$route.params.variantId) this.selectedColor = getFeature(openedVariant.featureHierarchy, '1/COLOR/') this.selectedSize = getFeature(openedVariant.featureHierarchy, '1/SIZE/') }, diff --git a/src/views/catalog.vue b/src/views/catalog.vue index 97f2ce14..d2790ee2 100644 --- a/src/views/catalog.vue +++ b/src/views/catalog.vue @@ -255,7 +255,7 @@ export default defineComponent({ this.preordBckordComputationJob = {} } } catch (error) { - console.log(error) + console.error(error) } }, getTime(time: number) {