2.12.0-alpha.26 • Published 15 days ago

hylid-bridge v2.12.0-alpha.26

Weekly downloads
-
License
MIT
Repository
-
Last release
15 days ago

hylid-bridge

Unite Api For MiniProgram Project.

Description

For mini programs that are launched to different native apps, they run on different containers. The JSAPIs that these mini programs can call may vary. This package can solve this problem.

Install

npm i hylid-bridge --save

Usage

Use in Modern Web Project

You need import method form hylid-bridge library and call it instead of according to my global namespace.

import { alert } from 'hylid-bridge';

Page({
  alert() {
    alert({
      content: 'hylid-bridge alert',
    });
  },
});

Use in Plain HTML

<!DOCTYPE html>
<html>
  <head>
    <script src="https://cdn.marmot-cloud.com/page/hylid-bridge/umd/1.0.0/index.js"></script>
  </head>
  <body>
    <script>
      my.alert({
        content: 'hylid-bridge',
      });
    </script>
  </body>
</html>

refer: How to transform an HTML 5 mobile app to an HTML 5 mini program

API

The following table lists the latest JSAPIs that are supported in JS bridge, and the API list will be constantly updated.

MiniProgram

APIdemogcashtngdalipaychopealipayhkdanatruemoneywechat
addFatigueAction
addPhoneContact
alert
apDisableJSAPI
appxrpc
APRegionRPC
batchQueryCdpSpaceInfo
chooseImage
choosePhoneContact
clearStorage
clearStorageSync
closeBluetoothAdapter
closeSocket
confirm
connectBLEDevice
connectSocket
createAnimation
createWebViewContext
datePicker
disconnectBLEDevice
downloadFile
exitApp
getAppIdSync
getAppToken
getAuthCode
getBatteryInfo
getBLEDeviceCharacteristics
getBLEDeviceServices
getBluetoothAdapterState
getBluetoothDevices
getClipboard
getComponentAuth
getConnectedBluetoothDevices
getFileInfo
getImageInfo
getLocation
getNetworkType
getOpenUserInfo
getPaymentCode
getPhoneNumber
getSavedFileInfo
getSavedFileList
getScreenBrightness
getServerTime
getSetting
getSiteInfo
getStorage
getStorageSync
getSystemInfo
getSystemInfoSync
hideBackHome
hideKeyboard
hideLoading
hideNavigationBarLoading
hideTabBar
hideToast
inquireQuote
isInstalledApp
makePhoneCall
multiLevelSelect
navigateBack
navigateBackMiniProgram
navigateTo
navigateToBizScene
navigateToMiniProgram
notifyBLECharacteristicValueChange
offAccelerometerChange
offBLECharacteristicValueChange
offBLEConnectionStateChanged
offBluetoothAdapterStateChange
offBluetoothDeviceFound
offCompassChange
offMemoryWarning
offSocketClose
offSocketError
offSocketMessage
offSocketOpen
offUserCaptureScreen
onAccelerometerChange
onBLECharacteristicValueChange
onBLEConnectionStateChanged
onBluetoothAdapterStateChange
onBluetoothDeviceFound
onCompassChange
onMemoryWarning
onSocketClose
onSocketError
onSocketMessage
onSocketOpen
onUserCaptureScreen
openBluetoothAdapter
openDocument
openSchemeWithBacking
openSetting
pageScrollTo
paySignCenter
previewImage
prompt
readBLECharacteristicValue
redirectTo
regionFetchAllApps
regionSearchAppsByKeywords
reLaunch
removeSavedFile
removeStorage
removeStorageSync
request
rpc
saveFile
saveImage
scan
sendSocketMessage
setBackgroundColor
setCanPullDown
setClipboard
setKeepScreenOn
setNavigationBar
setOptionMenu
setScreenBrightness
setStorage
setStorageSync
setTabBarStyle
showActionSheet
showAuthGuide
showLoading
showNavigationBarLoading
showToast
signContract
startApp
startBizService
startBluetoothDevicesDiscovery
startPullDownRefresh
stopBluetoothDevicesDiscovery
stopPullDownRefresh
switchTab
thirdPartyAuthForAc
tradePay
crossPay
uploadApdidToken
uploadFile
vibrate
watchShake
writeBLECharacteristicValue
getLaunchOptionsSync
createSelectorQuery
canIUse
getStorageInfo
getStorageInfoSync
showSharePanel
hideOptionButton

