npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

daishu-customer-service-entry

v1.3.0

Published

# 开发

Downloads

7

Readme

源码在 src/index.js

开发

在 src/index.js 下面开发,最后再 npm run build 打包

引入方式

npm i --save daishu-customer-service-entry import daishuCustomerService from 'daishu-customer-service-entry' 最新版本自己查看 package.json 文件

使用方式

// xxx 是唯一实例 建议把 xxx 挂在到 vue.prototype 上,方便使用 let xxx = new daishuCustomerService({ // 初始化时需传入 click 监听函数 onTap: function() { // 这里是监听 click 事件 } })

接入所需参数 设置参数主要是初始化传入和使用 setOptions 方法去设置,建议去看源码

{ app: "customerservice" // 必填 目前写死 type: "pc" //判断是跳到 pc 端还是 h5 端 app_id: "" //必填 项目唯一 id web_type: "" // pc 就跳 pc 端,popup 就是以弹窗模式打开,否则就是移动端 popup: {}, // 是否已弹窗的形式打开 locales: '简体', // zh 简体 zh_TW 繁体 en 英文 page: { // 选填 页面信息 name: "" //页面名称 url: "" // 页面完成 url sku_id: "" // 商品或套餐 id supplier_id: "" //供应商或医院 id extende: { // 页面定制化信息 一般是套餐信息 sku_name: "" // 套餐名称 supplier_name: "" // 供应商名称(医院或其他) }, }, user:{ // 必填 用户信息 user_name: '', // 必填 用户名称 user_id: '', // 必填 用户 id avatar_url: '', // 有就填 用户头像 mobile_phone: '' // 有就填 用户手机 }, style: { // 选填,覆盖默认样式 text: '' //文本 icon: '' // 图片 color: '' 背景色 } }

apis

xxx.reStar() // 重新初始化 xxx.setHtml() // 自己传入 html 字符串,改变入口样式 xxx.link // 跳转到客服聊天页 xxx.setOptions // 设置客服所需参数 xxx.hide // 隐藏入口 xxx.show // 展示入口 默认是展示