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

react-native-alibaichuan-nevo

v1.0.3

Published

React Native的阿里百川sdk, 包含淘宝授权登录等

Downloads

11

Readme

集成最新百川SDK 206,支持高佣申请

使用的相关事例在:DemoAlibaichuan.js

react-native-alibaichuan

此项目基于react-native-alibc-sdk

方便在RN应用中集成阿里百川SDK的各种功能。正在积极开发和完善, 如果觉得有用请给个Star。

功能

  1. 淘宝登录授权
  2. 淘客参数设置
  3. 通过手淘App和H5方式打开宝贝页面、购物车页面、订单页面,添加购物车页面和Url链接, 并获取交易回调信息,实现交易闭环。
  4. 通过在react-native内嵌入WebView方式打开宝贝页面、购物车页面、订单页面,添加购物车页面和Url链接, 并获取交易回调信息,实现App内交易闭环。

login show webview

DIY (适用于在现有RN工程基础上添加百川)

  1. 进入阿里百川开发者控制台 -> 创建应用 -> 在我的产品后台开通百川电商SDK -> 在API申请开通初级电商能力和无线开放百川淘宝客。
  2. npm i https://github.com/bashen1/react-native-alibaichuan.git --save
  3. react-native link react-native-alibaichuan

iOS (参考 http://baichuan.taobao.com/docs/doc.htm?spm=a3c0d.7629140.0.0.VWjqPl&treeId=129&articleId=105648&docType=1 以及Demo工程配置)

  1. 配置URL Types为tbopen{AppKey}, 比如tbopen123456。
  2. 在info.plist中,增加LSApplicationQueriesSchemes字段,并添加tbopen,tmall。
  3. 配置ATS, 允许HTTP请求。
  4. 上传BundleID, 获取安全图片放到工程目录底下, 并将安全图片加入工程(Build phases -> Copy Bundle Resources)。
  5. 将node_modules/react-native-alibc-sdk/ios/AlibcTradeSDK/Frameworks和Reaources全部加入工程。参考Demo的工程配置, 添加其它依赖库。
  6. 参考Demo的工程配置, 配置Framework Search Paths和Header Search Paths。
  7. Other Linker flags中添加-lc++和-lstdc++。
  8. 关闭bitcode(build settings -> build options)
  9. 参考DEMO添加下面代码到AppDelegate.m, 让sdk处理应用跳转结果。
    #import <AlibcTradeSDK/AlibcTradeSDK.h>
    ...
    - (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation{
    	// 如果百川处理过会返回YES
    	if ([[AlibcTradeSDK sharedInstance] application:application
    							openURL: url
    							sourceApplication: sourceApplication
    							annotation: annotation]) {
    		// 处理其他app跳转到自己的app
    		return YES;
    	}
    	return NO;
    }
    
    
    //IOS9.0 系统新的处理openURL 的API
    - (BOOL)application:(UIApplication *)application openURL:(NSURL *)url options:(NSDictionary<NSString *,id> *)options {
    	//处理其他app跳转到自己的app,如果百川处理过会返回YES
    if ([[AlibcTradeSDK sharedInstance] application:application
    										openURL: url
    										options: options]) {
    		return YES;
    	}
    	return NO;
    }
    ...

Android (参考 http://baichuan.taobao.com/docs/doc.htm?spm=a3c0d.7629140.0.0.Qn05oE&treeId=129&articleId=105647&docType=1 以及Demo工程配置)

  1. 上传用于调试的app-debug.apk(发布时再上传签名的apk), 获取安全图片放在(res/drawable/yw_1222.jpg)。
  2. AndroidManifest.xml:
    <manifest ...
    	xmlns:tools="http://schemas.android.com/tools"
    		...
    	<application
    		...
    	android:allowBackup="true"
    	tools:replace="android:allowBackup">
    	...
    </manifest>
  3. build.gradle:
    ...
    allprojects {
    	repositories {
    		...
    		maven {
    			url "http://repo.baichuan-android.taobao.com/content/groups/BaichuanRepositories/"
    		}
    		...
    	}
    }
    ...

API文档(TODO)

参考Demo。

请我吃辣条

请我吃辣条