/* * @Author: jackning 270580156@qq.com * @Date: 2024-06-18 16:13:37 * @LastEditors: jackning 270580156@qq.com * @LastEditTime: 2024-09-02 15:20:46 * @Description: bytedesk.com https://github.com/Bytedesk/bytedesk * Please be aware of the BSL license restrictions before installing Bytedesk IM – * selling, reselling, or hosting Bytedesk IM as a service is a breach of the terms and automatically terminates your rights under the license. * 仅支持企业内部员工自用,严禁私自用于销售、二次销售或者部署SaaS方式销售 * Business Source License 1.1: https://github.com/Bytedesk/bytedesk/blob/main/LICENSE * contact: 270580156@qq.com * 联系:270580156@qq.com * Copyright (c) 2024 by bytedesk.com, All Rights Reserved. */ // 假设这是一个纯JS文件,没有HTML文件 // 需要先在页面中引入jQuery库 // 封装ChatFloat相关逻辑 (function ($) { // 定义默认配置 var defaults = { chatUrl: 'https://www.weiyuai.cn/chat?org=df_org_uid&t=1&sid=default_wg_uid&', buttonPosition: 'right', buttonBackgroundColor: 'blue', iframeWidth: 400, iframeHeight: 600, iframeMargins: { right: 20, bottom: 20, left: 20 }, buttonMargins: { right: 20, bottom: 20, left: 20 }, showButton: true, showIframe: true }; // 插件核心功能 function ChatFloat(element, options) { // 合并默认配置和用户配置 var settings = $.extend({}, defaults, options); // 根据配置创建按钮和iframe var button = $('