HTML5

APIdemogcashtngdalipaychopealipayhkdanatruemoney
addFatigueAction
addPhoneContact
alert
apDisableJSAPI
appxrpc
APRegionRPC
batchQueryCdpSpaceInfo
chooseImage
choosePhoneContact
clearStorage
clearStorageSync
closeBluetoothAdapter
closeSocket
confirm
connectBLEDevice
connectSocket
createAnimation
createWebViewContext
datePicker
disconnectBLEDevice
downloadFile
exitApp
getAppIdSync
getAppToken
getAuthCode
getBatteryInfo
getBLEDeviceCharacteristics
getBLEDeviceServices
getBluetoothAdapterState
getBluetoothDevices
getClipboard
getComponentAuth
getConnectedBluetoothDevices
getFileInfo
getImageInfo
getLocation
getNetworkType
getOpenUserInfo
getPaymentCode
getPhoneNumber
getSavedFileInfo
getSavedFileList
getScreenBrightness
getServerTime
getSetting
getSiteInfo
getStorage
getStorageSync
getSystemInfo
getSystemInfoSync
hideBackHome
hideKeyboard
hideLoading
hideNavigationBarLoading
hideTabBar
hideToast
inquireQuote
isInstalledApp
makePhoneCall
multiLevelSelect
navigateBack
navigateBackMiniProgram
navigateTo
navigateToBizScene
navigateToMiniProgram
notifyBLECharacteristicValueChange
offAccelerometerChange
offBLECharacteristicValueChange
offBLEConnectionStateChanged
offBluetoothAdapterStateChange
offBluetoothDeviceFound
offCompassChange
offMemoryWarning
offSocketClose
offSocketError
offSocketMessage
offSocketOpen
offUserCaptureScreen
onAccelerometerChange
onBLECharacteristicValueChange
onBLEConnectionStateChanged
onBluetoothAdapterStateChange
onBluetoothDeviceFound
onCompassChange
onMemoryWarning
onSocketClose
onSocketError
onSocketMessage
onSocketOpen
onUserCaptureScreen
openBluetoothAdapter
openDocument
openSchemeWithBacking
openSetting
pageScrollTo
paySignCenter
previewImage
prompt
readBLECharacteristicValue
redirectTo
regionFetchAllApps
regionSearchAppsByKeywords
reLaunch
removeSavedFile
removeStorage
removeStorageSync
request
rpc
saveFile
saveImage
scan
sendSocketMessage
setBackgroundColor
setCanPullDown
setClipboard
setKeepScreenOn
setNavigationBar
setOptionMenu
setScreenBrightness
setStorage
setStorageSync
setTabBarStyle
showActionSheet
showAuthGuide
showLoading
showNavigationBarLoading
showToast
signContract
startApp
startBizService
startBluetoothDevicesDiscovery
startPullDownRefresh
stopBluetoothDevicesDiscovery
stopPullDownRefresh
switchTab
thirdPartyAuthForAc
tradePay
crossPay
uploadApdidToken
uploadFile
vibrate
watchShake
writeBLECharacteristicValue
getLaunchOptionsSync
createSelectorQuery
canIUse
getStorageInfo
getStorageInfoSync
showSharePanel
hideOptionButton

Web

