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

weihu-flow-sdk

v1.0.16

Published

IVR流程编辑器 ### 获取sdk ``` npm install weihu-flow-sdk ``` ### 引入 ```js import flowSdk from 'weihu-flow-sdk' ``` 或者 ```html <script src="./flowSdk/flowSdk.umd.min.js"></script> ``` ### 快速使用 ```js import flowSdk from 'weihu-flow-sdk'

Downloads

14

Readme

weihu-flow-sdk

IVR流程编辑器

获取sdk

npm install weihu-flow-sdk

引入

import flowSdk from 'weihu-flow-sdk'

或者

<script src="./flowSdk/flowSdk.umd.min.js"></script>

快速使用

import flowSdk from 'weihu-flow-sdk'

flowSDK.init({
      el: 'flowsdk',         // 挂载的元素的id,必传
      baseUrl: '', // 服务的baseUrl,默认是'https://cc.v-call.cn'
      authType: 'login',    // 获取token的方式,必传
      username: '',  // 用户名,authType为login时必传
      password: '', // 密码,authType为login时必传
      accessKeyId: '', // authType为token时必传
      accessKeySecret: '', // authType为token时必传,
      id: '', // ivr模版id
      state: '', // 流程状态 '':新增;'edit':编辑;'detail':查看
      closeBtn: false, // 是否需要返回按钮,默认true
      onClose: () => {}, // 返回按钮点击事件
      onSave: id => {} // 最终保存成功的回调函数,返回ivr的id
 })

配置项

flowSDK.init(options)中的配置项

el

必传挂载元素的id

baseUrl

接口服务的baseUrl,默认'https://cc.v-call.cn'

authType

必传获取token的方式:login:登录获取;token:accesskey获取;default:已经有token,无需获取

default

authType为default时,需先调用'login'服务,并设置localStorage.flowToken

username

用户名,authType为login时必传

password

密码,authType为login时必传

accessKeyId

authType为token时必传

accessKeySecret

authType为token时必传

id

模版id,编辑、查看时必传

state

必传模版状态,新增:''; 编辑:edit;查看:detail

closeBtn

是否需要返回按钮,默认true

onClose

function返回按钮点击事件函数

onSave

function最终保存成功的回调函数,返回创建的ivr模版id

可能出现的问题

1、babel-loader未编译node_modules 中的文件

如果使用中报如下错误:

vue-router.esm.js?8c4f:2314 Error: Module parse failed: Unexpected token (1:27676)

原因是js中存在es6语法,默认情况下 babel-loader 会忽略所有 node_modules 中的文件

解决方法

以vue项目为例,在vue.config.js中配置

 transpileDependencies: ['element-ui', 'weihu-flow-sdk']

2、找不到font文件

Error
GET http://localhost:3000/static/js/fonts/element-icons.ff18efd1.woff 404 (Not Found)
GET http://localhost:3000/static/js/fonts/element-icons.f1a45d74.ttf net::ERR_ABORTED 404 (Not Found)
解决方法

将weihu-flow-sdk中的font文件夹放到public/static/js下即可