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

gxd-upsdk

v1.0.1

Published

云闪付,开发者在小程序里可静默获取云闪付用户的OPENID,作为小程序的用户标识,快速完成小程序的会员体系,实现用户登录。

Downloads

9

Readme

gxd-upsdk

云闪付会员能力

开发者在小程序里可静默获取云闪付用户的OPENID,作为小程序的用户标识,快速完成小程序的会员体系,实现用户登录。
云闪付APP小程序用户信息授权通过标准OAUTH2.0机制实现,获取小程序登录用户的OPENID快速建立或关联小程序用户体系,实现小程序业务。

查考网站:https://qxwouffjun.feishu.cn/docs/doccnF5wnmRHEWmMsxJu4MCoCth#

安装

npm install --save gxd-upsdk --registry=https://registry.npm.taobao.org
使用流程
使用
# 引入插件

import VueCupUi from 'vue-cup-ui';
import 'vue-cup-ui/lib/vue-cup-ui.css';
Vue.use(VueCupUi);

# defautlSetting配置 需要提供删除用户登录状态功能是,需要自行配置相关键值

{
    ...
    #用户登录storage存储key
    userInfoSaveStoreKey: 'admin_user_info', 
    #用户登录Cookie存储key
    userInfoSaveCookieKey: 'jufubao-access-token',
    ...
}

常用方法

#helper 工具类 (v1.12.14)
 - checkVarType(obj:Any) //判断变量类型 返回字符串(boolean|number|string|function|array|date|regExp|undefined|null|object)
 - cloneDeep(json:Object) //简单深拷贝
 - random(min:Number, max:Number) //随机数字值
 - romdomArray(arr:Arrar = []) //随机数组的值
 - getTime(lastDay:Number = 30) //获取最近某时间断内的时间
 - inArray(sourceArray:Array = [], findArray:Array = []) 检测查找数组是否在原数组中,返回boolean
 - repeatArray(sourceArray:Array = [], findArray:Array = []) 数组去重复
 - unionArray(sourceArray:Array = [], findArray:Array = []) 数组并集
 - intersectionArray(sourceArray:Array = [], findArray:Array = []) 数组交集
 - differenceArray(sourceArray:Array = [], findArray:Array = []) 数组差集
 - isEmpty(obj:Array|Object) 检查对象或者数组是否为空,返回boolean
 - idToSelectData(data:Array|Object, name:String = 'name', id:String = 'id', force:Boolean = true) 转化为vue element UI选择插件数据格式({value: 'value' ,label: 'label'})
 - isKeyInLists(list:Array|Object, value:Any, keyName:String='id') 检查值是否在数组中或者对象中并返回结果
 - getListKeyForValue(list:Array|Object, keyName:String = 'id') 获取数组或者对象中的某个key的value值
 - deleteParamEmptyKey(source:Object, ignoreKey:Array = []) 删除参数中[all|''|null|undefined] ignoreKey被忽略的Key
 - paramsBase64Decode(base64Str:String) //把Base64转化为对象
 - paramsBase64Encode(row:Object) //把对象转化为可传输的Url Base64安全格式
 - jsonToParams(params:String) //把对象解析成请求参数格式
 - cutStringLen(val:String, len:Number = 10) //截断字符串长短(汉字2个字符串,英文1个)
 - parseURL(url:String?) //解析链接地址 或者 获取当前url地址
 - getParmater(key:String)  //获取Url参数
 - addFloatNumber(currentNum:Number, targetNum:Number) //浮点型加法
 - cutFloatNumber(currentNum:Number, targetNum:Number) //浮点型减法
 - multiplyFloatNumber(currentNum:Number, targetNum:Number) //浮点型乘法
 - divisionFloatNumber(currentNum:Number, targetNum:Number) //浮点型除法
 - tirmL(str:String, replaceStr:String?) //去掉左边指定字符
 - tirmR(str:String, replaceStr:String?) //去掉右边指定字符串
 - tirm(str:String, replaceStr:String?) //去掉两部指定字符串
 - searchHigh(str:String, keyword:String|Array, options:Object? = {}) //搜索到匹配关键字高亮处理

#cookie (v1.12.14)
 - get(key:String, options:Object) //获取cookie
 - remove(key:String, options:Object) //删除指定键值所对应的cookie值
 - set(key:String, value:String, options:Object={domain,path,expires}) //添加指定名称cookie值 , 过期时间小时制

#Pinyin 汉语转拼音 (v1.12.14)
 - getfullName(str:String) //获取全部拼音
 - getFirstLetter(str:String) //获取汉字的拼音首字母 汉英混排的时候汉语与英语之间使用"空格"隔开

#storage 本地缓存(sessionStore,localStore) (v1.12.14)
1. storage.sessionStore
 - set(key:String, value:Any) //设置LocalStorage值
 - get(key:String) //获取LocalStorage值
 - remove(key:String) //删除LocalStorage值

2. storage.localStore
 - set(key:String, value:Any, expire:Number) //设置LocalStorage值
 - get(key:String) //获取LocalStorage值
 - remove(key:String) //删除LocalStorage值

版本日志

#helper 工具类 (v1.1.15)
 - loadFile(arr:Array|String, type:String = 'js|css') //加载js和css文件

#helper 工具类 (v1.1.16)
 - filterHtml(html:String, allowed:String) 过滤所有标签并希望保留'<a><p>'标签 , 使用如下:filterHtml(html, '<a><p>');

#xd-helper (v2.0.1)
 - 备注:修改插件加载方式