@eyunmy/bridge
v1.1.16
Published
eyunmy bridge
Downloads
60
Readme
js-bridge 桥接原生方法
name | method | android | ios :-: | :-: | :-: | :-: | :-: | :-: 获取uid | getUid | √ | √ 获取token | getToken | √ | √ 打开微信 | openWeChat | √ | × 关注/取消关注 | follow | × | × 获取params | getParams | √ | √ 关闭页面 | closeWebPage | √ | √ 分享 | share | √ | √ 是vip否 | hasVip | √ | √ 获取url参数 | getUrlQuery | √ | √
安装
npm install --save @eyunmy/bridge
引入
es6
:
import Bridge from "@eyunmy/bridge"
/* or */
import {/* method */} from "@eyunmy/bridge"
nodejs
:
const Bridge = require("@eyunmy/bridge");
/* or */
const {/* method */} = require("@eyunmy/bridge");
html
:
<script src="node_modules/@eyunmy/bridge/dist/bridge.min.js"></script>
用法
// callback
Bridge.getUid((uid) => {/* do something */});
// Promise
Bridge.getUid().then(uid => {/* do something */});