Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

hylid-bridge

Package Overview
Dependencies
Maintainers
1
Versions
132
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hylid-bridge

Unite Api For AliPay Plus MiniProgram Project.

  • 1.0.1
  • npm
  • Socket score

Version published
Weekly downloads
186
increased by169.57%
Maintainers
1
Weekly downloads
 
Created
Source

hylid-bridge

Unite Api For AliPay Plus 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',
    });
  },
});

refer: AliPay Plus JSAPI Overview

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

  • alert
  • clearStorage
  • clearStorageSync
  • confirm
  • createAnimation
  • createWebViewContext
  • crossPay
  • getAuthCode
  • getClipboard
  • getLocation
  • getNetworkType
  • getOpenUserInfo
  • getStorage
  • getStorageSync
  • getSystemInfo
  • getAppIdSync
  • hideBackHome
  • hideKeyboard
  • hideLoading
  • hideTabBar
  • hideToast
  • navigateBack
  • navigateTo
  • offMemoryWarning
  • onMemoryWarning
  • pageScrollTo
  • prompt
  • redirectTo
  • reLaunch
  • removeStorage
  • removeStorageSync
  • request
  • scan
  • setBackgroundColor
  • setCanPullDown
  • setClipboard
  • setNavigationBar
  • setStorage
  • setStorageSync
  • setTabBarStyle
  • showActionSheet
  • showAuthGuide
  • showLoading
  • showToast
  • startPullDownRefresh
  • stopPullDownRefresh
  • switchTab
  • tradePay

HTML5 MiniProgram

  • addFatigueAction
  • alert
  • apDisableJSAPI
  • appxrpc
  • APRegionRPC
  • batchQueryCdpSpaceInfo
  • chooseImage
  • choosePhoneContact
  • clearStorage
  • confirm
  • crossPay
  • exitApp
  • getAppToken
  • getAuthCode
  • getClipboard
  • getComponentAuth
  • getImageInfo
  • getLocation
  • getNetworkType
  • getPaymentCode
  • getPhoneNumber
  • getServerTime
  • getSetting
  • getSiteInfo
  • getStorage
  • getSystemInfo
  • hideKeyboard
  • hideLoading
  • hideNavigationBarLoading
  • hideToast
  • inquireQuote
  • isInstalledApp
  • makePhoneCall
  • multiLevelSelect
  • navigateBack
  • navigateBackMiniProgram
  • navigateTo
  • navigateToBizScene
  • navigateToMiniProgram
  • openSchemeWithBacking
  • paySignCenter
  • previewImage
  • prompt
  • redirectTo
  • regionFetchAllApps
  • regionSearchAppsByKeywords
  • reLaunch
  • removeStorage
  • request
  • rpc
  • saveImage
  • scan
  • setClipboard
  • setNavigationBar
  • setOptionMenu
  • setStorage
  • showAuthGuide
  • showLoading
  • showNavigationBarLoading
  • showToast
  • signContract
  • startApp
  • startBizService
  • thirdPartyAuthForAc
  • tradePay
  • uploadApdidToken
  • vibrate

License

MIT

Keywords

FAQs

Package last updated on 23 Dec 2021

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc