fix: 调整客服弹窗 将 PC 端聊天窗口从 380×640 调整为 450×750。
H5 端:宽度占满,高度根据宽度等比缩放
This commit is contained in:
@@ -55,10 +55,17 @@ export const bytedeskConfig = {
|
|||||||
t: '1', // 类型: 1=人工客服, 2=机器人
|
t: '1', // 类型: 1=人工客服, 2=机器人
|
||||||
sid: 'df_wg_uid', // 工作组ID
|
sid: 'df_wg_uid', // 工作组ID
|
||||||
},
|
},
|
||||||
|
|
||||||
|
window: window.innerWidth <= 768 ? {
|
||||||
|
width: window.innerWidth - 1,
|
||||||
|
height: Math.min(window.innerWidth * 640/380, window.innerHeight - 200)
|
||||||
|
} : { width: 380, height: 640 }
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取Bytedesk配置(根据环境自动切换)
|
* 获取Bytedesk配置(根据环境自动切换)
|
||||||
|
* - H5 端:宽度占满,高度根据宽度等比缩放
|
||||||
|
* - PC 端:固定宽高 380x640
|
||||||
*
|
*
|
||||||
* @returns {Object} Bytedesk配置对象
|
* @returns {Object} Bytedesk配置对象
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -21,12 +21,9 @@
|
|||||||
iframe[src*="bytedesk"],
|
iframe[src*="bytedesk"],
|
||||||
iframe[src*="/chat/"],
|
iframe[src*="/chat/"],
|
||||||
iframe[src*="/visitor/"] {
|
iframe[src*="/visitor/"] {
|
||||||
position: fixed !important;
|
|
||||||
z-index: 999999 !important;
|
z-index: 999999 !important;
|
||||||
max-height: 80vh !important; /* 限制最大高度为视口的80% */
|
width: 100% !important; /* 填满外层容器 */
|
||||||
max-width: 40vh !important; /* 限制最大高度为视口的80% */
|
height: 100% !important; /* 填满外层容器 */
|
||||||
bottom: 10px !important; /* 确保底部有足够空间 */
|
|
||||||
right: 10px !important; /* 右侧边距 */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Bytedesk 覆盖层(如果存在) */
|
/* Bytedesk 覆盖层(如果存在) */
|
||||||
|
|||||||
Reference in New Issue
Block a user