Skip to content

Commit 75ff73a

Browse files
committed
add image
1 parent af77480 commit 75ff73a

File tree

1 file changed

+32
-7
lines changed

1 file changed

+32
-7
lines changed

js/channel.js

Lines changed: 32 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ $(document).ready(function() {
243243
sendChannelNameToParent();
244244
});
245245

246-
// publish();
246+
// publish();
247247
});
248248

249249
function showNotification(title, message) {
@@ -308,12 +308,37 @@ function publish() {
308308
var counterA = 0;
309309
setInterval(() => {
310310
counterA++;
311-
publisher.publish(
312-
'info',
313-
`{"id":${counterA}, "count" : ${
314-
counterA % 2 === 0 ? 1 : 2
315-
}, "size" : "one"}`
316-
);
311+
const prod = [
312+
{
313+
name: 'A',
314+
color: 'Blue',
315+
size: 50,
316+
locations: ['USA', 'Europe'],
317+
details: { length: 20, width: 70 }
318+
},
319+
{
320+
name: 'B',
321+
color: 'Blue',
322+
size: 60,
323+
locations: [],
324+
details: { length: 20, width: 70 }
325+
},
326+
{
327+
name: 'C',
328+
color: 'Black',
329+
size: 70,
330+
locations: ['Japan'],
331+
details: { length: 20, width: 71 }
332+
},
333+
{
334+
name: 'D',
335+
color: 'Green',
336+
size: 50,
337+
locations: ['USA'],
338+
details: { length: 20, width: 71 }
339+
}
340+
];
341+
publisher.publish('info', JSON.stringify(prod));
317342
}, 1000);
318343
}
319344

0 commit comments

Comments
 (0)