feat: add console logging for image loading and product data fetching in Product and ProductDetailPage components for improved debugging
This commit is contained in:
@@ -41,6 +41,7 @@ class Product extends Component {
|
|||||||
|
|
||||||
loadImage = (bildId) => {
|
loadImage = (bildId) => {
|
||||||
|
|
||||||
|
console.log('loadImagevisSocket', bildId);
|
||||||
window.socketManager.emit('getPic', { bildId, size:'small' }, (res) => {
|
window.socketManager.emit('getPic', { bildId, size:'small' }, (res) => {
|
||||||
if(res.success){
|
if(res.success){
|
||||||
window.smallPicCache[bildId] = URL.createObjectURL(new Blob([res.imageBuffer], { type: 'image/jpeg' }));
|
window.smallPicCache[bildId] = URL.createObjectURL(new Blob([res.imageBuffer], { type: 'image/jpeg' }));
|
||||||
|
|||||||
@@ -133,6 +133,7 @@ class ProductDetailPage extends Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Fetch image from server
|
// Fetch image from server
|
||||||
|
console.log('loadKomponentImage', bildId);
|
||||||
window.socketManager.emit('getPic', { bildId, size: 'small' }, (res) => {
|
window.socketManager.emit('getPic', { bildId, size: 'small' }, (res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
// Cache the image
|
// Cache the image
|
||||||
@@ -227,6 +228,7 @@ class ProductDetailPage extends Component {
|
|||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
console.log('loadKomponent', id, count);
|
||||||
window.socketManager.emit(
|
window.socketManager.emit(
|
||||||
"getProductView",
|
"getProductView",
|
||||||
{ articleId: id },
|
{ articleId: id },
|
||||||
@@ -338,7 +340,7 @@ class ProductDetailPage extends Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
loadProductData = () => {
|
loadProductData = () => {
|
||||||
|
console.log('loadProductData', this.props.seoName);
|
||||||
window.socketManager.emit(
|
window.socketManager.emit(
|
||||||
"getProductView",
|
"getProductView",
|
||||||
{ seoName: this.props.seoName },
|
{ seoName: this.props.seoName },
|
||||||
@@ -408,7 +410,7 @@ class ProductDetailPage extends Component {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// Not in cache, fetch from server
|
// Not in cache, fetch from server
|
||||||
|
console.log('getAttributePicture', cacheKey);
|
||||||
window.socketManager.emit(
|
window.socketManager.emit(
|
||||||
"getAttributePicture",
|
"getAttributePicture",
|
||||||
{ id: cacheKey },
|
{ id: cacheKey },
|
||||||
|
|||||||
Reference in New Issue
Block a user