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

ghk_model

v0.1.4

Published

## 表单中企业名称检索插件

Downloads

3

Readme

中创干货库插件

表单中企业名称检索插件

  • 1:引入插件通过 wx:if 控制插件的显示隐藏
  • 2:内置属性 width 控制插件的长度 默认为 100% 传入的值为字符串(例:width=”100rpx“)
  • 3:内置属性 my-property 需要传入的值为后端返回的数据列表 数组形式 (例: my-property="{{comNameList}}" )
  • 4:点击事件绑定 bindmyevent 返回对应的企业名称 对象格形式 (例: bindmyevent="onSelectEvent" )

干货库小程序裂变组件

  • contentState - String —— 活动是否被撤回(0/1)
  • isAcquire - Booler —— 是否领取过奖品
  • isLogin - Booler —— 是否显示裂变侧边栏标签(是否登录)
  • isLeft - Booler —— 是否显示裂变侧边栏标签 (当前是否在活动进行中)
  • showPagebg ———— String(0/1) ———— 显示正常参与活动弹窗
  • popupType ———— Strinng(1-8)————字符串1到10 分别对应 参与/助力/助力成功/活动未结束但奖品已发完/活动结束/重复助力/助力人数超出/参与成功-领奖/活动已结束(助力者角色)/奖品已发完(助力者角色)
  • fissionInfo ———— Object{} ———— 裂变详情信息
  • participant —— Object{} ———— 参加裂变人信息
  • passivityName ——String ———— 被助力人的昵称
  • prefixUrl —— String —— 头像的前缀地址
  • passivityPhoto —— String ———— 被助力人头像
  • assistants —— Array(obj)———— 助力人信息列表
  // 示例:需要两人助力,目前只有一个人助力成功, 格式如下
  assistants = [
    {
      assistantCode: "byaw2z8qz29q8h"
      assistantPhoto: "/test-201210AG06ATY8ZC/5c35a26052384fc58635b4023bd78947/photo/defaultPhoto4.png"
      assistantUserName: null
      fissionId: 85
      gmtCreate: "2023-03-15 10:09:16"
      id: 15
      participantCode: "btadujsvvrqp5z"
      participantUserName: "测试昵称dev"
      remark: null
    },
    {
      ShowPeople:"none"
    }
  ]


/**
 * 格式化裂变助力人数
 * @num {*} 助力总数
 * @arr {*} 助力人列表 
 */
export function resetHelp(num,arr) {
  let newarr = []
  for (let i = 0; i < num; i++) {
    if (arr[i]) {
      newarr.push(arr[i])
    } else {
      newarr.push({ShowPeople:"none"})
    }
  }
  return newarr
}
  • fissionTime -- 裂变开始与结束时间(活动时间展示) 2023/03/15 17:22 - 2023/03/25 00:00
/**
 * 格式化裂变开始结束时间
 * @t1 {*} 开始时间
 * @t2 {*} 结束时间
 */
  export function processingTime(t1,t2){
  let tm1 = new Date(t1)
  let tm2 = new Date(t2)

  let obj1 = {
    year:tm1.getFullYear(),
    month:tm1.getMonth()+1<10?'0'+(tm1.getMonth()+1):tm1.getMonth()+1,
    day:tm1.getDate()<10? '0' + tm1.getDate():tm1.getDate(),
    hours:tm1.getHours()<10? '0' + tm1.getHours():tm1.getHours(),
    minutes:tm1.getMinutes()<10? '0' + tm1.getMinutes():tm1.getMinutes(),
}
let obj2 = {
    year:tm2.getFullYear(),
    month:tm2.getMonth()+1<10?'0'+(tm2.getMonth()+1):tm2.getMonth()+1,
    day:tm2.getDate()<10? '0' + tm2.getDate():tm2.getDate(),
    hours:tm2.getHours()<10? '0' + tm2.getHours():tm2.getHours(),
    minutes:tm2.getMinutes()<10? '0' + tm2.getMinutes():tm2.getMinutes(),
}


 let NewTime = obj1.year+'/'+obj1.month+'/'+obj1.day+' '+obj1.hours+':'+obj1.minutes+' - '+obj2.year+'/'+obj2.month+'/'+obj2.day+' '+obj2.hours+':'+obj2.minutes
  return NewTime

}
  • prizeVOs——Object{}———— 裂变奖品信息
  • invitedPeopleNum————Int———— 在邀请 1 位好友就可以获得奖品
  • bindmyopen————function(默认e)————绑定悬浮窗点击事件用于跳转或打开分享弹窗
  • bindmyHelp————function(默认e)————点击为TA助力
  • bindmyJoin————function(默认e)————助力成功点击我也要加入
  • bindmyEmpty————function(默认e)————活动未结束但奖品已发完
  • bindmyEnd————function(默认e)————活动已结束
  • bindrepetition————function(默认e)————重复助力/助力人数超出(我也要参与)
  • bindmyAccept————function(默认e)————立即领取奖品
  • bindmyReload————function(默认e)————活动撤回(点击重新加载)
  • bindmyClose————function(默认e)————关闭助力弹窗,e.detail携带一个对象 {type: "close", for: "helpTa"} 区分事件来源 关闭裂变活动弹窗