1.0.8 • Published 5 years ago

jhdj-branch-manager v1.0.8

Weekly downloads
24
License
ISC
Repository
-
Last release
5 years ago

此包用于iframe与主window间通讯使用。主项目需事先postMessage的监听。

使用如下:

npm install jhdj-branch-manager 如果报错,请切换至官方的registry:npm config set registry https://registry.npmjs.org

初始化

注意:如果没有初始化将会无法使用,请在项目开始的时候引入包

import 'jhdj-branch-manager'
  1. 获取传输参数

    BRANCH_MGR.getInputParams().then(res => {console.debug(res)})
  1. 发送请求

    BRANCH_MGR.requestCall(serviceId, data).then(res => {console.debug(res)})
    
    发送第三方请求:使用方式和fetch一致
    BRANCH_MGR.requestThirdCall(options).then(res => {console.debug(res)})
  1. 结束当前应用

    BRANCH_MGR.finishBusiness(params)

注意引入此框架后,只能通过requestCall 发送请求。

1.0.8

5 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago