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-wechat-ts

v1.0.23

Published

react native lib for wechat app

Downloads

11

Readme

react-native-wechat-ts (Android)

react native lib for wechat-pay wechat-oauth

react-native 微信支付-微信登录 lib

Intro

这个修改自react-native-wechat, 但已经完全重构了,依旧感谢前人的付出

更新了微信的 Android 版 SDK 为最新版

只支持安卓

implementation 'com.tencent.mm.opensdk:wechat-sdk-android-without-mta:+' 注意引入方式为最新版的意思

TODO

实现文字,图片分享

Installation

pnpm add react-native-wechat-ts

npm install react-native-wechat-ts

yarn add react-native-wechat-ts

Usage

import WechatTs from "react-native-wechat-ts";

//初始化SDK
WechatTs.registerApp('appid');

/* 检查手机是否安装微信 */
WechatTs.isWxAppInstalled(): boolean

/* 检查当前SDK版本 */
WechatTs.getApiVersion(): number

/* 打开微信app */
WechatTs.openWXApp(): boolean

WechatTs.pay({
  partnerId: string,
  prepayId: string,
  nonceStr: string,
  timeStamp: string,
  sign: string,
  packageValue: 'Sign=WXPay' // 固定值
}): object

/**
 * 微信授权登录
 * @deprecated
 * 由于SDK限制原因,接受不到回调,暂不可用
 **/
WechatTs.sendAuthRequest(): string

Notice

注意,微信 SDK 有几个大坑:

  1. 在 Android 11 的机子使用时需要修改android/src/AndroidManifest.xml,参考Android 11-第三方应用无法拉起微信适配
  2. 修改android/app/build.gradle配置,注意 debug 和 release 都换成真实环境下的,防止应用签名不对的问题
signingConfigs {
  debug {
    storeFile file('YOUR_UPLOAD_STORE_FILE')
    storePassword 'YOUR_STORE_PASSWORD'
    keyAlias 'YOUR_KEY_ALIAS'
    keyPassword 'YOUR_KEY_PASSWORD'
  }
  release {
    storeFile file('YOUR_UPLOAD_STORE_FILE')
    storePassword 'YOUR_STORE_PASSWORD'
    keyAlias 'YOUR_KEY_ALIAS'
    keyPassword 'YOUR_KEY_PASSWORD'
  }
}

License

MIT