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

cordova-plugin-baichuan

v2.2.1

Published

codrova/phonegap wrapper for baichuan sdk

Readme

cordova-plugin-baichuan

Cordova plugin for Baichuan SDK (阿里百川Cordova插件)

插件说明

支持平台:安卓、IOS

安卓插件版本:3.1.1.206 --2017-9-29 IOS插件版本:3.1.1.206 --2017-9-29

使用说明

淘宝授权与退出

Baichuan.auth(action, success, error);
    
/**
 * action: login/getSession/logout
 */

打开淘宝内购页面

Baichuan.showPage(pageArgs, [taokeArgs, showArgs, exArgs], success, error);

/**
 * pageArgs: {
     *      type: 'itemDetailPage/shopPage/addCartPage/myOrdersPage/myCartsPage/page',
     *      itemId: '',
     *      shopId: '',
     *      allOrder: true/false,
     *      url: '',
     *      status: 0-4,    // 所要展示订单的订单状态
     *  }
 * [taokeArgs: {
     *      pid: '',
     *      adzoneid: '',
     *      subPid: '',
     *      unionId: '',
     *      key: ''
     *  }
 * showArgs: {
     *      openType: 'Auto/H5/Native', // 打开页面的方式
     *      backUrl: '',                // 指定手淘回跳的地址
     *      nativeFailMode: 'NONE/JumpBROWER/JumpDOWNLOAD/JumpH5',  // 跳手淘/天猫失败后的处理策略
     *
     *      // Android
     *      clientType: '',
     *      pageClose: true/false,
     *      proxyWebview: true/false,
     *      showTitleBar: true/false,
     *      title: '',
     *
     *      // IOS
     *      linkKey: '',    // applink使用,优先拉起的linkKey,手淘:@"taobao_scheme"
     *  }
 * exArgs: {
     *      自定义
     *  }]
 */

全局默认设置

Baichuan.setting(settings, success, error);

/**
 * settings: {
     *      forceH5: true/false,
     *      syncForTaoke: true/false,
     *      taokeParams: 同上,
     *      channel: ['', ''],
     *      ISVCode: '',
     *      ISVVersion: '',
     *  }
 */

安装前准备工作(必读)

  1. 注册您的百川账号

  2. 创建 百川无线应用

  3. 完善你的应用 基本信息

  4. 申请开通 初级电商能力

  5. 生成安全图片,放置正确位置

安装

cordova plugin add cordova-plugin-baichuan --variable APPKEY=<自己的Appkey>

cordova plugin add https://github.com/wenin819/cordova-plugin-baichuan.git --variable APPKEY==<自己的Appkey>

注意事项

Android

  1. 根据实际情况,AndroidManifest.xml可能需要变动,如application需要加tools:replace="android:label,android:allowBackup";
  2. 不能直接Debug运行,这样会异常闪退,直接运行是没有这个问题。

IOS

  1. 可能需要手工加Other Linker Flags,对应的配置项为:-lstdc++ -ObjC

参考链接

  1. 更多百川信息
  2. 接入准备工作,安全图片生成
  3. 百川电商 Android SDK3.1接入文档
  4. 百川电商 IOS SDK3.1接入文档