@lancom/shared 0.0.379 → 0.0.380
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/mixins/product-view.js +4 -1
- package/package.json +1 -1
- package/store/product.js +5 -3
- package/store/products.js +3 -1
package/mixins/product-view.js
CHANGED
|
@@ -62,7 +62,10 @@ export default (IS_PRODUCT_PRESET_PRINT_PRICING, isEditor = false) => ({
|
|
|
62
62
|
const pageItem = store.getters['product/product'];
|
|
63
63
|
const loadError = store.getters['product/loadError'];
|
|
64
64
|
|
|
65
|
-
|
|
65
|
+
// console.log('loadError: ', loadError);
|
|
66
|
+
if (loadError?.redirectLink) {
|
|
67
|
+
return redirect(301, loadError?.redirectLink);
|
|
68
|
+
} else if (loadError) {
|
|
66
69
|
error(loadError);
|
|
67
70
|
}
|
|
68
71
|
|
package/package.json
CHANGED
package/store/product.js
CHANGED
|
@@ -172,12 +172,14 @@ export const actions = {
|
|
|
172
172
|
commit('setIsPrintPricing', true);
|
|
173
173
|
}
|
|
174
174
|
} catch (e) {
|
|
175
|
-
console.log(e);
|
|
175
|
+
// console.log(e);
|
|
176
176
|
const { status, data } = e?.response || {};
|
|
177
|
+
// console.log('data: ', data);
|
|
177
178
|
const statusCode = status || 500;
|
|
178
179
|
commit('setLoadError', {
|
|
179
180
|
statusCode,
|
|
180
|
-
message: data?.error || 'Product not found'
|
|
181
|
+
message: data?.error || 'Product not found',
|
|
182
|
+
redirectLink: data?.redirectLink || null
|
|
181
183
|
});
|
|
182
184
|
}
|
|
183
185
|
},
|
|
@@ -265,7 +267,7 @@ export const actions = {
|
|
|
265
267
|
printType: selectedPrintType?._id
|
|
266
268
|
}
|
|
267
269
|
});
|
|
268
|
-
console.log('layer: ', layer);
|
|
270
|
+
// console.log('layer: ', layer);
|
|
269
271
|
if (preselect) {
|
|
270
272
|
commit('setSelectedLayer', layer);
|
|
271
273
|
}
|
package/store/products.js
CHANGED
|
@@ -69,11 +69,13 @@ export const actions = {
|
|
|
69
69
|
return { products };
|
|
70
70
|
} catch (e) {
|
|
71
71
|
const { status, data } = e?.response || {};
|
|
72
|
+
// console.log(e.response.data)
|
|
72
73
|
const statusCode = status || 500;
|
|
73
74
|
// console.log('statusCode: ', statusCode, data?.error || 'Post not found');
|
|
74
75
|
commit('setLoadError', {
|
|
75
76
|
statusCode,
|
|
76
|
-
error: data?.error || 'Post not found'
|
|
77
|
+
error: data?.error || 'Post not found',
|
|
78
|
+
redirectLink: data?.redirectLink || null
|
|
77
79
|
});
|
|
78
80
|
throw e;
|
|
79
81
|
}
|