feat: widget id

This commit is contained in:
Tristan Yang
2024-06-24 18:34:05 +08:00
parent 6997c3173b
commit 6bc2d1730b
8 changed files with 40 additions and 27 deletions
+2 -1
View File
@@ -1,6 +1,7 @@
// IIFC
((w, d) => {
const {
id = "",
hostId = 1,
autoReg = "true",
loginToken = "",
@@ -28,7 +29,7 @@
Object.assign(wrapper.style, styles);
wrapper.src = `${
new URL(_src).origin
}/widget.html?host=${hostId}&autoReg=${autoReg}&token=${loginToken}&themeColor=${encodeURIComponent(
}/widget.html?id=${id}&host=${hostId}&autoReg=${autoReg}&token=${loginToken}&themeColor=${encodeURIComponent(
themeColor
)}&from=${encodeURIComponent(location.hostname)}&welcome=${encodeURIComponent(welcome)}`;
wrapper.width = closeWidth;