🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

bm-bridge-com

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bm-bridge-com

bm桥接组件

latest
npmnpm
Version
0.17.14-beta1
Version published
Maintainers
1
Created
Source

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__,以免正式环境无法返回真的定位地址。

FAQs

Package last updated on 19 Jun 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts