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

qms-rollup

v2.0.8

Published

qms-js

Downloads

6

Readme

内网限制-npm

2.0.0版本不支持旧版__UNI__01E620B小程序

原npm

npm config set registry https://registry.npmjs.org

国内镜像

npm config set registry https://registry.npm.taobao.org

安装依赖

npm install

编译代码

npm run build

业务场景使用说明

引入依赖包
npm install qms-test-rollup

import { BGYDataManagerPlugin } from 'qms-test-rollup'

<!-- 示例 -->
BGYDataManagerPlugin.executeSQL(selectsql).then(res1 => {
  // 业务逻辑
})

aboutWkapi

let customParam = {
  clickTime: new Date().getTime(),
  endTime: '',
  catalogLevel: '一级分类',
  tabName: '首页',
  generalName: '区域首页',
  ru: '首页_区域首页_管理体检_安全质量风险',
  isJump: 1
}
// 接口调用后
customParam.endTime = new Date().getTime();
this.$aboutWkapi.personalInit(customParam);

basedata

BGYDataManagerPlugin

// 操作原生数据库
BGYDataManagerPlugin.executeSQL("select * from xxx") 

//重新触发离线队列
BGYDataManagerPlugin.reStartOfflineQueue() 

//图片预览(原生已下载的图片显示)
let params = {pathList:["/storage/..."],position:index}
BGYDataManagerPlugin.previewImage(params)

// 拍照
let params = {
	type(必传)(1.普通拍照。2.快慢拍。3。连拍(问题管理)。)
	sourceType(camera:type为1的拍照,album:type为1的相册,normal:type为2的普通拍照,snapshot:type为2的快排。为空不直接跳转)
	count(支持最大图片数,默认9)
	isWater(是否需要水印)
	projectName(项目名称)
}
BGYDataManagerPlugin.jumpToAlbum(params);  //[{ base64 压缩图的图片, realPath 原生图片存储路径 }]
// 失败 null

let params = {
	type(必传)(4.连拍(问题清单))
	sourceType(camera:type为1的拍照,album:type为1的相册,normal:type为2的普通拍照,snapshot:type为2的快排。为空不直接跳转)
	count(支持最大图片数,默认9)
	isWater(是否需要水印)
	projectName(项目名称)
	isAddQuestion(是否问题图片,1或2)
	pathList(回显图片)
}
BGYDataManagerPlugin.jumpToAlbum(params,cb);  //{isEdit:0(保存)/1(编辑问题), pic:[{base64,realPath}]}
// 关闭和系统返回回参 {isEdit: -1,	pic:[{base64,realPath}] //有图片则回传图片,没图片则为[]}

// 上传图片 Array
BGYDataManagerPlugin.upload(files,cb)
// 回参
[{
	fileId: "37D1C45227754B25875386FFD6344BF4"
	fileName: "chucuola.jpg"
	saveType: "1"
	filePath: 服务端存储地址
	fileSize: 13571
	fileContentType: "image/jpg"
	localPath: 本地图片地址
}]
上传错误对象
[{
	localPath 本地图片路径
	errorReason 错误信息
}]

// 
BGYDataManagerPlugin.delete(file)

// 下载图片 Array
BGYDataManagerPlugin.download(file,cb)

// 小程序跳转小程序
BGYDataManagerPlugin.openNewProgram(params) // {id(跳转到的appid),url(跳转到的路径,如pages/demo/demo?test=true)}

domain

globalData

// 存储已选项目到storage
globalData.setSelectProject(data)

// 读取已选项目
globalData.getSelectProject()

nativeApp

nativeApp.getAppUserInfo() // 获取app的登录信息-[promise的方式]
nativeApp.loginOut() // [native Event]退出登录
nativeApp.setLoginInfoCache() // 缓存app的登录信息
nativeApp.clearLoginInfoCache() // 清空app的登录缓存信息
nativeApp.clearBusinessCache() // 清空业务缓存

user

user.getUserInfo()
const data = {
  "sessionId": res.sessionId,
  "access_token": res.access_token,
  "userId": res.userId,
  "tag": 'login',
  "userType": "bip"
}
user.setUserInfo(data) 

user.getUserObject()
// data: queryMyUserInfo接口返回数据
user.setUserObject(data)

user.getUserId() // 用户BIP
user.getSessionId() // SessionId
user.getAccessToken() // globalTokenId

// 用户
user.getUserRoleInfo() // return {orgLeve:min,roleType:max,roleId:roleobj[max]} orgLeve:最大的组织级别 roleType:最大级别预警审批角色 roleId:最大级别预警审批角色的roleId

VThread

// 初始化
let thread=new BatchThread(callback)
// 按顺序add函数
thread.add((loop)=>{})
// 开始
thread.start()

weblog

weblog.info(arg0,arg1,arg2,arg3,arg4,arg5)
weblog.debug(arg0,arg1,arg2,arg3,arg4,arg5)
weblog.error(arg0,arg1,arg2,arg3,arg4,arg5)
let config = {
  pageSize:20000,
  callback(rows){}
}
weblog.list(config)