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 🙏

© 2026 – Pkg Stats / Ryan Hefner

h5-app-common

v0.0.1

Published

h5-app common

Readme

公共组件

tools 工具组件

  • ly-tools
  1. ly-requrest 常用的请求封装、token设置等。
  2. ly-common 常用的API封装,节点获取,距离计算等。
  3. ly-regexp 常用的正则表达式判断、金额、汉字等。
  4. ly-router 以Vue.router为模板封装的路由跳转与传参。
  5. ly-API 在网上收集到的API,仅供测试用。
  6. ly-cache 缓存器,优化减少HTTP请求。
  7. ly-native 基于HTML5+ API封装的原生功能
  • loading 等待框
  • zhouWei-APPUpdate 版本更新界面
  • popup 弹窗

module 视图组件

  • app 移动端组件
  • pc web端组件
  • comm 公共组件
  1. httpUtil http请求入口类:
    	//数据请求
    	httpReq.postReq({
    		strUrl: '/nmip/bjgoodwill/queryVersionByKey_versionApp.action',
    		param: {
    			'1': '234'
    		},
    		successBack: r => {
    			console.log('success:', r)
       	
    		},
    		failureBack: r => {
    			console.log('failure:', r)
    		}
    	})
    	//上传图片
    	httpReq.postReqUpload({
    		strUrl: '/nmip/bjgoodwill/queryVersionByKey_versionApp.action',
    		formData: {
    			'1': '234'
    		},
    		successBack: r => {
    			console.log('success:', r)
       	
    		},
    		failureBack: r => {
    			console.log('failure:', r)
    		}
    	})
    参数
    • load: true, //是否显示等待窗
    • strUrl: '', //请求地址(不包括基础地址)
    • param: {}, //请求参数
    • formData:{},//图片上传时的表单数据
    • sourceType:["album", "camera"],//album从相册选图,camera使用相机,默认二者都有
    • successBack: req => {}, //成功回调
    • failureBack: req => {} //失败回调
  2. dialog 弹窗
    	store.commit("setDialogShow", {
    		isShow: true,
    		title: '错误',
    		content: "网络错误",
    		confirmText: '关闭',
    		type: 'error',
    		isShowCancel: false,
    		confirm: r => {
    			failureBack(data.result)
    		}
    	});
    参数
    • isShow: false, //是否显示弹窗
    • title: '提示', //弹窗标题
    • content: '具体内容', //具体显示内容
    • confirm: r => {}, //确认按钮点击回调
    • cancel: r => {}, //取消按钮点击回调
    • confirmText: '确认', //确认按钮文字
    • cancelText: '取消', //取消按钮文字
    • isShowCancel: true, //是否显示取消按钮
    • type:'success',//对话框主题 success/warning/info/error 默认 success
    • mode:'base',//对话框模式 base/input
    • value:'',//input录入模式时默认值
    • placeholder:'请输入'//input录入模式时默认文字
  3. dialog 仿toast
    	store.commit("setToastShow", {
    		isShow: true,
    		type: 'error',
    		duration:20000,
    		content: data.result
    	});
    参数
    • isShow: false, //是否显示提示信息
    • content: '具体内容', //具体显示内容
    • type:'success',//对话框主题 success/warning/info/error 默认 success
    • duration:2000//弹窗展示时间