APIdemoalipayh5tngdh5ng
addFatigueAction
addPhoneContact
alert
apDisableJSAPI
appxrpc
APRegionRPC
batchQueryCdpSpaceInfo
chooseImage
choosePhoneContact
clearStorage
clearStorageSync
closeBluetoothAdapter
closeSocket
confirm
connectBLEDevice
connectSocket
createAnimation
createWebViewContext
datePicker
disconnectBLEDevice
downloadFile
exitApp
getAppIdSync
getAppToken
getAuthCode
getBatteryInfo
getBLEDeviceCharacteristics
getBLEDeviceServices
getBluetoothAdapterState
getBluetoothDevices
getClipboard
getComponentAuth
getConnectedBluetoothDevices
getFileInfo
getImageInfo
getLocation
getNetworkType
getOpenUserInfo
getPaymentCode
getPhoneNumber
getSavedFileInfo
getSavedFileList
getScreenBrightness
getServerTime
getSetting
getSiteInfo
getStorage
getStorageSync
getSystemInfo
getSystemInfoSync
hideBackHome
hideKeyboard
hideLoading
hideNavigationBarLoading
hideTabBar
hideToast
inquireQuote
isInstalledApp
makePhoneCall
multiLevelSelect
navigateBack
navigateBackMiniProgram
navigateTo
navigateToBizScene
navigateToMiniProgram
notifyBLECharacteristicValueChange
offAccelerometerChange
offBLECharacteristicValueChange
offBLEConnectionStateChanged
offBluetoothAdapterStateChange
offBluetoothDeviceFound
offCompassChange
offMemoryWarning
offSocketClose
offSocketError
offSocketMessage
offSocketOpen
offUserCaptureScreen
onAccelerometerChange
onBLECharacteristicValueChange
onBLEConnectionStateChanged
onBluetoothAdapterStateChange
onBluetoothDeviceFound
onCompassChange
onMemoryWarning
onSocketClose
onSocketError
onSocketMessage
onSocketOpen
onUserCaptureScreen
openBluetoothAdapter
openDocument
openSchemeWithBacking
openSetting
pageScrollTo
paySignCenter
previewImage
prompt
readBLECharacteristicValue
redirectTo
regionFetchAllApps
regionSearchAppsByKeywords
reLaunch
removeSavedFile
removeStorage
removeStorageSync
request
rpc
saveFile
saveImage
scan
sendSocketMessage
setBackgroundColor
setCanPullDown
setClipboard
setKeepScreenOn
setNavigationBar
setOptionMenu
setScreenBrightness
setStorage
setStorageSync
setTabBarStyle
showActionSheet
showAuthGuide
showLoading
showNavigationBarLoading
showToast
signContract
startApp
startBizService
startBluetoothDevicesDiscovery
startPullDownRefresh
stopBluetoothDevicesDiscovery
stopPullDownRefresh
switchTab
thirdPartyAuthForAc
tradePay
crossPay
uploadApdidToken
uploadFile
vibrate
watchShake
writeBLECharacteristicValue
getLaunchOptionsSync
createSelectorQuery
canIUse
getStorageInfo
getStorageInfoSync
showSharePanel
hideOptionButton

License

MIT

2.12.0-alpha.26

15 days ago

2.12.0-alpha.25

15 days ago

2.12.0-alpha.24

15 days ago

2.12.0-alpha.23

15 days ago

2.12.0-alpha.22

15 days ago

2.12.0-alpha.19

17 days ago

2.12.0-alpha.18

17 days ago

2.12.0-alpha.20

17 days ago

2.12.0-alpha.9

7 months ago

2.12.0-alpha.8

7 months ago

2.12.0-alpha.7

10 months ago

2.12.0-alpha.6

10 months ago

2.12.0-alpha.1

10 months ago

2.12.0-alpha.0

10 months ago

2.12.0-alpha.3

10 months ago

2.12.0-alpha.2

10 months ago

2.12.0-alpha.5

10 months ago

2.12.0-alpha.4

10 months ago

2.12.0

10 months ago

2.11.0

1 year ago

2.11.1

1 year ago

2.10.0

1 year ago

2.9.0

1 year ago

2.7.0

2 years ago

2.6.0

2 years ago

2.7.2

2 years ago

2.8.0

2 years ago

2.7.1

2 years ago

2.7.3

2 years ago

2.5.0

2 years ago

2.4.0

2 years ago

2.4.0-alpha.3

2 years ago

2.4.0-alpha.0

2 years ago

2.4.0-alpha.2

2 years ago

2.4.0-alpha.1

2 years ago

2.3.0

2 years ago

2.2.0

2 years ago

2.1.1

2 years ago

2.1.0

2 years ago

2.0.0

2 years ago

1.1.0

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago

0.0.1

2 years ago