@lancom/shared 0.0.89 → 0.0.93
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/js/api/helpers.js +2 -1
- package/assets/js/utils/filters.js +9 -5
- package/assets/js/utils/product.js +3 -3
- package/components/checkout/cart/cart.mixin.js +3 -4
- package/components/checkout/cart/cart_entity/cart-entity.vue +8 -0
- package/components/checkout/cart/cart_price_info/cart-price-info.scss +10 -0
- package/components/checkout/cart/cart_price_info/cart-price-info.vue +9 -3
- package/components/checkout/cart/cart_shipments_pricing/cart-shipments-pricing.scss +44 -0
- package/components/checkout/cart/cart_shipments_pricing/cart-shipments-pricing.vue +107 -0
- package/components/checkout/order/address-form/address-form.vue +1 -1
- package/components/checkout/order/order-billing-information/order-billing-information.vue +0 -8
- package/components/checkout/order/order-shipping-method/order-shipping-method.vue +1 -1
- package/components/common/progress_steps/progress-steps.scss +1 -1
- package/components/editor/editor.vue +0 -8
- package/components/editor/editor_layers/editor_layer_forms/editor_layer_common_fields/editor-layer-common-fields.vue +0 -49
- package/components/editor/editor_layers/editor_layer_forms/editor_layer_form_art/editor-layer-form-art.vue +0 -6
- package/components/editor/editor_layers/editor_layers_toolbar/editor-layers-toolbar.vue +4 -0
- package/components/editor/editor_pricing/editor-pricing.vue +2 -4
- package/components/editor/editor_workspace/editor_workspace_side/editor-workspace-side.vue +0 -3
- package/components/modals/order_modal/order-modal.vue +1 -1
- package/components/order/order_payment/order-payment.vue +0 -4
- package/components/order/order_status/order-status.vue +0 -18
- package/components/product/layouts/product_model_measurements/product-model-measurements.vue +0 -5
- package/components/product/product.vue +0 -7
- package/components/products/product_list/product-list.vue +23 -2
- package/components/products/product_list_product_placeholder/product-list-product-placeholder.scss +52 -0
- package/components/products/product_list_product_placeholder/product-list-product-placeholder.vue +26 -0
- package/components/products/products_aside/products-aside.scss +32 -0
- package/components/products/products_aside/products-aside.vue +27 -27
- package/components/products/products_attributes/products-attributes.vue +0 -3
- package/components/products/products_brands/products-brands.vue +2 -2
- package/components/products/products_catalog/products-catalog.vue +8 -3
- package/components/products/products_colors/products-colors.scss +2 -1
- package/components/products/products_colors/products-colors.vue +11 -0
- package/components/products/products_filters/products-filters.vue +0 -17
- package/components/quotes/quote_request/quote-request.vue +3 -7
- package/mixins/payment.js +0 -1
- package/mixins/product-preview.js +28 -4
- package/nuxt.config.js +8 -5
- package/package.json +1 -1
- package/plugins/global-components.js +0 -4
- package/plugins/vue-recaptcha.js +12 -7
- package/store/cart.js +84 -32
- package/store/order.js +1 -0
- package/store/product.js +0 -2
- package/store/products.js +7 -2
package/components/products/product_list_product_placeholder/product-list-product-placeholder.scss
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
@import "@/assets/scss/variables";
|
|
2
|
+
|
|
3
|
+
.ProductListProductPlaceholder {
|
|
4
|
+
&__wrapper {
|
|
5
|
+
padding: 30px;
|
|
6
|
+
}
|
|
7
|
+
&__link {
|
|
8
|
+
position: absolute;
|
|
9
|
+
top: 0;
|
|
10
|
+
left: 0;
|
|
11
|
+
right: 0;
|
|
12
|
+
bottom: 0;
|
|
13
|
+
padding: 30px;
|
|
14
|
+
text-indent: -99999px;
|
|
15
|
+
display: flex;
|
|
16
|
+
align-items: center;
|
|
17
|
+
justify-content: center;
|
|
18
|
+
flex-direction: column;
|
|
19
|
+
}
|
|
20
|
+
&__image {
|
|
21
|
+
width: 100%;
|
|
22
|
+
height: 250px;
|
|
23
|
+
animation-name: backgroundColorPalette;
|
|
24
|
+
animation-duration: 1s;
|
|
25
|
+
animation-iteration-count: infinite;
|
|
26
|
+
animation-direction: alternate;
|
|
27
|
+
}
|
|
28
|
+
&__info {
|
|
29
|
+
margin-top: 20px;
|
|
30
|
+
width: 100%;
|
|
31
|
+
height: 30px;
|
|
32
|
+
animation-name: backgroundColorPalette;
|
|
33
|
+
animation-duration: 1.5s;
|
|
34
|
+
animation-iteration-count: infinite;
|
|
35
|
+
animation-direction: alternate;
|
|
36
|
+
&--medium {
|
|
37
|
+
width: 80%;
|
|
38
|
+
}
|
|
39
|
+
&--small {
|
|
40
|
+
width: 60%;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
@keyframes backgroundColorPalette {
|
|
46
|
+
0% {
|
|
47
|
+
background: #efefef;
|
|
48
|
+
}
|
|
49
|
+
100% {
|
|
50
|
+
background: #d9d9d9;
|
|
51
|
+
}
|
|
52
|
+
}
|
package/components/products/product_list_product_placeholder/product-list-product-placeholder.vue
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="ProductListProductPlaceholder__wrapper">
|
|
3
|
+
<nuxt-link
|
|
4
|
+
:to="productLink"
|
|
5
|
+
class="ProductListProductPlaceholder__link">
|
|
6
|
+
<span class="ProductListProductPlaceholder__image"></span>
|
|
7
|
+
<span class="ProductListProductPlaceholder__info ProductListProductPlaceholder__info--large"></span>
|
|
8
|
+
<span class="ProductListProductPlaceholder__info ProductListProductPlaceholder__info--medium"></span>
|
|
9
|
+
<span class="ProductListProductPlaceholder__info ProductListProductPlaceholder__info--small"></span>
|
|
10
|
+
{{ product.name }}
|
|
11
|
+
</nuxt-link>
|
|
12
|
+
</div>
|
|
13
|
+
</template>
|
|
14
|
+
|
|
15
|
+
<script>
|
|
16
|
+
import productPreview from '@lancom/shared/mixins/product-preview';
|
|
17
|
+
|
|
18
|
+
export default {
|
|
19
|
+
name: 'ProductListProductPlaceholder',
|
|
20
|
+
mixins: [productPreview]
|
|
21
|
+
};
|
|
22
|
+
</script>
|
|
23
|
+
|
|
24
|
+
<style lang="scss" scoped>
|
|
25
|
+
@import 'product-list-product-placeholder';
|
|
26
|
+
</style>
|
|
@@ -11,4 +11,36 @@
|
|
|
11
11
|
display: none;
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
|
+
&__placeholder {
|
|
15
|
+
display: flex;
|
|
16
|
+
flex-direction: column;
|
|
17
|
+
margin-right: 20px;
|
|
18
|
+
}
|
|
19
|
+
&__info {
|
|
20
|
+
margin-top: 20px;
|
|
21
|
+
width: 100%;
|
|
22
|
+
height: 20px;
|
|
23
|
+
animation-name: backgroundColorPalette;
|
|
24
|
+
animation-duration: 1.5s;
|
|
25
|
+
animation-iteration-count: infinite;
|
|
26
|
+
animation-direction: alternate;
|
|
27
|
+
&--medium {
|
|
28
|
+
width: 85%;
|
|
29
|
+
}
|
|
30
|
+
&--small {
|
|
31
|
+
width: 70%;
|
|
32
|
+
}
|
|
33
|
+
&--small2 {
|
|
34
|
+
width: 55%;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
@keyframes backgroundColorPalette {
|
|
40
|
+
0% {
|
|
41
|
+
background: #efefef;
|
|
42
|
+
}
|
|
43
|
+
100% {
|
|
44
|
+
background: #d9d9d9;
|
|
45
|
+
}
|
|
14
46
|
}
|
|
@@ -2,38 +2,35 @@
|
|
|
2
2
|
<div
|
|
3
3
|
:data-aos="aosFadeRight"
|
|
4
4
|
class="ProductsAside__wrapper">
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
@change="goToTextSearch" />
|
|
13
|
-
</div> -->
|
|
14
|
-
<!-- <div class="ProductsAside__item">
|
|
15
|
-
<products-types
|
|
16
|
-
:has-selected-icon="hasSelectedIcon"
|
|
17
|
-
:has-thumbs="hasThumbs" />
|
|
18
|
-
</div> -->
|
|
19
|
-
<div class="ProductsAside__item">
|
|
20
|
-
<products-brands
|
|
21
|
-
:has-selected-icon="hasSelectedIcon" />
|
|
5
|
+
<div
|
|
6
|
+
v-if="placeholder"
|
|
7
|
+
class="ProductsAside__placeholder">
|
|
8
|
+
<span class="ProductsAside__info ProductsAside__info--large"></span>
|
|
9
|
+
<span class="ProductsAside__info ProductsAside__info--medium"></span>
|
|
10
|
+
<span class="ProductsAside__info ProductsAside__info--small"></span>
|
|
11
|
+
<span class="ProductsAside__info ProductsAside__info--small2"></span>
|
|
22
12
|
</div>
|
|
23
|
-
<div
|
|
24
|
-
<
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
13
|
+
<div v-else>
|
|
14
|
+
<div class="ProductsAside__item">
|
|
15
|
+
<products-brands
|
|
16
|
+
:has-selected-icon="hasSelectedIcon" />
|
|
17
|
+
</div>
|
|
18
|
+
<div class="ProductsAside__item">
|
|
19
|
+
<products-colors />
|
|
20
|
+
</div>
|
|
21
|
+
<div class="ProductsAside__item">
|
|
22
|
+
<products-attributes
|
|
23
|
+
:has-selected-icon="hasSelectedIcon" />
|
|
24
|
+
<products-tags
|
|
25
|
+
:has-selected-icon="hasSelectedIcon" />
|
|
26
|
+
</div>
|
|
31
27
|
</div>
|
|
32
28
|
</div>
|
|
33
29
|
</template>
|
|
34
30
|
|
|
35
31
|
<script>
|
|
36
|
-
import ProductsTypes from '@lancom/shared/components/products/products_types/products-types';
|
|
32
|
+
// import ProductsTypes from '@lancom/shared/components/products/products_types/products-types';
|
|
33
|
+
import { mapGetters } from 'vuex';
|
|
37
34
|
import ProductsBrands from '@lancom/shared/components/products/products_brands/products-brands';
|
|
38
35
|
import ProductsTags from '@lancom/shared/components/products/products_tags/products-tags';
|
|
39
36
|
import ProductsAttributes from '@lancom/shared/components/products/products_attributes/products-attributes';
|
|
@@ -43,7 +40,7 @@ import { generateProductsLink } from '@lancom/shared/assets/js/utils/product';
|
|
|
43
40
|
export default {
|
|
44
41
|
name: 'ProductsAside',
|
|
45
42
|
components: {
|
|
46
|
-
ProductsTypes,
|
|
43
|
+
// ProductsTypes,
|
|
47
44
|
ProductsBrands,
|
|
48
45
|
ProductsTags,
|
|
49
46
|
ProductsAttributes,
|
|
@@ -64,6 +61,9 @@ export default {
|
|
|
64
61
|
search: this.$route.query.text || ''
|
|
65
62
|
};
|
|
66
63
|
},
|
|
64
|
+
computed: {
|
|
65
|
+
...mapGetters('products', ['placeholder'])
|
|
66
|
+
},
|
|
67
67
|
methods: {
|
|
68
68
|
goToTextSearch() {
|
|
69
69
|
this.goToPageWithFilters({ text: this.search });
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
<div
|
|
3
3
|
v-if="attributes.length"
|
|
4
4
|
class="ProductsAttributes__wrapper">
|
|
5
|
-
<!-- <toggle-content label="Attributes"> -->
|
|
6
5
|
<div
|
|
7
6
|
v-for="attribute in attributes"
|
|
8
7
|
:key="attribute._id"
|
|
@@ -11,13 +10,11 @@
|
|
|
11
10
|
:attribute="attribute"
|
|
12
11
|
:has-selected-icon="hasSelectedIcon" />
|
|
13
12
|
</div>
|
|
14
|
-
<!-- </toggle-content> -->
|
|
15
13
|
</div>
|
|
16
14
|
</template>
|
|
17
15
|
|
|
18
16
|
<script>
|
|
19
17
|
import { mapGetters } from 'vuex';
|
|
20
|
-
// import ToggleContent from '@lancom/shared/components/common/toggle-content';
|
|
21
18
|
import ProductsAttribute from './products_attribute/products-attribute';
|
|
22
19
|
|
|
23
20
|
export default {
|
|
@@ -43,8 +43,8 @@ export default {
|
|
|
43
43
|
computed: {
|
|
44
44
|
...mapGetters('products', ['brands', 'types']),
|
|
45
45
|
list() {
|
|
46
|
-
const type = this.types.find(type => type.alias === this.$route.params.type);
|
|
47
|
-
return
|
|
46
|
+
// const type = this.types.find(type => type.alias === this.$route.params.type);
|
|
47
|
+
return this.brands;
|
|
48
48
|
},
|
|
49
49
|
currentBrand() {
|
|
50
50
|
return this.$route.params.brand;
|
|
@@ -3,8 +3,11 @@
|
|
|
3
3
|
<div v-if="products">
|
|
4
4
|
<slot
|
|
5
5
|
name="list"
|
|
6
|
-
v-bind="{ products, toEditor }">
|
|
7
|
-
<product-list
|
|
6
|
+
v-bind="{ products, toEditor, placeholder }">
|
|
7
|
+
<product-list
|
|
8
|
+
:products="products"
|
|
9
|
+
:to-editor="toEditor"
|
|
10
|
+
:placeholder="placeholder" />
|
|
8
11
|
</slot>
|
|
9
12
|
<pagination
|
|
10
13
|
v-model="currentPage"
|
|
@@ -38,7 +41,8 @@ export default {
|
|
|
38
41
|
'products',
|
|
39
42
|
'page',
|
|
40
43
|
'count',
|
|
41
|
-
'perPage'
|
|
44
|
+
'perPage',
|
|
45
|
+
'placeholder'
|
|
42
46
|
]),
|
|
43
47
|
currentPage: {
|
|
44
48
|
get() {
|
|
@@ -47,6 +51,7 @@ export default {
|
|
|
47
51
|
set(page) {
|
|
48
52
|
const link = generateProductsLink(this.$route, { page });
|
|
49
53
|
this.$router.push(link);
|
|
54
|
+
window.scrollTo(0, 0);
|
|
50
55
|
}
|
|
51
56
|
}
|
|
52
57
|
}
|
|
@@ -31,6 +31,7 @@
|
|
|
31
31
|
'ProductsColors__color--selected': isSelectedColor(color)
|
|
32
32
|
}">
|
|
33
33
|
<product-color-image
|
|
34
|
+
v-if="canLoadImages"
|
|
34
35
|
:color="color"
|
|
35
36
|
class="ProductsColors__color-image" />
|
|
36
37
|
</div>
|
|
@@ -53,6 +54,11 @@ export default {
|
|
|
53
54
|
ProductsLink,
|
|
54
55
|
ToggleContent
|
|
55
56
|
},
|
|
57
|
+
data() {
|
|
58
|
+
return {
|
|
59
|
+
canLoadImages: false
|
|
60
|
+
};
|
|
61
|
+
},
|
|
56
62
|
computed: {
|
|
57
63
|
...mapGetters('products', ['colors']),
|
|
58
64
|
selectedColors() {
|
|
@@ -60,6 +66,11 @@ export default {
|
|
|
60
66
|
return this.colors.filter(color => colors.includes(color.alias));
|
|
61
67
|
}
|
|
62
68
|
},
|
|
69
|
+
mounted() {
|
|
70
|
+
setTimeout(() => {
|
|
71
|
+
this.canLoadImages = true;
|
|
72
|
+
}, 1000);
|
|
73
|
+
},
|
|
63
74
|
methods: {
|
|
64
75
|
isSelectedColor(color) {
|
|
65
76
|
return this.selectedColors.some(c => c._id === color._id);
|
|
@@ -20,23 +20,6 @@
|
|
|
20
20
|
class="icon-filter ProductsFilters__menu-toggle"
|
|
21
21
|
@click="$emit('open')"></i>
|
|
22
22
|
</div>
|
|
23
|
-
<!-- <div class="ProductsFilters__search hidden-sm-and-down">
|
|
24
|
-
<input
|
|
25
|
-
v-model="search"
|
|
26
|
-
name="search"
|
|
27
|
-
placeholder="Search"
|
|
28
|
-
type="text"
|
|
29
|
-
class="form-field no-label tiny-placeholder labelless"
|
|
30
|
-
@change="goToTextSearch" />
|
|
31
|
-
<i class="icon-search"></i>
|
|
32
|
-
</div> -->
|
|
33
|
-
<!-- <multiselect
|
|
34
|
-
v-model="sortBy"
|
|
35
|
-
:options="sortByOptions"
|
|
36
|
-
:option-height="35"
|
|
37
|
-
value="value"
|
|
38
|
-
label="label"
|
|
39
|
-
class="labelless" /> -->
|
|
40
23
|
</div>
|
|
41
24
|
</template>
|
|
42
25
|
|
|
@@ -1,11 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="QuoteRequest__wrapper">
|
|
3
|
-
<!-- <div class="QuoteRequest__title">
|
|
4
|
-
Quick Quote
|
|
5
|
-
</div>
|
|
6
|
-
<div class="QuoteRequest__info">
|
|
7
|
-
Fill our the form below and one of our team members will respond with a Quote ASAP!
|
|
8
|
-
</div> -->
|
|
9
3
|
<div class="QuoteRequest__content">
|
|
10
4
|
<validation-observer
|
|
11
5
|
v-slot="{ invalid, handleSubmit, errors: submittedErrors }"
|
|
@@ -297,11 +291,13 @@
|
|
|
297
291
|
import api from '@lancom/shared/assets/js/api';
|
|
298
292
|
import { mapGetters } from 'vuex';
|
|
299
293
|
import CheckedIcon from '@lancom/shared/components/common/checked-icon';
|
|
294
|
+
import FileUploader from '@lancom/shared/components/common/file_uploader';
|
|
300
295
|
|
|
301
296
|
export default {
|
|
302
297
|
name: 'QuoteRequest',
|
|
303
298
|
components: {
|
|
304
|
-
CheckedIcon
|
|
299
|
+
CheckedIcon,
|
|
300
|
+
FileUploader
|
|
305
301
|
},
|
|
306
302
|
data() {
|
|
307
303
|
return {
|
package/mixins/payment.js
CHANGED
|
@@ -22,7 +22,6 @@ export default {
|
|
|
22
22
|
},
|
|
23
23
|
isSuccessOrderCharge() {
|
|
24
24
|
const { charge, test, paymentMethod } = this.orderData || {};
|
|
25
|
-
console.log('charge...', charge, test, paymentMethod);
|
|
26
25
|
return charge?.success || test || paymentMethod === ORDER_PAYMENT_METHOD.DEPOSIT;
|
|
27
26
|
},
|
|
28
27
|
isFailedOrderCharge() {
|
|
@@ -4,6 +4,12 @@ import { generateProductLink } from '@lancom/shared/assets/js/utils/product';
|
|
|
4
4
|
|
|
5
5
|
const getBgStyle = img => img && ({ 'background-image': `url("${img}")` });
|
|
6
6
|
|
|
7
|
+
const loadHolder = {
|
|
8
|
+
canLoadImages: false,
|
|
9
|
+
canLoadColorImages: false,
|
|
10
|
+
canLoadBackImages: false
|
|
11
|
+
};
|
|
12
|
+
|
|
7
13
|
const productPreview = {
|
|
8
14
|
props: {
|
|
9
15
|
product: {
|
|
@@ -21,10 +27,20 @@ const productPreview = {
|
|
|
21
27
|
data() {
|
|
22
28
|
return {
|
|
23
29
|
currentColor: null,
|
|
24
|
-
productСoverLoaded: false
|
|
30
|
+
productСoverLoaded: false,
|
|
31
|
+
loadHolder
|
|
25
32
|
};
|
|
26
33
|
},
|
|
27
34
|
computed: {
|
|
35
|
+
canLoadImages() {
|
|
36
|
+
return this.loadHolder.canLoadImages;
|
|
37
|
+
},
|
|
38
|
+
canLoadColorImages() {
|
|
39
|
+
return this.loadHolder.canLoadColorImages;
|
|
40
|
+
},
|
|
41
|
+
canLoadBackImages() {
|
|
42
|
+
return this.loadHolder.canLoadBackImages;
|
|
43
|
+
},
|
|
28
44
|
previewTags() {
|
|
29
45
|
return this.product.previewTags || [];
|
|
30
46
|
},
|
|
@@ -38,9 +54,6 @@ const productPreview = {
|
|
|
38
54
|
productLink() {
|
|
39
55
|
return generateProductLink(this.product, this.currentColor, this.toEditor);
|
|
40
56
|
},
|
|
41
|
-
productСoverBig() {
|
|
42
|
-
return getProductLargeCover(this.product, 'front', this.currentColor);
|
|
43
|
-
},
|
|
44
57
|
productСover() {
|
|
45
58
|
return getProductMediumCover(this.product, 'front', this.currentColor);
|
|
46
59
|
},
|
|
@@ -63,6 +76,17 @@ const productPreview = {
|
|
|
63
76
|
hasTags() {
|
|
64
77
|
return this.product?.tags.length > 0;
|
|
65
78
|
}
|
|
79
|
+
},
|
|
80
|
+
mounted() {
|
|
81
|
+
if (process.client) {
|
|
82
|
+
setTimeout(() => {
|
|
83
|
+
this.loadHolder.canLoadImages = true;
|
|
84
|
+
}, 0);
|
|
85
|
+
setTimeout(() => {
|
|
86
|
+
this.loadHolder.canLoadBackImages = true;
|
|
87
|
+
this.loadHolder.canLoadColorImages = true;
|
|
88
|
+
}, 3000);
|
|
89
|
+
}
|
|
66
90
|
}
|
|
67
91
|
};
|
|
68
92
|
|
package/nuxt.config.js
CHANGED
|
@@ -32,7 +32,7 @@ module.exports = (config, axios) => ({
|
|
|
32
32
|
'/customer/**'
|
|
33
33
|
],
|
|
34
34
|
routes: async () => {
|
|
35
|
-
const { data } = await axios.get(`${config.
|
|
35
|
+
const { data } = await axios.get(`${config.LOCAL_API_URL}/feed/sitemap?host=${config.HOST_NAME}`);
|
|
36
36
|
return data.map(url => ({ url, priority: 0.8 }));
|
|
37
37
|
}
|
|
38
38
|
},
|
|
@@ -47,7 +47,6 @@ module.exports = (config, axios) => ({
|
|
|
47
47
|
{ src: '@/node_modules/@lancom/shared/plugins/vue-hummer', ssr: false },
|
|
48
48
|
'@/node_modules/@lancom/shared/plugins/vue-multiselect',
|
|
49
49
|
'@/node_modules/@lancom/shared/plugins/vue-tooltip',
|
|
50
|
-
'@/node_modules/@lancom/shared/plugins/vue-color',
|
|
51
50
|
'@/node_modules/@lancom/shared/plugins/vue-click-outside',
|
|
52
51
|
{ src: '@/node_modules/@lancom/shared/plugins/error-handler', ssr: false },
|
|
53
52
|
{ src: '@/node_modules/@lancom/shared/plugins/aos', ssr: false },
|
|
@@ -74,12 +73,16 @@ module.exports = (config, axios) => ({
|
|
|
74
73
|
'@lancom',
|
|
75
74
|
'@lancom/shared/plugins/aos-animation'
|
|
76
75
|
],
|
|
77
|
-
extend(config,
|
|
76
|
+
extend(config, { isClient }) {
|
|
77
|
+
if (isClient) {
|
|
78
|
+
config.devtool = 'source-map';
|
|
79
|
+
}
|
|
80
|
+
}
|
|
78
81
|
},
|
|
79
82
|
feed: [{
|
|
80
83
|
path: '/google-shopping.xml',
|
|
81
84
|
async get() {
|
|
82
|
-
const { data } = await axios.get(`${config.
|
|
85
|
+
const { data } = await axios.get(`${config.LOCAL_API_URL}/feed/products?host=${config.HOST_NAME}`);
|
|
83
86
|
const spliceFirstImage = images => (images || []).splice(0, 1)[0];
|
|
84
87
|
const getImages = images => (images || []).length > 0 ? images : null;
|
|
85
88
|
return {
|
|
@@ -97,7 +100,7 @@ module.exports = (config, axios) => ({
|
|
|
97
100
|
const image = spliceFirstImage(feedImages) || spliceFirstImage(frontImages) || spliceFirstImage(catalogFrontImages) || spliceFirstImage(backImages) || {};
|
|
98
101
|
const images = getImages(backImages) || getImages(frontImages) || [];
|
|
99
102
|
const info = {
|
|
100
|
-
title: { _text: `${product.name} ${sp.color.name}
|
|
103
|
+
title: { _text: `${product.name} ${sp.color.name}` },
|
|
101
104
|
description: { _text: product.description || product.fabricInfoShort || product.name },
|
|
102
105
|
link: { _text: `https://${config.HOST_NAME}/${product.brand.alias}/${product.productType.alias}/${product.alias}?color=${sp.color.alias}` },
|
|
103
106
|
'g:id': { _text: sp.SKU },
|
package/package.json
CHANGED
|
@@ -1,14 +1,10 @@
|
|
|
1
1
|
import Vue from 'vue';
|
|
2
2
|
import Btn from '@lancom/shared/components/common/btn';
|
|
3
3
|
import Spinner from '@lancom/shared/components/common/spinner';
|
|
4
|
-
import FileUploader from '@lancom/shared/components/common/file_uploader';
|
|
5
4
|
import Checkbox from '@lancom/shared/components/common/checkbox';
|
|
6
|
-
import ColorPicker from '@lancom/shared/components/common/color-picker';
|
|
7
5
|
import Breakpoint from '@lancom/shared/components/common/breakpoint';
|
|
8
6
|
|
|
9
7
|
Vue.component('btn', Btn);
|
|
10
8
|
Vue.component('spinner', Spinner);
|
|
11
|
-
Vue.component('file-uploader', FileUploader);
|
|
12
9
|
Vue.component('Checkbox', Checkbox);
|
|
13
|
-
Vue.component('ColorPicker', ColorPicker);
|
|
14
10
|
Vue.component('breakpoint', Breakpoint);
|
package/plugins/vue-recaptcha.js
CHANGED
|
@@ -1,17 +1,22 @@
|
|
|
1
1
|
import Vue from 'vue';
|
|
2
|
-
import { VueReCaptcha } from 'vue-recaptcha-v3';
|
|
3
2
|
|
|
4
3
|
export default () => {
|
|
5
|
-
Vue.use(VueReCaptcha, {
|
|
6
|
-
siteKey: process.env.RECAPTCHA_KEY,
|
|
7
|
-
loaderOptions: {
|
|
8
|
-
useRecaptchaNet: true
|
|
9
|
-
}
|
|
10
|
-
});
|
|
11
4
|
Vue.mixin({
|
|
12
5
|
methods: {
|
|
13
6
|
async getRecaptcha(name) {
|
|
7
|
+
if (!this.$recaptcha) {
|
|
8
|
+
await this.loadReCaptcha();
|
|
9
|
+
}
|
|
14
10
|
return process.env.IS_LOCAL === 'true' || await this.$recaptcha(name);
|
|
11
|
+
},
|
|
12
|
+
async loadReCaptcha() {
|
|
13
|
+
const { VueReCaptcha } = await import('vue-recaptcha-v3');
|
|
14
|
+
Vue.use(VueReCaptcha, {
|
|
15
|
+
siteKey: process.env.RECAPTCHA_KEY,
|
|
16
|
+
loaderOptions: {
|
|
17
|
+
useRecaptchaNet: true
|
|
18
|
+
}
|
|
19
|
+
});
|
|
15
20
|
}
|
|
16
21
|
}
|
|
17
22
|
});
|