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

@bbtfe/moretools

v0.0.1

Published

通用用户组件MoreTools

Downloads

3

Readme

通用更多工具组件, 一般在app外部使用

注意点

  1. 已经做了在孕育app中不显示下载bar

  2. 如果页面中没有引入deeplink,tracking和w2a的相关js的话,会自动引入

引用方式

文件被输出为umd格式,可以使用下面方式引用。

目前所有引用方式,都需要引入这个样式文件

<link href="//static02.babytreeImg.com/img/bca/moreTools/0.0.2/dist.min.css" rel="stylesheet" />

npm引用

npm i @bbtfe/moretools
import MoreTools from '@bbtfe/moretools';

script引用

支持HTTPS和HTTP,建议在通常页面中使用下面去掉协议头的形式引用即可。

<link href="//static02.babytreeImg.com/img/bca/moreTools/0.0.2/dist.min.css" rel="stylesheet" />
<script src="//static02.babytree.com/img/bca/moreTools/0.0.2/dist.min.js"></script>

1. 显示下载条

MoreTools.init([object Object]);

MoreTools.init方法的各参数的默认值为:

const options = {
    toolType: 1, // 请求用户工具接口用到的参数 1: 能不能嘱 2: 能不能做
    toolsExposureData: {
        pt: 'share_gj_nbnz_xq',
        bpi: '39653',
        ii: '01',
        an: '1',
    },  
    articleExposureData: {
        pt: 'share_gj_nbnz_xq',
        bpi: '39652',
        ii: '02',
        an: '1',
    },
    toolsTrackData: [{
        pt: 'share_gj_nbnz_xq',
        bpi: '39645',
        ii: '01',
        be: 'click_url=',
    }, {
        pt: 'share_gj_nbnz_xq',
        bpi: '39646',
        ii: '02',
        be: 'click_url=',
    }, {
        pt: 'share_gj_nbnz_xq',
        bpi: '39647',
        ii: '03',
        be: 'click_url=',
    }, {
        pt: 'share_gj_nbnz_xq',
        bpi: '39648',
        ii: '04',
        be: 'click_url=',
    }, {
        pt: 'share_gj_nbnz_xq',
        bpi: '39649',
        ii: '05',
        be: 'click_url=',
    }], 

    articleTrackData: [{
        pt: 'share_gj_nbnz_xq',
        ii: '06',
        bpi: '39650',
        be: 'click_url=',
    }, {
        pt: 'share_gj_nbnz_xq',
        ii: '07',
        bpi: '39651',
        be: 'click_url=',
    }],

    dpParams: {
          autoDp: false,
          schemeUrl: 'bbtrp://com.babytree.pregnancy/home/homepage',
          download: {
               android: 'http://r.babytree.com/8iSVC2b',
               ios: 'http://r.babytree.com/8iSVC2b',
          },
          coverImage: {
               canClose: true,
               ios: '//static02.babytreeimg.com/img/preg-fe/caneat/common/ios-cover.png',
               android: '//static02.babytreeimg.com/img/preg-fe/caneat/common/android-cover.png',
          },
          yybUrl: 'http://a.app.qq.com/o/simple.jsp?pkgname=com.babytree.apps.pregnancy&ckey=CK1351100144579',
    },
    dpSDKV: '1.1.7',
    trackSDKV: '0.2.1',
}

2. MoreTools.init方法各参数含义:

  1. toolType: 请求用户工具接口用到的参数 1: 能不能嘱 2: 能不能做

  2. dpSDKV: deeplink sdk的版本号, 默认为: '1.1.7',

  3. trackSDKV: tracking埋点sdk的版本号,默认为: '0.2.1',

  4. toolsExposureData: 用户工具曝光埋点,非必填

  5. toolsTrackData: 用户推荐文章曝光埋点,非必填

  6. articleExposureData: 用户工具点击埋点,如果有值,顺序及个数要一一对应

  7. articleTrackData: 用户推荐文章点击埋点,如果有值,顺序及个数要一一对应

  8. dpParams: dp时所需要的一些参数,object

    1.schemeUrl: 需要dp起来的app的路由,默认: 'bbtrp://com.babytree.pregnancy/home/homepage', 2.download:ios和android下载的链接,默认: 3.coverImage:在ios和安卓中弹出的遮罩和是否可以关掉该遮罩, 4.yybUrl:应用宝下载链接, 默认为:'http://a.app.qq.com/o/simple.jsp?pkgname=com.babytree.apps.pregnancy&ckey=CK1351100144579',