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

weex-wechat

v0.2.1

Published

Wechat(auth, pay, share) module for weex.

Readme

weex-wechat 中文版

Wechat(auth, pay, share) plugin for weex.

getting start

weexpack plugin install weex-wechat

Usage

var wechat = weex.requireModule('wechat');
var stream = weex.requireModule('stream');

wechat.registerApp("appid", function(data) {
  console.log(data, "wx register")
})

wechat.login({}, function(data) {
  console.log(data)
})

// share text to timeline (share to session use shareToSession)
wechat.shareToTimeLine({
  type: "text",
  content: "text content"
}, function(data) {
  console.log("text shared", data)
})

// share image to timeline 
wechat.shareToTimeLine({
  type: "image",
  image: imageUrl
}, function(data) {
  console.log("image shared", data)
})

// share video to timeline
wechat.shareToTimeLine({
  type: "video",
  title: 'video title',
  content: "video content",
  image: imageUrl,
  url: 'https://v.qq.com/x/cover/m4cz4v1n0av4a8k/x00223sb1nm.html?new=1'
}, function(data) {
  console.log("video shared", data)
})

// share webpage to timeline
wechat.shareToTimeLine({
  type: "webpage",
  title: 'vebpage title',
  content: "webpage content",
  image: imageUrl,
  url: 'http://github.com/doabit'
}, function(data) {
  console.log("web page shared", data)
})

// wxpay
stream.fetch({
  method: 'POST',
  url: 'http://192.168.1.102:3000/wx_app_pay', //change to your wepay api
  type: "json"
}, function(resData){
  if (resData.ok) {
    var data = resData.data;
    wechat.pay({
        appid: data.appid,
        sign: data.sign,
        timestamp: data.timestamp,
        noncestr: data.noncestr,
        partnerid: data.partnerid,
        prepayid: data.prepayid,
        packageValue:data.package
    }, function(resData){
        console.log(resData)
    })
  } else {
    console.log(resData)
  }
})

setup for android

add jitpack.io to android/build.gradle

allprojects {
    repositories {
        mavenCentral()
        jcenter()
        maven { url 'https://jitpack.io' }
    }
}

Integrating with login and share

If you are going to integrate login or share functions, you need to create a package named 'wxapi' in your application package and a class named WXEntryActivity

Then add the following node to AndroidManifest.xml:

<manifest>
  <application>
    <activity
      android:name=".wxapi.WXEntryActivity"
      android:label="@string/app_name"
      android:exported="true"
    />
  </application>
</manifest>

Integrating the WeChat Payment

If you are going to integrate payment functionality by using this library, then create a package named also wxapi in your application package and a class named WXPayEntryActivity

Then add the following node to AndroidManifest.xml:

<manifest>
  <application>
    <activity
      android:name=".wxapi.WXPayEntryActivity"
      android:label="@string/app_name"
      android:exported="true"
    />
  </application>
</manifest>

setup for ios

Add "URL Schema" as your app id for "URL type" in Targets > info, See the following screenshot for the view on your XCode.

URL_TYPE

On iOS 9, add wechat and weixin into LSApplicationQueriesSchemes in Targets > info > Custom iOS Target Properties. Or edit Info.plist then add:

<key>LSApplicationQueriesSchemes</key>
<array>
  <string>weixin</string>
  <string>wechat</string>
</array>

Then copy the following in AppDelegate.m:

- (BOOL)application:(UIApplication *)application handleOpenURL:(NSURL *)url {
    return  [WXApi handleOpenURL:url delegate:[WeChatManager shareInstance]];
}

- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation {
    return [WXApi handleOpenURL:url delegate:[WeChatManager shareInstance]];
}

reference resources

react-native-wechat

WeexErosFramework

WeChat Open Platform

Author

@doabit

license

MIT