1.0.4 • Published 6 years ago

@yct/jssdk v1.0.4

Weekly downloads
-
License
MIT
Repository
github
Last release
6 years ago

MIT license

Installation

npm i -S @yct/jssdk

or

yarn add @yct/jssdk

Example

import { Wechat, WechatAPI } from '@yct/jssdk';

(async () => {
  try {
    const wechat = new Wechat('Your appId', true, false);
    await wechat.ready();
    const ticket = 'get js ticket from server';
    await wechat.config(ticket, WechatAPI.getLocation, WechatAPI.getNetworkType);
    const loc = await wechat.getLocation({
      type: 'gcj02',
    });
    console.log(loc);
    const nw = await wechat.getNetworkType();
    console.log(nw);
  } catch(e) {
    console.error(e);
  }
})();

Summary

/docs/SUMMARY.md

1.0.4

6 years ago

1.0.3

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago