{"_id":"@chenfengwei/floating-promo-bot","_rev":"4-36353324eaf6a2983d0f03ab6ef9f5cc","name":"@chenfengwei/floating-promo-bot","dist-tags":{"latest":"1.0.0"},"versions":{"0.1.0":{"name":"@chenfengwei/floating-promo-bot","version":"0.1.0","_id":"@chenfengwei/floating-promo-bot@0.1.0","maintainers":[{"name":"chenfengwei","email":"921198340@qq.com"}],"dist":{"shasum":"1f82a0699b8d87887cd57ce0ffd58b7b302033b0","tarball":"https://registry.npmjs.org/@chenfengwei/floating-promo-bot/-/floating-promo-bot-0.1.0.tgz","fileCount":9,"integrity":"sha512-KwQvWUcteiGUS/7k4iBsVzF2c0mWWmElTUdSoda3ZxGjNayofoM1x82zxLht3MxLbiZph2IRcf+fgI9HHaRZnw==","signatures":[{"sig":"MEQCIDxu+FaV0c/ErXQWoQqL9s/Bn/qu0LrqTEb5CzkJLjeDAiAjuWs5YFdSd/+HNNUXFjm9MA4eiWjyfqWJ8gli8XqlOA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1260333},"main":"./dist/floating-promo-bot.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/floating-promo-bot.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/floating-promo-bot.js","require":"./dist/floating-promo-bot.cjs"},"./style.css":"./dist/floating-promo-bot.css"},"gitHead":"cc3f1b28db8e3f6fef1298a6df3ca3d94279b83d","scripts":{"build":"vite build && vue-tsc --declaration --emitDeclarationOnly -p tsconfig.build.json","type-check":"vue-tsc --noEmit -p tsconfig.json"},"_npmUser":{"name":"chenfengwei","email":"921198340@qq.com"},"_npmVersion":"10.9.8","description":"可拖拽悬浮营销助手组件，支持气泡文案、关闭记忆与 Element Plus 弹窗确认","directories":{},"sideEffects":["**/*.css"],"_nodeVersion":"22.22.3","_hasShrinkwrap":false,"devDependencies":{"vue":"^3.5.34","vite":"^8.0.12","vue-tsc":"^3.2.8","typescript":"~5.9.3","element-plus":"^2.14.0","@vitejs/plugin-vue":"^6.0.6"},"peerDependencies":{"vue":"^3.4.0","element-plus":"^2.4.0"},"_npmOperationalInternal":{"tmp":"tmp/floating-promo-bot_0.1.0_1782453366915_0.588388552075322","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@chenfengwei/floating-promo-bot","version":"0.2.0","keywords":["vue3","vue","floating","promo","chatbot","element-plus","悬浮助手"],"_id":"@chenfengwei/floating-promo-bot@0.2.0","maintainers":[{"name":"chenfengwei","email":"921198340@qq.com"}],"dist":{"shasum":"930205855b73d629e4ce932d0598f272066cbfc3","tarball":"https://registry.npmjs.org/@chenfengwei/floating-promo-bot/-/floating-promo-bot-0.2.0.tgz","fileCount":11,"integrity":"sha512-vWLHM7dPzsmolSys+aPAelRnD0lOuE6CBRifTdoi2ttYBsGr9iWGCTpcKN5UFx0SYUB9LTJb8P9FmqDYwo2h8A==","signatures":[{"sig":"MEQCIEC0SYOBITNwvaErXhnWosVyhEltQWBeO6kmKv2N81SnAiAQyFXa6IbWAIr8PNJyExksJzlqcy2iqbOUMfDAlimnig==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1266596},"main":"./dist/floating-promo-bot.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/floating-promo-bot.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/floating-promo-bot.js","require":"./dist/floating-promo-bot.cjs"},"./style.css":"./dist/floating-promo-bot.css"},"gitHead":"cc3f1b28db8e3f6fef1298a6df3ca3d94279b83d","scripts":{"build":"vite build && vue-tsc --declaration --emitDeclarationOnly -p tsconfig.build.json","type-check":"vue-tsc --noEmit -p tsconfig.json"},"_npmUser":{"name":"chenfengwei","email":"921198340@qq.com"},"_npmVersion":"10.9.8","description":"可拖拽悬浮营销助手组件，支持气泡文案、关闭记忆与 Element Plus 弹窗确认","directories":{},"sideEffects":["**/*.css"],"_nodeVersion":"22.22.3","_hasShrinkwrap":false,"devDependencies":{"vue":"^3.5.34","vite":"^8.0.12","vue-tsc":"^3.2.8","typescript":"~5.9.3","element-plus":"^2.14.0","@vitejs/plugin-vue":"^6.0.6"},"peerDependencies":{"vue":"^3.4.0","element-plus":"^2.4.0"},"_npmOperationalInternal":{"tmp":"tmp/floating-promo-bot_0.2.0_1782453902985_0.04684321293024252","host":"s3://npm-registry-packages-npm-production"}},"0.2.2":{"name":"@chenfengwei/floating-promo-bot","version":"0.2.2","keywords":["vue3","vue","floating","promo","chatbot","element-plus","悬浮助手"],"_id":"@chenfengwei/floating-promo-bot@0.2.2","maintainers":[{"name":"chenfengwei","email":"921198340@qq.com"}],"dist":{"shasum":"4d666fcfea4c5eecebde85ae1b03ac530cfab6bb","tarball":"https://registry.npmjs.org/@chenfengwei/floating-promo-bot/-/floating-promo-bot-0.2.2.tgz","fileCount":11,"integrity":"sha512-OSyXygQZbusZ7y2zK40MPyPgxJuwdVXKjdG/RFzYvrewKWVQCrklz7tI/X9jJXtpO57iqOZlrjzcb3FMRY0lfw==","signatures":[{"sig":"MEUCIHMkahkMHEiVDJKG2Q0XymRYB7WbIoUbqiJOvNElpyGOAiEAzXy0JFDIe19gOn6ezZ9sDovwy6k9w7aS57IVe50Df84=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1260726},"main":"./dist/floating-promo-bot.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/floating-promo-bot.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/floating-promo-bot.js","require":"./dist/floating-promo-bot.cjs"},"./style.css":"./dist/floating-promo-bot.css"},"gitHead":"3b6dbebef5114a6bf0fc487f425fd6e3292c2048","scripts":{"build":"vite build && vue-tsc --declaration --emitDeclarationOnly -p tsconfig.build.json","type-check":"vue-tsc --noEmit -p tsconfig.json"},"_npmUser":{"name":"chenfengwei","email":"921198340@qq.com"},"_npmVersion":"10.9.8","description":"可拖拽悬浮营销助手组件，支持气泡文案、关闭记忆与 Element Plus 弹窗确认","directories":{},"sideEffects":["**/*.css"],"_nodeVersion":"22.22.3","_hasShrinkwrap":false,"devDependencies":{"vue":"^3.5.34","vite":"^8.0.12","vue-tsc":"^3.2.8","typescript":"~5.9.3","element-plus":"^2.14.0","@vitejs/plugin-vue":"^6.0.6"},"peerDependencies":{"vue":"^3.4.0","element-plus":"^2.4.0"},"_npmOperationalInternal":{"tmp":"tmp/floating-promo-bot_0.2.2_1782455019194_0.6645959899240965","host":"s3://npm-registry-packages-npm-production"}},"1.0.0":{"name":"@chenfengwei/floating-promo-bot","version":"1.0.0","description":"原生 JS 悬浮营销助手，无框架依赖，支持 Vue2/Vue3/任意页面","keywords":["floating","promo","vanilla","javascript","悬浮助手"],"type":"module","main":"./dist/floating-promo-bot.umd.cjs","module":"./dist/floating-promo-bot.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/floating-promo-bot.js","require":"./dist/floating-promo-bot.umd.cjs"},"./style.css":"./dist/floating-promo-bot.css"},"sideEffects":["**/*.css"],"scripts":{"build":"vite build && tsc --declaration --emitDeclarationOnly -p tsconfig.build.json","type-check":"tsc --noEmit -p tsconfig.json"},"devDependencies":{"typescript":"~5.9.3","vite":"^8.0.12"},"_id":"@chenfengwei/floating-promo-bot@1.0.0","gitHead":"3b6dbebef5114a6bf0fc487f425fd6e3292c2048","_nodeVersion":"22.22.3","_npmVersion":"10.9.8","dist":{"integrity":"sha512-ObMDg13oRtCoa7bFB6prpC8cDVhA2rg48vi1ws+qMm1o/5i0z9THM0XCcEwmidYoC9rIPp7Oqk6uUNX+0IiVyw==","shasum":"bad851c4801c4c3dcf5c112472aa6d3aa3c9b863","tarball":"https://registry.npmjs.org/@chenfengwei/floating-promo-bot/-/floating-promo-bot-1.0.0.tgz","fileCount":12,"unpackedSize":1262682,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCID/jHwSwKRhsJ9JbAjfZJ7dt9ppqva31bihYOr9L6ST5AiEA7zaIjNiIRiGAOR+ZRDT7SXrXZnK8GVOXacE9vwLwVI8="}]},"_npmUser":{"name":"chenfengwei","email":"921198340@qq.com"},"directories":{},"maintainers":[{"name":"chenfengwei","email":"921198340@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/floating-promo-bot_1.0.0_1782458266555_0.9650187195691675"},"_hasShrinkwrap":false}},"time":{"created":"2026-06-26T05:56:06.625Z","modified":"2026-06-26T07:17:46.864Z","0.1.0":"2026-06-26T05:56:07.086Z","0.2.0":"2026-06-26T06:05:03.172Z","0.2.2":"2026-06-26T06:23:39.438Z","1.0.0":"2026-06-26T07:17:46.763Z"},"keywords":["floating","promo","vanilla","javascript","悬浮助手"],"description":"原生 JS 悬浮营销助手，无框架依赖，支持 Vue2/Vue3/任意页面","maintainers":[{"name":"chenfengwei","email":"921198340@qq.com"}],"readme":"# @chenfengwei/floating-promo-bot\n\n原生 JS 悬浮助手，**不依赖 Vue / React / Element Plus**，Vue2、Vue3、jQuery、纯 HTML 均可接入。\n\nnpm：https://www.npmjs.com/package/@chenfengwei/floating-promo-bot\n\n---\n\n## 安装\n\n```bash\nnpm install @chenfengwei/floating-promo-bot\n```\n\n---\n\n## 方式一：npm 模块（Vue2 / Vue3 / Webpack / Vite 通用）\n\n```js\nimport { init } from '@chenfengwei/floating-promo-bot'\nimport '@chenfengwei/floating-promo-bot/style.css'\n\ninit({\n  token: 'xxx',                      // 自动登录 token\n  address: 'https://www.xxx.com',    // 目标站点域名\n  source: 'partner_a',               // 来源标识\n})\n```\n\nVue2 项目在 `main.js` 或 `mounted` 里调用即可，**无需注册组件**。\n\n---\n\n## 方式二：script 标签（任意 HTML 页面）\n\n```html\n<link rel=\"stylesheet\" href=\"node_modules/@chenfengwei/floating-promo-bot/dist/floating-promo-bot.css\">\n<script src=\"node_modules/@chenfengwei/floating-promo-bot/dist/floating-promo-bot.umd.cjs\"></script>\n<script>\n  FloatingPromoBot.init({\n    token: 'xxx',\n    address: 'https://www.xxx.com',\n    source: 'partner_a',\n  })\n</script>\n```\n\n---\n\n## 跳转规则\n\n用户点击气泡/机器人 → 确认后跳转：\n\n```\n{address}/autologin?token={token}&source={source}\n```\n\n文案、图标、关闭选项均为内置，**只需传上述 3 个参数**。\n\n---\n\n## 参数\n\n| 参数 | 说明 |\n|------|------|\n| `token` | 自动登录凭证 |\n| `address` | 目标域名，含 `https://` |\n| `source` | 来源标识 |\n\n---\n\n## 常见问题\n\n- **看不到图标**：是否引入 CSS；是否曾关闭 → `localStorage.removeItem('floating_promo_hidden_until')`\n- **跳转不对**：检查三个参数是否有值\n","readmeFilename":"README.md"}