bm-bridge
TypeScript icon, indicating that this package has built-in type declarations

0.17.13-beta.1 • Public • Published

bm桥接组件

安装:

npm i bm-bridge --save

使用:

import { closeWebView } from 'bm-bridge'
closeWebView()

接口文档链接

getLocation

在pc开发环境,如果想模拟返回一个假的定位地址,可以在项目中设置一个全局标示:

// 设置bm-bridge的本地开发标示
// @ts-ignore
window.__BM__BRIDGE__DEV__ = true

同时在当前url中添加参数__gps__,刷新页面即可得到定位桥接返回的假地址,注意不要在正是环境设置__BM__BRIDGE__DEV__,以免正式环境无法返回真的定位地址。

Readme

Keywords

none

Package Sidebar

Install

npm i bm-bridge

Weekly Downloads

6

Version

0.17.13-beta.1

License

ISC

Unpacked Size

275 kB

Total Files

17

Last publish

Collaborators

  • hxc
  • bluemoon_china
  • huyue_npm
  • zedyuan999
  • xiejiaheng1995
  • liuxingjie
  • linjiayun
  • jiangxin1