Ionic Framework 4 is almost here. Preview the beta docs and try it out now! Try Ionic 4 Beta

Wechat

Improve this doc

A cordova plugin, a JS version of Wechat SDK

Repo: https://github.com/xu-li/cordova-plugin-wechat.git

Installation

  1. Install the Cordova and Ionic Native plugins:
    $ cordova plugin add cordova-plugin-wechat --variable wechatappid=YOUR_WECHAT_APPID
    $ npm install --save @ionic-native/wechat
    
  2. Add this plugin to your app's module

Supported platforms

Usage

import { Wechat } from '@ionic-native/wechat';


constructor(private wechat: Wechat) { }

...


this.wechat.functionName('Hello', 123)
  .then((res: any) => console.log(res))
  .catch((error: any) => console.error(error));

Instance Members

Scene

Type

isInstalled()

share()

Share a message to wechat app

auth()

Sending an auth request to Wechat

sendPaymentRequest()

Send a payment request

jumpToWechat()

jumpToBizProfile (跳转到某个微信公众号)2016-11-11 测试是失效的,囧

chooseInvoiceFromWX()

chooseInvoiceFromWX exq:choose invoices from Wechat card list

API

Native

General