hylid-bridge 4.0.7 → 4.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -66
- package/lib/bridges.d.ts +1 -378
- package/lib/bridges.js +0 -694
- package/lib/clients/mp/alipay/index.d.ts +2 -4
- package/lib/clients/mp/alipay/index.js +2 -4
- package/lib/clients/mp/alipayhk/index.d.ts +2 -4
- package/lib/clients/mp/alipayhk/index.js +2 -4
- package/lib/clients/mp/chope/index.d.ts +1 -1
- package/lib/clients/mp/dana/index.d.ts +2 -4
- package/lib/clients/mp/dana/index.js +2 -4
- package/lib/clients/mp/demo/index.d.ts +1 -1
- package/lib/clients/mp/gcash/index.d.ts +2 -4
- package/lib/clients/mp/gcash/index.js +2 -4
- package/lib/clients/mp/tngd/index.d.ts +2 -4
- package/lib/clients/mp/tngd/index.js +2 -4
- package/lib/clients/mp/truemoney/index.d.ts +2 -4
- package/lib/clients/mp/truemoney/index.js +2 -4
- package/lib/clients/mp_web/alipay/index.d.ts +2 -4
- package/lib/clients/mp_web/alipay/index.js +1 -3
- package/lib/clients/mp_web/alipayhk/index.d.ts +2 -56
- package/lib/clients/mp_web/alipayhk/index.js +2 -28
- package/lib/clients/mp_web/chope/index.d.ts +2 -4
- package/lib/clients/mp_web/chope/index.js +1 -3
- package/lib/clients/mp_web/dana/index.d.ts +2 -56
- package/lib/clients/mp_web/dana/index.js +2 -28
- package/lib/clients/mp_web/demo/index.d.ts +2 -4
- package/lib/clients/mp_web/demo/index.js +1 -3
- package/lib/clients/mp_web/gcash/index.d.ts +2 -56
- package/lib/clients/mp_web/gcash/index.js +2 -28
- package/lib/clients/mp_web/mpay/index.d.ts +2 -54
- package/lib/clients/mp_web/mpay/index.js +2 -26
- package/lib/clients/mp_web/tngd/index.d.ts +2 -56
- package/lib/clients/mp_web/tngd/index.js +2 -28
- package/lib/clients/mp_web/toss/index.d.ts +2 -54
- package/lib/clients/mp_web/toss/index.js +2 -26
- package/lib/clients/mp_web/truemoney/index.d.ts +2 -56
- package/lib/clients/mp_web/truemoney/index.js +2 -28
- package/lib/clients/web/alipay/index.d.ts +3 -131
- package/lib/clients/web/alipay/index.js +3 -47
- package/lib/clients/web/demo/index.d.ts +2 -4
- package/lib/clients/web/demo/index.js +2 -4
- package/lib/clients/web/h5/index.d.ts +2 -42
- package/lib/clients/web/h5/index.js +2 -14
- package/lib/clients/web/tngdh5ng/index.d.ts +1 -3
- package/lib/clients/web/tngdh5ng/index.js +2 -4
- package/lib/common/apis/custom/web/h5/request.d.ts +1 -1
- package/lib/common/apis/generated/mp/request.d.ts +2 -2
- package/lib/common/apis/generated/mp_web/request.d.ts +2 -2
- package/lib/dsl.d.ts +1 -10
- package/lib/dsl.js +1 -28
- package/lib/umd/index.js +1 -1
- package/lib/umd/mp_web_alipay.js +1 -1
- package/lib/umd/mp_web_alipayhk.js +1 -1
- package/lib/umd/mp_web_chope.js +1 -1
- package/lib/umd/mp_web_dana.js +1 -1
- package/lib/umd/mp_web_demo.js +1 -1
- package/lib/umd/mp_web_gcash.js +1 -1
- package/lib/umd/mp_web_mpay.js +1 -2
- package/lib/umd/mp_web_tngd.js +1 -1
- package/lib/umd/mp_web_toss.js +1 -2
- package/lib/umd/mp_web_truemoney.js +1 -1
- package/lib/umd/web_alipay.js +1 -2
- package/lib/umd/web_demo.js +1 -1
- package/lib/umd/web_h5.js +1 -1
- package/lib/umd/web_tngdh5ng.js +1 -1
- package/package.json +6 -6
- package/lib/clients/mp/alipay/defineRuntimeConfig.d.ts +0 -2
- package/lib/clients/mp/alipay/defineRuntimeConfig.js +0 -3
- package/lib/clients/mp/alipayhk/defineRuntimeConfig.d.ts +0 -2
- package/lib/clients/mp/alipayhk/defineRuntimeConfig.js +0 -3
- package/lib/clients/mp/dana/defineRuntimeConfig.d.ts +0 -2
- package/lib/clients/mp/dana/defineRuntimeConfig.js +0 -3
- package/lib/clients/mp/gcash/defineRuntimeConfig.d.ts +0 -2
- package/lib/clients/mp/gcash/defineRuntimeConfig.js +0 -3
- package/lib/clients/mp/tngd/defineRuntimeConfig.d.ts +0 -2
- package/lib/clients/mp/tngd/defineRuntimeConfig.js +0 -3
- package/lib/clients/mp/truemoney/defineRuntimeConfig.d.ts +0 -2
- package/lib/clients/mp/truemoney/defineRuntimeConfig.js +0 -3
- package/lib/clients/mp_web/alipay/getCurrentLanguage.d.ts +0 -2
- package/lib/clients/mp_web/alipay/getCurrentLanguage.js +0 -3
- package/lib/clients/mp_web/alipayhk/createWithoutAuthRpc.d.ts +0 -2
- package/lib/clients/mp_web/alipayhk/createWithoutAuthRpc.js +0 -3
- package/lib/clients/mp_web/alipayhk/defineRuntimeConfig.d.ts +0 -2
- package/lib/clients/mp_web/alipayhk/defineRuntimeConfig.js +0 -3
- package/lib/clients/mp_web/alipayhk/getCurrentLanguage.d.ts +0 -2
- package/lib/clients/mp_web/alipayhk/getCurrentLanguage.js +0 -3
- package/lib/clients/mp_web/alipayhk/openApPayCodePage.d.ts +0 -2
- package/lib/clients/mp_web/alipayhk/openApPayCodePage.js +0 -3
- package/lib/clients/mp_web/alipayhk/openInApp.d.ts +0 -2
- package/lib/clients/mp_web/alipayhk/openInApp.js +0 -3
- package/lib/clients/mp_web/alipayhk/openInBrowser.d.ts +0 -2
- package/lib/clients/mp_web/alipayhk/openInBrowser.js +0 -3
- package/lib/clients/mp_web/alipayhk/openOtherApp.d.ts +0 -2
- package/lib/clients/mp_web/alipayhk/openOtherApp.js +0 -3
- package/lib/clients/mp_web/alipayhk/openPayCodePage.d.ts +0 -2
- package/lib/clients/mp_web/alipayhk/openPayCodePage.js +0 -3
- package/lib/clients/mp_web/alipayhk/openScanPage.d.ts +0 -2
- package/lib/clients/mp_web/alipayhk/openScanPage.js +0 -3
- package/lib/clients/mp_web/alipayhk/openURL.d.ts +0 -2
- package/lib/clients/mp_web/alipayhk/openURL.js +0 -3
- package/lib/clients/mp_web/alipayhk/openWebURL.d.ts +0 -2
- package/lib/clients/mp_web/alipayhk/openWebURL.js +0 -3
- package/lib/clients/mp_web/alipayhk/popWindow.d.ts +0 -2
- package/lib/clients/mp_web/alipayhk/popWindow.js +0 -3
- package/lib/clients/mp_web/alipayhk/rpcWithAuth.d.ts +0 -2
- package/lib/clients/mp_web/alipayhk/rpcWithAuth.js +0 -3
- package/lib/clients/mp_web/chope/getCurrentLanguage.d.ts +0 -2
- package/lib/clients/mp_web/chope/getCurrentLanguage.js +0 -3
- package/lib/clients/mp_web/dana/createWithoutAuthRpc.d.ts +0 -2
- package/lib/clients/mp_web/dana/createWithoutAuthRpc.js +0 -3
- package/lib/clients/mp_web/dana/defineRuntimeConfig.d.ts +0 -2
- package/lib/clients/mp_web/dana/defineRuntimeConfig.js +0 -3
- package/lib/clients/mp_web/dana/getCurrentLanguage.d.ts +0 -2
- package/lib/clients/mp_web/dana/getCurrentLanguage.js +0 -3
- package/lib/clients/mp_web/dana/openApPayCodePage.d.ts +0 -2
- package/lib/clients/mp_web/dana/openApPayCodePage.js +0 -3
- package/lib/clients/mp_web/dana/openInApp.d.ts +0 -2
- package/lib/clients/mp_web/dana/openInApp.js +0 -3
- package/lib/clients/mp_web/dana/openInBrowser.d.ts +0 -2
- package/lib/clients/mp_web/dana/openInBrowser.js +0 -3
- package/lib/clients/mp_web/dana/openOtherApp.d.ts +0 -2
- package/lib/clients/mp_web/dana/openOtherApp.js +0 -3
- package/lib/clients/mp_web/dana/openPayCodePage.d.ts +0 -2
- package/lib/clients/mp_web/dana/openPayCodePage.js +0 -3
- package/lib/clients/mp_web/dana/openScanPage.d.ts +0 -2
- package/lib/clients/mp_web/dana/openScanPage.js +0 -3
- package/lib/clients/mp_web/dana/openURL.d.ts +0 -2
- package/lib/clients/mp_web/dana/openURL.js +0 -3
- package/lib/clients/mp_web/dana/openWebURL.d.ts +0 -2
- package/lib/clients/mp_web/dana/openWebURL.js +0 -3
- package/lib/clients/mp_web/dana/popWindow.d.ts +0 -2
- package/lib/clients/mp_web/dana/popWindow.js +0 -3
- package/lib/clients/mp_web/dana/rpcWithAuth.d.ts +0 -2
- package/lib/clients/mp_web/dana/rpcWithAuth.js +0 -3
- package/lib/clients/mp_web/demo/getCurrentLanguage.d.ts +0 -2
- package/lib/clients/mp_web/demo/getCurrentLanguage.js +0 -3
- package/lib/clients/mp_web/gcash/createWithoutAuthRpc.d.ts +0 -2
- package/lib/clients/mp_web/gcash/createWithoutAuthRpc.js +0 -3
- package/lib/clients/mp_web/gcash/defineRuntimeConfig.d.ts +0 -2
- package/lib/clients/mp_web/gcash/defineRuntimeConfig.js +0 -3
- package/lib/clients/mp_web/gcash/getCurrentLanguage.d.ts +0 -2
- package/lib/clients/mp_web/gcash/getCurrentLanguage.js +0 -3
- package/lib/clients/mp_web/gcash/openApPayCodePage.d.ts +0 -2
- package/lib/clients/mp_web/gcash/openApPayCodePage.js +0 -3
- package/lib/clients/mp_web/gcash/openInApp.d.ts +0 -2
- package/lib/clients/mp_web/gcash/openInApp.js +0 -3
- package/lib/clients/mp_web/gcash/openInBrowser.d.ts +0 -2
- package/lib/clients/mp_web/gcash/openInBrowser.js +0 -3
- package/lib/clients/mp_web/gcash/openOtherApp.d.ts +0 -2
- package/lib/clients/mp_web/gcash/openOtherApp.js +0 -3
- package/lib/clients/mp_web/gcash/openPayCodePage.d.ts +0 -2
- package/lib/clients/mp_web/gcash/openPayCodePage.js +0 -3
- package/lib/clients/mp_web/gcash/openScanPage.d.ts +0 -2
- package/lib/clients/mp_web/gcash/openScanPage.js +0 -3
- package/lib/clients/mp_web/gcash/openURL.d.ts +0 -2
- package/lib/clients/mp_web/gcash/openURL.js +0 -3
- package/lib/clients/mp_web/gcash/openWebURL.d.ts +0 -2
- package/lib/clients/mp_web/gcash/openWebURL.js +0 -3
- package/lib/clients/mp_web/gcash/popWindow.d.ts +0 -2
- package/lib/clients/mp_web/gcash/popWindow.js +0 -3
- package/lib/clients/mp_web/gcash/rpcWithAuth.d.ts +0 -2
- package/lib/clients/mp_web/gcash/rpcWithAuth.js +0 -3
- package/lib/clients/mp_web/mpay/createWithoutAuthRpc.d.ts +0 -2
- package/lib/clients/mp_web/mpay/createWithoutAuthRpc.js +0 -3
- package/lib/clients/mp_web/mpay/defineRuntimeConfig.d.ts +0 -2
- package/lib/clients/mp_web/mpay/defineRuntimeConfig.js +0 -3
- package/lib/clients/mp_web/mpay/openApPayCodePage.d.ts +0 -2
- package/lib/clients/mp_web/mpay/openApPayCodePage.js +0 -3
- package/lib/clients/mp_web/mpay/openInApp.d.ts +0 -2
- package/lib/clients/mp_web/mpay/openInApp.js +0 -3
- package/lib/clients/mp_web/mpay/openInBrowser.d.ts +0 -2
- package/lib/clients/mp_web/mpay/openInBrowser.js +0 -3
- package/lib/clients/mp_web/mpay/openOtherApp.d.ts +0 -2
- package/lib/clients/mp_web/mpay/openOtherApp.js +0 -3
- package/lib/clients/mp_web/mpay/openPayCodePage.d.ts +0 -2
- package/lib/clients/mp_web/mpay/openPayCodePage.js +0 -3
- package/lib/clients/mp_web/mpay/openScanPage.d.ts +0 -2
- package/lib/clients/mp_web/mpay/openScanPage.js +0 -3
- package/lib/clients/mp_web/mpay/openURL.d.ts +0 -2
- package/lib/clients/mp_web/mpay/openURL.js +0 -3
- package/lib/clients/mp_web/mpay/openWebURL.d.ts +0 -2
- package/lib/clients/mp_web/mpay/openWebURL.js +0 -3
- package/lib/clients/mp_web/mpay/popWindow.d.ts +0 -2
- package/lib/clients/mp_web/mpay/popWindow.js +0 -3
- package/lib/clients/mp_web/mpay/rpcWithAuth.d.ts +0 -2
- package/lib/clients/mp_web/mpay/rpcWithAuth.js +0 -3
- package/lib/clients/mp_web/tngd/createWithoutAuthRpc.d.ts +0 -2
- package/lib/clients/mp_web/tngd/createWithoutAuthRpc.js +0 -3
- package/lib/clients/mp_web/tngd/defineRuntimeConfig.d.ts +0 -2
- package/lib/clients/mp_web/tngd/defineRuntimeConfig.js +0 -3
- package/lib/clients/mp_web/tngd/getCurrentLanguage.d.ts +0 -2
- package/lib/clients/mp_web/tngd/getCurrentLanguage.js +0 -3
- package/lib/clients/mp_web/tngd/openApPayCodePage.d.ts +0 -2
- package/lib/clients/mp_web/tngd/openApPayCodePage.js +0 -3
- package/lib/clients/mp_web/tngd/openInApp.d.ts +0 -2
- package/lib/clients/mp_web/tngd/openInApp.js +0 -3
- package/lib/clients/mp_web/tngd/openInBrowser.d.ts +0 -2
- package/lib/clients/mp_web/tngd/openInBrowser.js +0 -3
- package/lib/clients/mp_web/tngd/openOtherApp.d.ts +0 -2
- package/lib/clients/mp_web/tngd/openOtherApp.js +0 -3
- package/lib/clients/mp_web/tngd/openPayCodePage.d.ts +0 -2
- package/lib/clients/mp_web/tngd/openPayCodePage.js +0 -3
- package/lib/clients/mp_web/tngd/openScanPage.d.ts +0 -2
- package/lib/clients/mp_web/tngd/openScanPage.js +0 -3
- package/lib/clients/mp_web/tngd/openURL.d.ts +0 -2
- package/lib/clients/mp_web/tngd/openURL.js +0 -3
- package/lib/clients/mp_web/tngd/openWebURL.d.ts +0 -2
- package/lib/clients/mp_web/tngd/openWebURL.js +0 -3
- package/lib/clients/mp_web/tngd/popWindow.d.ts +0 -2
- package/lib/clients/mp_web/tngd/popWindow.js +0 -3
- package/lib/clients/mp_web/tngd/rpcWithAuth.d.ts +0 -2
- package/lib/clients/mp_web/tngd/rpcWithAuth.js +0 -3
- package/lib/clients/mp_web/toss/createWithoutAuthRpc.d.ts +0 -2
- package/lib/clients/mp_web/toss/createWithoutAuthRpc.js +0 -3
- package/lib/clients/mp_web/toss/defineRuntimeConfig.d.ts +0 -2
- package/lib/clients/mp_web/toss/defineRuntimeConfig.js +0 -3
- package/lib/clients/mp_web/toss/openApPayCodePage.d.ts +0 -2
- package/lib/clients/mp_web/toss/openApPayCodePage.js +0 -3
- package/lib/clients/mp_web/toss/openInApp.d.ts +0 -2
- package/lib/clients/mp_web/toss/openInApp.js +0 -3
- package/lib/clients/mp_web/toss/openInBrowser.d.ts +0 -2
- package/lib/clients/mp_web/toss/openInBrowser.js +0 -3
- package/lib/clients/mp_web/toss/openOtherApp.d.ts +0 -2
- package/lib/clients/mp_web/toss/openOtherApp.js +0 -3
- package/lib/clients/mp_web/toss/openPayCodePage.d.ts +0 -2
- package/lib/clients/mp_web/toss/openPayCodePage.js +0 -3
- package/lib/clients/mp_web/toss/openScanPage.d.ts +0 -2
- package/lib/clients/mp_web/toss/openScanPage.js +0 -3
- package/lib/clients/mp_web/toss/openURL.d.ts +0 -2
- package/lib/clients/mp_web/toss/openURL.js +0 -3
- package/lib/clients/mp_web/toss/openWebURL.d.ts +0 -2
- package/lib/clients/mp_web/toss/openWebURL.js +0 -3
- package/lib/clients/mp_web/toss/popWindow.d.ts +0 -2
- package/lib/clients/mp_web/toss/popWindow.js +0 -3
- package/lib/clients/mp_web/toss/rpcWithAuth.d.ts +0 -2
- package/lib/clients/mp_web/toss/rpcWithAuth.js +0 -3
- package/lib/clients/mp_web/truemoney/createWithoutAuthRpc.d.ts +0 -2
- package/lib/clients/mp_web/truemoney/createWithoutAuthRpc.js +0 -3
- package/lib/clients/mp_web/truemoney/defineRuntimeConfig.d.ts +0 -2
- package/lib/clients/mp_web/truemoney/defineRuntimeConfig.js +0 -3
- package/lib/clients/mp_web/truemoney/getCurrentLanguage.d.ts +0 -2
- package/lib/clients/mp_web/truemoney/getCurrentLanguage.js +0 -3
- package/lib/clients/mp_web/truemoney/openApPayCodePage.d.ts +0 -2
- package/lib/clients/mp_web/truemoney/openApPayCodePage.js +0 -3
- package/lib/clients/mp_web/truemoney/openInApp.d.ts +0 -2
- package/lib/clients/mp_web/truemoney/openInApp.js +0 -3
- package/lib/clients/mp_web/truemoney/openInBrowser.d.ts +0 -2
- package/lib/clients/mp_web/truemoney/openInBrowser.js +0 -3
- package/lib/clients/mp_web/truemoney/openOtherApp.d.ts +0 -2
- package/lib/clients/mp_web/truemoney/openOtherApp.js +0 -3
- package/lib/clients/mp_web/truemoney/openPayCodePage.d.ts +0 -2
- package/lib/clients/mp_web/truemoney/openPayCodePage.js +0 -3
- package/lib/clients/mp_web/truemoney/openScanPage.d.ts +0 -2
- package/lib/clients/mp_web/truemoney/openScanPage.js +0 -3
- package/lib/clients/mp_web/truemoney/openURL.d.ts +0 -2
- package/lib/clients/mp_web/truemoney/openURL.js +0 -3
- package/lib/clients/mp_web/truemoney/openWebURL.d.ts +0 -2
- package/lib/clients/mp_web/truemoney/openWebURL.js +0 -3
- package/lib/clients/mp_web/truemoney/popWindow.d.ts +0 -2
- package/lib/clients/mp_web/truemoney/popWindow.js +0 -3
- package/lib/clients/mp_web/truemoney/rpcWithAuth.d.ts +0 -2
- package/lib/clients/mp_web/truemoney/rpcWithAuth.js +0 -3
- package/lib/clients/web/alipay/addNotifyListener.d.ts +0 -2
- package/lib/clients/web/alipay/addNotifyListener.js +0 -3
- package/lib/clients/web/alipay/chooseDistrict.d.ts +0 -2
- package/lib/clients/web/alipay/chooseDistrict.js +0 -3
- package/lib/clients/web/alipay/createWithoutAuthRpc.d.ts +0 -2
- package/lib/clients/web/alipay/createWithoutAuthRpc.js +0 -3
- package/lib/clients/web/alipay/defineRuntimeConfig.d.ts +0 -2
- package/lib/clients/web/alipay/defineRuntimeConfig.js +0 -3
- package/lib/clients/web/alipay/easyShare.d.ts +0 -2
- package/lib/clients/web/alipay/easyShare.js +0 -3
- package/lib/clients/web/alipay/getCurrentLanguage.d.ts +0 -2
- package/lib/clients/web/alipay/getCurrentLanguage.js +0 -3
- package/lib/clients/web/alipay/getMainSelectedCity.d.ts +0 -2
- package/lib/clients/web/alipay/getMainSelectedCity.js +0 -3
- package/lib/clients/web/alipay/homeAddAppToMyApps.d.ts +0 -2
- package/lib/clients/web/alipay/homeAddAppToMyApps.js +0 -3
- package/lib/clients/web/alipay/homeCanAddAppToMyApps.d.ts +0 -2
- package/lib/clients/web/alipay/homeCanAddAppToMyApps.js +0 -3
- package/lib/clients/web/alipay/openApPayCodePage.d.ts +0 -2
- package/lib/clients/web/alipay/openApPayCodePage.js +0 -3
- package/lib/clients/web/alipay/openInApp.d.ts +0 -2
- package/lib/clients/web/alipay/openInApp.js +0 -3
- package/lib/clients/web/alipay/openInBrowser.d.ts +0 -2
- package/lib/clients/web/alipay/openInBrowser.js +0 -3
- package/lib/clients/web/alipay/openOtherApp.d.ts +0 -2
- package/lib/clients/web/alipay/openOtherApp.js +0 -3
- package/lib/clients/web/alipay/openPayCodePage.d.ts +0 -2
- package/lib/clients/web/alipay/openPayCodePage.js +0 -3
- package/lib/clients/web/alipay/openScanPage.d.ts +0 -2
- package/lib/clients/web/alipay/openScanPage.js +0 -3
- package/lib/clients/web/alipay/openURL.d.ts +0 -2
- package/lib/clients/web/alipay/openURL.js +0 -3
- package/lib/clients/web/alipay/openWebURL.d.ts +0 -2
- package/lib/clients/web/alipay/openWebURL.js +0 -3
- package/lib/clients/web/alipay/popWindow.d.ts +0 -2
- package/lib/clients/web/alipay/popWindow.js +0 -3
- package/lib/clients/web/alipay/postNotification.d.ts +0 -2
- package/lib/clients/web/alipay/postNotification.js +0 -3
- package/lib/clients/web/alipay/removeNotifyListener.d.ts +0 -2
- package/lib/clients/web/alipay/removeNotifyListener.js +0 -3
- package/lib/clients/web/alipay/rpcWithAuth.d.ts +0 -2
- package/lib/clients/web/alipay/rpcWithAuth.js +0 -3
- package/lib/clients/web/alipay/rpcWithAuthAPlus.d.ts +0 -2
- package/lib/clients/web/alipay/rpcWithAuthAPlus.js +0 -3
- package/lib/clients/web/demo/getCurrentLanguage.d.ts +0 -2
- package/lib/clients/web/demo/getCurrentLanguage.js +0 -3
- package/lib/clients/web/h5/createWithoutAuthRpc.d.ts +0 -2
- package/lib/clients/web/h5/createWithoutAuthRpc.js +0 -3
- package/lib/clients/web/h5/defineRuntimeConfig.d.ts +0 -2
- package/lib/clients/web/h5/defineRuntimeConfig.js +0 -3
- package/lib/clients/web/h5/getCurrentLanguage.d.ts +0 -2
- package/lib/clients/web/h5/getCurrentLanguage.js +0 -3
- package/lib/clients/web/h5/openURL.d.ts +0 -2
- package/lib/clients/web/h5/openURL.js +0 -3
- package/lib/clients/web/h5/popWindow.d.ts +0 -2
- package/lib/clients/web/h5/popWindow.js +0 -3
- package/lib/clients/web/h5/rpcWithAuth.d.ts +0 -2
- package/lib/clients/web/h5/rpcWithAuth.js +0 -3
- package/lib/clients/web/tngdh5ng/getCurrentLanguage.d.ts +0 -2
- package/lib/clients/web/tngdh5ng/getCurrentLanguage.js +0 -3
- package/lib/common/apis/generated/mp_web/createWithoutAuthRpc.d.ts +0 -27
- package/lib/common/apis/generated/mp_web/createWithoutAuthRpc.js +0 -7
- package/lib/common/apis/generated/mp_web/defineRuntimeConfig.d.ts +0 -2
- package/lib/common/apis/generated/mp_web/defineRuntimeConfig.js +0 -7
- package/lib/common/apis/generated/web/chooseDistrict.d.ts +0 -41
- package/lib/common/apis/generated/web/chooseDistrict.js +0 -8
- package/lib/common/apis/generated/web/easyShare.d.ts +0 -32
- package/lib/common/apis/generated/web/easyShare.js +0 -8
- package/lib/common/apis/generated/web/getMainSelectedCity.d.ts +0 -27
- package/lib/common/apis/generated/web/getMainSelectedCity.js +0 -8
- package/lib/common/apis/generated/web/homeAddAppToMyApps.d.ts +0 -5
- package/lib/common/apis/generated/web/homeAddAppToMyApps.js +0 -8
- package/lib/common/apis/generated/web/homeCanAddAppToMyApps.d.ts +0 -13
- package/lib/common/apis/generated/web/homeCanAddAppToMyApps.js +0 -8
- package/lib/common/apis/generated/web/postNotification.d.ts +0 -9
- package/lib/common/apis/generated/web/postNotification.js +0 -8
- package/lib/internal/apis/custom/mp_web/alipayhk/openApPayCodePage.d.ts +0 -3
- package/lib/internal/apis/custom/mp_web/alipayhk/openApPayCodePage.js +0 -3
- package/lib/internal/apis/custom/mp_web/alipayhk/openInApp.d.ts +0 -3
- package/lib/internal/apis/custom/mp_web/alipayhk/openInApp.js +0 -3
- package/lib/internal/apis/custom/mp_web/alipayhk/openInBrowser.d.ts +0 -3
- package/lib/internal/apis/custom/mp_web/alipayhk/openInBrowser.js +0 -3
- package/lib/internal/apis/custom/mp_web/alipayhk/openOtherApp.d.ts +0 -3
- package/lib/internal/apis/custom/mp_web/alipayhk/openOtherApp.js +0 -3
- package/lib/internal/apis/custom/mp_web/alipayhk/openPayCodePage.d.ts +0 -3
- package/lib/internal/apis/custom/mp_web/alipayhk/openPayCodePage.js +0 -3
- package/lib/internal/apis/custom/mp_web/alipayhk/openScanPage.d.ts +0 -3
- package/lib/internal/apis/custom/mp_web/alipayhk/openScanPage.js +0 -3
- package/lib/internal/apis/custom/mp_web/alipayhk/openURL.d.ts +0 -2
- package/lib/internal/apis/custom/mp_web/alipayhk/openURL.js +0 -26
- package/lib/internal/apis/custom/mp_web/alipayhk/openWebURL.d.ts +0 -3
- package/lib/internal/apis/custom/mp_web/alipayhk/openWebURL.js +0 -3
- package/lib/internal/apis/custom/mp_web/alipayhk/popWindow.d.ts +0 -2
- package/lib/internal/apis/custom/mp_web/alipayhk/popWindow.js +0 -4
- package/lib/internal/apis/custom/mp_web/alipayhk/rpcWithAuth.d.ts +0 -3
- package/lib/internal/apis/custom/mp_web/alipayhk/rpcWithAuth.js +0 -32
- package/lib/internal/apis/custom/mp_web/mpay/openApPayCodePage.d.ts +0 -3
- package/lib/internal/apis/custom/mp_web/mpay/openApPayCodePage.js +0 -3
- package/lib/internal/apis/custom/mp_web/mpay/openInApp.d.ts +0 -3
- package/lib/internal/apis/custom/mp_web/mpay/openInApp.js +0 -3
- package/lib/internal/apis/custom/mp_web/mpay/openInBrowser.d.ts +0 -3
- package/lib/internal/apis/custom/mp_web/mpay/openInBrowser.js +0 -3
- package/lib/internal/apis/custom/mp_web/mpay/openOtherApp.d.ts +0 -3
- package/lib/internal/apis/custom/mp_web/mpay/openOtherApp.js +0 -3
- package/lib/internal/apis/custom/mp_web/mpay/openPayCodePage.d.ts +0 -3
- package/lib/internal/apis/custom/mp_web/mpay/openPayCodePage.js +0 -3
- package/lib/internal/apis/custom/mp_web/mpay/openScanPage.d.ts +0 -3
- package/lib/internal/apis/custom/mp_web/mpay/openScanPage.js +0 -3
- package/lib/internal/apis/custom/mp_web/mpay/openURL.d.ts +0 -2
- package/lib/internal/apis/custom/mp_web/mpay/openURL.js +0 -26
- package/lib/internal/apis/custom/mp_web/mpay/openWebURL.d.ts +0 -3
- package/lib/internal/apis/custom/mp_web/mpay/openWebURL.js +0 -3
- package/lib/internal/apis/custom/mp_web/mpay/rpcWithAuth.d.ts +0 -3
- package/lib/internal/apis/custom/mp_web/mpay/rpcWithAuth.js +0 -27
- package/lib/internal/apis/custom/mp_web/tngd/openApPayCodePage.d.ts +0 -3
- package/lib/internal/apis/custom/mp_web/tngd/openApPayCodePage.js +0 -3
- package/lib/internal/apis/custom/mp_web/tngd/openInApp.d.ts +0 -3
- package/lib/internal/apis/custom/mp_web/tngd/openInApp.js +0 -3
- package/lib/internal/apis/custom/mp_web/tngd/openInBrowser.d.ts +0 -3
- package/lib/internal/apis/custom/mp_web/tngd/openInBrowser.js +0 -3
- package/lib/internal/apis/custom/mp_web/tngd/openOtherApp.d.ts +0 -3
- package/lib/internal/apis/custom/mp_web/tngd/openOtherApp.js +0 -3
- package/lib/internal/apis/custom/mp_web/tngd/openPayCodePage.d.ts +0 -3
- package/lib/internal/apis/custom/mp_web/tngd/openPayCodePage.js +0 -3
- package/lib/internal/apis/custom/mp_web/tngd/openScanPage.d.ts +0 -3
- package/lib/internal/apis/custom/mp_web/tngd/openScanPage.js +0 -3
- package/lib/internal/apis/custom/mp_web/tngd/openURL.d.ts +0 -6
- package/lib/internal/apis/custom/mp_web/tngd/openURL.js +0 -30
- package/lib/internal/apis/custom/mp_web/tngd/openWebURL.d.ts +0 -3
- package/lib/internal/apis/custom/mp_web/tngd/openWebURL.js +0 -3
- package/lib/internal/apis/custom/mp_web/toss/rpcWithAuth.d.ts +0 -3
- package/lib/internal/apis/custom/mp_web/toss/rpcWithAuth.js +0 -27
- package/lib/internal/apis/custom/mp_web/truemoney/openApPayCodePage.d.ts +0 -3
- package/lib/internal/apis/custom/mp_web/truemoney/openApPayCodePage.js +0 -12
- package/lib/internal/apis/custom/mp_web/truemoney/openInApp.d.ts +0 -3
- package/lib/internal/apis/custom/mp_web/truemoney/openInApp.js +0 -3
- package/lib/internal/apis/custom/mp_web/truemoney/openInBrowser.d.ts +0 -3
- package/lib/internal/apis/custom/mp_web/truemoney/openInBrowser.js +0 -3
- package/lib/internal/apis/custom/mp_web/truemoney/openOtherApp.d.ts +0 -3
- package/lib/internal/apis/custom/mp_web/truemoney/openOtherApp.js +0 -3
- package/lib/internal/apis/custom/mp_web/truemoney/openPayCodePage.d.ts +0 -3
- package/lib/internal/apis/custom/mp_web/truemoney/openPayCodePage.js +0 -12
- package/lib/internal/apis/custom/mp_web/truemoney/openScanPage.d.ts +0 -3
- package/lib/internal/apis/custom/mp_web/truemoney/openScanPage.js +0 -12
- package/lib/internal/apis/custom/mp_web/truemoney/openURL.d.ts +0 -6
- package/lib/internal/apis/custom/mp_web/truemoney/openURL.js +0 -30
- package/lib/internal/apis/custom/mp_web/truemoney/openWebURL.d.ts +0 -3
- package/lib/internal/apis/custom/mp_web/truemoney/openWebURL.js +0 -3
- package/lib/internal/apis/custom/web/addNotifyListener.d.ts +0 -6
- package/lib/internal/apis/custom/web/addNotifyListener.js +0 -170
- package/lib/internal/apis/custom/web/alipay/openApPayCodePage.d.ts +0 -3
- package/lib/internal/apis/custom/web/alipay/openApPayCodePage.js +0 -3
- package/lib/internal/apis/custom/web/alipay/openInApp.d.ts +0 -3
- package/lib/internal/apis/custom/web/alipay/openInApp.js +0 -3
- package/lib/internal/apis/custom/web/alipay/openInBrowser.d.ts +0 -3
- package/lib/internal/apis/custom/web/alipay/openInBrowser.js +0 -3
- package/lib/internal/apis/custom/web/alipay/openOtherApp.d.ts +0 -3
- package/lib/internal/apis/custom/web/alipay/openOtherApp.js +0 -3
- package/lib/internal/apis/custom/web/alipay/openPayCodePage.d.ts +0 -3
- package/lib/internal/apis/custom/web/alipay/openPayCodePage.js +0 -3
- package/lib/internal/apis/custom/web/alipay/openScanPage.d.ts +0 -3
- package/lib/internal/apis/custom/web/alipay/openScanPage.js +0 -3
- package/lib/internal/apis/custom/web/alipay/openURL.d.ts +0 -2
- package/lib/internal/apis/custom/web/alipay/openURL.js +0 -26
- package/lib/internal/apis/custom/web/alipay/openWebURL.d.ts +0 -3
- package/lib/internal/apis/custom/web/alipay/openWebURL.js +0 -3
- package/lib/internal/apis/custom/web/alipay/popWindow.d.ts +0 -2
- package/lib/internal/apis/custom/web/alipay/popWindow.js +0 -4
- package/lib/internal/apis/custom/web/createWithoutAuthRpc.d.ts +0 -3
- package/lib/internal/apis/custom/web/createWithoutAuthRpc.js +0 -51
- package/lib/internal/apis/custom/web/defineRuntimeConfig.d.ts +0 -3
- package/lib/internal/apis/custom/web/defineRuntimeConfig.js +0 -7
- package/lib/internal/apis/custom/web/getCurrentLanguage.d.ts +0 -2
- package/lib/internal/apis/custom/web/getCurrentLanguage.js +0 -12
- package/lib/internal/apis/custom/web/h5/openURL.d.ts +0 -2
- package/lib/internal/apis/custom/web/h5/openURL.js +0 -15
- package/lib/internal/apis/custom/web/h5/popWindow.d.ts +0 -2
- package/lib/internal/apis/custom/web/h5/popWindow.js +0 -3
- package/lib/internal/apis/custom/web/removeNotifyListener.d.ts +0 -4
- package/lib/internal/apis/custom/web/removeNotifyListener.js +0 -27
- package/lib/internal/apis/custom/web/rpcWithAuthAPlus.d.ts +0 -3
- package/lib/internal/apis/custom/web/rpcWithAuthAPlus.js +0 -31
- package/lib/internal/utils/baseOpenUrl.d.ts +0 -15
- package/lib/internal/utils/baseOpenUrl.js +0 -125
- package/lib/internal/utils/index.d.ts +0 -9
- package/lib/internal/utils/index.js +0 -71
- package/lib/internal/utils/language.d.ts +0 -4
- package/lib/internal/utils/language.js +0 -46
- package/lib/internal/utils/network/authLogin.d.ts +0 -8
- package/lib/internal/utils/network/authLogin.js +0 -564
- package/lib/internal/utils/network/index.d.ts +0 -7
- package/lib/internal/utils/network/index.js +0 -246
- package/lib/internal/utils/router.d.ts +0 -35
- package/lib/internal/utils/router.js +0 -157
- package/lib/umd/mp_web_mpay.js.LICENSE.txt +0 -1
- package/lib/umd/mp_web_toss.js.LICENSE.txt +0 -1
- package/lib/umd/web_alipay.js.LICENSE.txt +0 -1
|
@@ -1,246 +0,0 @@
|
|
|
1
|
-
var __assign = this && this.__assign || function () {
|
|
2
|
-
__assign = Object.assign || function (t) {
|
|
3
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
-
s = arguments[i];
|
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
6
|
-
}
|
|
7
|
-
return t;
|
|
8
|
-
};
|
|
9
|
-
return __assign.apply(this, arguments);
|
|
10
|
-
};
|
|
11
|
-
var __awaiter = this && this.__awaiter || function (thisArg, _arguments, P, generator) {
|
|
12
|
-
function adopt(value) {
|
|
13
|
-
return value instanceof P ? value : new P(function (resolve) {
|
|
14
|
-
resolve(value);
|
|
15
|
-
});
|
|
16
|
-
}
|
|
17
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
18
|
-
function fulfilled(value) {
|
|
19
|
-
try {
|
|
20
|
-
step(generator.next(value));
|
|
21
|
-
} catch (e) {
|
|
22
|
-
reject(e);
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
function rejected(value) {
|
|
26
|
-
try {
|
|
27
|
-
step(generator["throw"](value));
|
|
28
|
-
} catch (e) {
|
|
29
|
-
reject(e);
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
function step(result) {
|
|
33
|
-
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
34
|
-
}
|
|
35
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
36
|
-
});
|
|
37
|
-
};
|
|
38
|
-
var __generator = this && this.__generator || function (thisArg, body) {
|
|
39
|
-
var _ = {
|
|
40
|
-
label: 0,
|
|
41
|
-
sent: function sent() {
|
|
42
|
-
if (t[0] & 1) throw t[1];
|
|
43
|
-
return t[1];
|
|
44
|
-
},
|
|
45
|
-
trys: [],
|
|
46
|
-
ops: []
|
|
47
|
-
},
|
|
48
|
-
f,
|
|
49
|
-
y,
|
|
50
|
-
t,
|
|
51
|
-
g;
|
|
52
|
-
return g = {
|
|
53
|
-
next: verb(0),
|
|
54
|
-
"throw": verb(1),
|
|
55
|
-
"return": verb(2)
|
|
56
|
-
}, typeof Symbol === "function" && (g[Symbol.iterator] = function () {
|
|
57
|
-
return this;
|
|
58
|
-
}), g;
|
|
59
|
-
function verb(n) {
|
|
60
|
-
return function (v) {
|
|
61
|
-
return step([n, v]);
|
|
62
|
-
};
|
|
63
|
-
}
|
|
64
|
-
function step(op) {
|
|
65
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
66
|
-
while (_) try {
|
|
67
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
68
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
69
|
-
switch (op[0]) {
|
|
70
|
-
case 0:
|
|
71
|
-
case 1:
|
|
72
|
-
t = op;
|
|
73
|
-
break;
|
|
74
|
-
case 4:
|
|
75
|
-
_.label++;
|
|
76
|
-
return {
|
|
77
|
-
value: op[1],
|
|
78
|
-
done: false
|
|
79
|
-
};
|
|
80
|
-
case 5:
|
|
81
|
-
_.label++;
|
|
82
|
-
y = op[1];
|
|
83
|
-
op = [0];
|
|
84
|
-
continue;
|
|
85
|
-
case 7:
|
|
86
|
-
op = _.ops.pop();
|
|
87
|
-
_.trys.pop();
|
|
88
|
-
continue;
|
|
89
|
-
default:
|
|
90
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
|
91
|
-
_ = 0;
|
|
92
|
-
continue;
|
|
93
|
-
}
|
|
94
|
-
if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
|
|
95
|
-
_.label = op[1];
|
|
96
|
-
break;
|
|
97
|
-
}
|
|
98
|
-
if (op[0] === 6 && _.label < t[1]) {
|
|
99
|
-
_.label = t[1];
|
|
100
|
-
t = op;
|
|
101
|
-
break;
|
|
102
|
-
}
|
|
103
|
-
if (t && _.label < t[2]) {
|
|
104
|
-
_.label = t[2];
|
|
105
|
-
_.ops.push(op);
|
|
106
|
-
break;
|
|
107
|
-
}
|
|
108
|
-
if (t[2]) _.ops.pop();
|
|
109
|
-
_.trys.pop();
|
|
110
|
-
continue;
|
|
111
|
-
}
|
|
112
|
-
op = body.call(thisArg, _);
|
|
113
|
-
} catch (e) {
|
|
114
|
-
op = [6, e];
|
|
115
|
-
y = 0;
|
|
116
|
-
} finally {
|
|
117
|
-
f = t = 0;
|
|
118
|
-
}
|
|
119
|
-
if (op[0] & 5) throw op[1];
|
|
120
|
-
return {
|
|
121
|
-
value: op[0] ? op[1] : void 0,
|
|
122
|
-
done: true
|
|
123
|
-
};
|
|
124
|
-
}
|
|
125
|
-
};
|
|
126
|
-
var __rest = this && this.__rest || function (s, e) {
|
|
127
|
-
var t = {};
|
|
128
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
129
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
130
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
131
|
-
}
|
|
132
|
-
return t;
|
|
133
|
-
};
|
|
134
|
-
import { implAsyncBridge } from '../index';
|
|
135
|
-
import { checkIsLogin, httpSign } from './authLogin';
|
|
136
|
-
export var implRpcWithAuth = function implRpcWithAuth(siteName, getStorage, setStorage, getAuthCode, getAppId, nonLoginRpc) {
|
|
137
|
-
var authParamsKey = 'auth-login-storage';
|
|
138
|
-
var authParamsCache = null;
|
|
139
|
-
var getAuthParams = function getAuthParams() {
|
|
140
|
-
if (authParamsCache) {
|
|
141
|
-
return authParamsCache;
|
|
142
|
-
}
|
|
143
|
-
authParamsCache = getStorage({
|
|
144
|
-
key: authParamsKey
|
|
145
|
-
});
|
|
146
|
-
return authParamsCache;
|
|
147
|
-
};
|
|
148
|
-
var saveAuthParams = function saveAuthParams(params) {
|
|
149
|
-
authParamsCache = {
|
|
150
|
-
data: params
|
|
151
|
-
};
|
|
152
|
-
return setStorage({
|
|
153
|
-
key: authParamsKey,
|
|
154
|
-
data: params
|
|
155
|
-
});
|
|
156
|
-
};
|
|
157
|
-
var rpcWithAuthMiniRequest = implAsyncBridge(function (args, resolve, reject) {
|
|
158
|
-
return __awaiter(void 0, void 0, void 0, function () {
|
|
159
|
-
var oldHeader, otherArgs, httpRequest, error_1, signData, headers;
|
|
160
|
-
return __generator(this, function (_a) {
|
|
161
|
-
switch (_a.label) {
|
|
162
|
-
case 0:
|
|
163
|
-
oldHeader = args.headers, otherArgs = __rest(args, ["headers"]);
|
|
164
|
-
// 强制把 requestData 设置为 string 类型,确保加签JSON序列化的格式一致
|
|
165
|
-
if (typeof otherArgs.requestData !== 'string') {
|
|
166
|
-
otherArgs.requestData = JSON.stringify(otherArgs.requestData);
|
|
167
|
-
}
|
|
168
|
-
httpRequest = function httpRequest(_a) {
|
|
169
|
-
var httpRequestHeaders = _a.headers,
|
|
170
|
-
operationType = _a.operationType,
|
|
171
|
-
requestData = _a.requestData;
|
|
172
|
-
return new Promise(function (httpRequestResolve, httpRequestReject) {
|
|
173
|
-
nonLoginRpc(__assign(__assign({}, otherArgs), {
|
|
174
|
-
requestData: requestData,
|
|
175
|
-
headers: __assign(__assign(__assign({}, oldHeader), httpRequestHeaders), {
|
|
176
|
-
'Operation-Type': operationType
|
|
177
|
-
}),
|
|
178
|
-
operationType: operationType,
|
|
179
|
-
success: function success(res) {
|
|
180
|
-
httpRequestResolve(res === null || res === void 0 ? void 0 : res.resData);
|
|
181
|
-
},
|
|
182
|
-
fail: function fail(err) {
|
|
183
|
-
httpRequestReject(err);
|
|
184
|
-
}
|
|
185
|
-
}));
|
|
186
|
-
});
|
|
187
|
-
};
|
|
188
|
-
_a.label = 1;
|
|
189
|
-
case 1:
|
|
190
|
-
_a.trys.push([1, 3,, 4]);
|
|
191
|
-
return [4 /*yield*/, checkIsLogin({
|
|
192
|
-
httpRequest: httpRequest,
|
|
193
|
-
isForceLogin: false,
|
|
194
|
-
getAuthParams: getAuthParams,
|
|
195
|
-
saveAuthParams: saveAuthParams,
|
|
196
|
-
getAuthCode: getAuthCode,
|
|
197
|
-
getAppId: getAppId,
|
|
198
|
-
siteName: siteName
|
|
199
|
-
})];
|
|
200
|
-
case 2:
|
|
201
|
-
_a.sent();
|
|
202
|
-
return [3 /*break*/, 4];
|
|
203
|
-
case 3:
|
|
204
|
-
error_1 = _a.sent();
|
|
205
|
-
reject(error_1);
|
|
206
|
-
return [2 /*return*/];
|
|
207
|
-
case 4:
|
|
208
|
-
signData = httpSign(otherArgs, siteName);
|
|
209
|
-
headers = __assign(__assign({}, oldHeader), signData);
|
|
210
|
-
nonLoginRpc(__assign(__assign({}, otherArgs), {
|
|
211
|
-
headers: headers,
|
|
212
|
-
success: function success(response) {
|
|
213
|
-
var _a, _b;
|
|
214
|
-
var resultStatus = (_b = (_a = response.headers) === null || _a === void 0 ? void 0 : _a['result-status']) === null || _b === void 0 ? void 0 : _b.toString();
|
|
215
|
-
if (resultStatus === '2000') {
|
|
216
|
-
// 登陆失效
|
|
217
|
-
checkIsLogin({
|
|
218
|
-
httpRequest: httpRequest,
|
|
219
|
-
isForceLogin: true,
|
|
220
|
-
getAuthParams: getAuthParams,
|
|
221
|
-
saveAuthParams: saveAuthParams,
|
|
222
|
-
getAuthCode: getAuthCode,
|
|
223
|
-
getAppId: getAppId,
|
|
224
|
-
siteName: siteName
|
|
225
|
-
}).then(function () {
|
|
226
|
-
nonLoginRpc(__assign(__assign({}, otherArgs), {
|
|
227
|
-
headers: headers,
|
|
228
|
-
success: resolve,
|
|
229
|
-
fail: reject
|
|
230
|
-
}));
|
|
231
|
-
}).catch(function (e) {
|
|
232
|
-
reject(e);
|
|
233
|
-
});
|
|
234
|
-
} else {
|
|
235
|
-
resolve(response);
|
|
236
|
-
}
|
|
237
|
-
},
|
|
238
|
-
fail: reject
|
|
239
|
-
}));
|
|
240
|
-
return [2 /*return*/];
|
|
241
|
-
}
|
|
242
|
-
});
|
|
243
|
-
});
|
|
244
|
-
});
|
|
245
|
-
return rpcWithAuthMiniRequest;
|
|
246
|
-
};
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
export declare type ErrorObject = {
|
|
2
|
-
error: number;
|
|
3
|
-
errorMessage?: string;
|
|
4
|
-
[key: string]: any;
|
|
5
|
-
};
|
|
6
|
-
interface Callback {
|
|
7
|
-
success?: () => void;
|
|
8
|
-
fail?: (err: ErrorObject) => void;
|
|
9
|
-
}
|
|
10
|
-
export interface AlipaySchemeParams extends Callback {
|
|
11
|
-
appId: string;
|
|
12
|
-
path?: string;
|
|
13
|
-
launchParams?: Record<string, any>;
|
|
14
|
-
}
|
|
15
|
-
export interface OpenURLParams extends Callback {
|
|
16
|
-
url: string;
|
|
17
|
-
path?: string;
|
|
18
|
-
}
|
|
19
|
-
export interface OpenBrowserFunc {
|
|
20
|
-
(params: OpenURLParams): void;
|
|
21
|
-
}
|
|
22
|
-
export interface OpenPageFunc {
|
|
23
|
-
(params: Callback): void;
|
|
24
|
-
}
|
|
25
|
-
interface InjectFunctions {
|
|
26
|
-
openWebURL: OpenBrowserFunc;
|
|
27
|
-
openInApp: OpenBrowserFunc;
|
|
28
|
-
openInBrowser: OpenBrowserFunc;
|
|
29
|
-
openPayCodePage: OpenPageFunc;
|
|
30
|
-
openScanPage: OpenPageFunc;
|
|
31
|
-
openApPayCodePage: OpenPageFunc;
|
|
32
|
-
openOtherApp: (params: AlipaySchemeParams) => void;
|
|
33
|
-
}
|
|
34
|
-
export declare function implOpenURL(url: string, funcs: InjectFunctions, callback: Callback): void;
|
|
35
|
-
export {};
|
|
@@ -1,157 +0,0 @@
|
|
|
1
|
-
var __assign = this && this.__assign || function () {
|
|
2
|
-
__assign = Object.assign || function (t) {
|
|
3
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
-
s = arguments[i];
|
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
6
|
-
}
|
|
7
|
-
return t;
|
|
8
|
-
};
|
|
9
|
-
return __assign.apply(this, arguments);
|
|
10
|
-
};
|
|
11
|
-
import { parse } from 'qs-es5';
|
|
12
|
-
import URLParse from 'url-parse';
|
|
13
|
-
var CustomSchemeRouteType;
|
|
14
|
-
(function (CustomSchemeRouteType) {
|
|
15
|
-
CustomSchemeRouteType["openInApp"] = "openinapp";
|
|
16
|
-
CustomSchemeRouteType["openOtherApp"] = "openotherapp";
|
|
17
|
-
CustomSchemeRouteType["openBizScene"] = "openbizscene";
|
|
18
|
-
CustomSchemeRouteType["openPayCodePage"] = "openpaycodepage";
|
|
19
|
-
CustomSchemeRouteType["openApPayCodePage"] = "openappaycodepage";
|
|
20
|
-
CustomSchemeRouteType["openScanPage"] = "openscanpage";
|
|
21
|
-
CustomSchemeRouteType["openInBrowser"] = "openinbrowser";
|
|
22
|
-
})(CustomSchemeRouteType || (CustomSchemeRouteType = {}));
|
|
23
|
-
var SceneCode;
|
|
24
|
-
(function (SceneCode) {
|
|
25
|
-
/** 扫一扫 */
|
|
26
|
-
SceneCode["scan"] = "scan";
|
|
27
|
-
/** 付款码 */
|
|
28
|
-
SceneCode["payCode"] = "payCode";
|
|
29
|
-
})(SceneCode || (SceneCode = {}));
|
|
30
|
-
var ERROR_NOT_SUPPORT = function ERROR_NOT_SUPPORT(apiName) {
|
|
31
|
-
return {
|
|
32
|
-
error: -102,
|
|
33
|
-
errorMessage: "[".concat(apiName, "]: Not Support")
|
|
34
|
-
};
|
|
35
|
-
};
|
|
36
|
-
function openCustomScheme(url, funcs, callback) {
|
|
37
|
-
var _a = new URLParse(url, true),
|
|
38
|
-
host = _a.host,
|
|
39
|
-
pathname = _a.pathname,
|
|
40
|
-
query = _a.query;
|
|
41
|
-
switch (host) {
|
|
42
|
-
// 在应用内打开
|
|
43
|
-
// 示例链接 aplus://openInApp/?url=https%3A%2F%2Fxx.xx.com%3Fa%3D1%26b%3D2
|
|
44
|
-
case CustomSchemeRouteType.openInApp:
|
|
45
|
-
// TODO: url 为空的监控?, 参数name不是 url 时怎么兼容
|
|
46
|
-
funcs.openInApp(__assign({
|
|
47
|
-
path: pathname,
|
|
48
|
-
url: query.url || ''
|
|
49
|
-
}, callback));
|
|
50
|
-
break;
|
|
51
|
-
// 打开其他应用
|
|
52
|
-
// 示例链接 aplus://openOtherApp/?appId=2102000024800001&path=%2Fpages%2Findex%2Findex%3Furl%3Dhttps%253A%252F%252Fa.b.com%253Fa%253D1%2526b%253D2&launchParams=a%3D1%26b%3D2
|
|
53
|
-
case CustomSchemeRouteType.openOtherApp:
|
|
54
|
-
{
|
|
55
|
-
console.log('### openCustomScheme', CustomSchemeRouteType.openOtherApp);
|
|
56
|
-
var _b = query.appId,
|
|
57
|
-
appId = _b === void 0 ? '' : _b,
|
|
58
|
-
path = query.path,
|
|
59
|
-
_c = query.launchParams,
|
|
60
|
-
launchParamsStr = _c === void 0 ? '' : _c;
|
|
61
|
-
// TODO: appId 为空的监控
|
|
62
|
-
var launchParams = parse(launchParamsStr);
|
|
63
|
-
funcs.openOtherApp(__assign({
|
|
64
|
-
appId: appId,
|
|
65
|
-
path: path,
|
|
66
|
-
launchParams: launchParams
|
|
67
|
-
}, callback));
|
|
68
|
-
break;
|
|
69
|
-
}
|
|
70
|
-
// 跳转钱包功能 - 已弃用, 请直接调用 openScanPage / openPayCodePage / openApPayCodePage 方法
|
|
71
|
-
// 示例链接 aplus://openBizScene/?sceneCode=scan
|
|
72
|
-
case CustomSchemeRouteType.openBizScene:
|
|
73
|
-
// 控制台提示. 部分链接由服务端返回, 暂无法直接下线
|
|
74
|
-
console.warn('该 API 已弃用, 请使用 aplus://openApPayCodePage 等链接替代');
|
|
75
|
-
if (query.sceneCode === SceneCode.scan) {
|
|
76
|
-
funcs.openScanPage(callback);
|
|
77
|
-
} else if (query.sceneCode === SceneCode.payCode) {
|
|
78
|
-
// GOF 历史逻辑, 直接跳 A+ 支付码
|
|
79
|
-
funcs.openApPayCodePage(callback);
|
|
80
|
-
}
|
|
81
|
-
// TODO: 其他场景,异常上报
|
|
82
|
-
break;
|
|
83
|
-
// 扫一扫
|
|
84
|
-
// 示例链接 aplus://openScanPage
|
|
85
|
-
case CustomSchemeRouteType.openScanPage:
|
|
86
|
-
funcs.openScanPage(callback);
|
|
87
|
-
break;
|
|
88
|
-
// 跳支付码
|
|
89
|
-
// 示例链接 aplus://openPayCodePage
|
|
90
|
-
case CustomSchemeRouteType.openPayCodePage:
|
|
91
|
-
funcs.openPayCodePage(callback);
|
|
92
|
-
break;
|
|
93
|
-
// 跳 A+ 支付码
|
|
94
|
-
// 示例链接 aplus://openApPayCodePage
|
|
95
|
-
case CustomSchemeRouteType.openApPayCodePage:
|
|
96
|
-
funcs.openApPayCodePage(callback);
|
|
97
|
-
break;
|
|
98
|
-
case CustomSchemeRouteType.openInBrowser:
|
|
99
|
-
// 在端外浏览器打开
|
|
100
|
-
// 示例链接 aplus://openInBrowser/?url=https%3A%2F%2Fxx.xx.com%3Fa%3D1%26b%3D2
|
|
101
|
-
// TODO: url 为空的监控?
|
|
102
|
-
funcs.openInBrowser(__assign({
|
|
103
|
-
url: query.url || ''
|
|
104
|
-
}, callback));
|
|
105
|
-
break;
|
|
106
|
-
default:
|
|
107
|
-
console.log('[openCustomScheme] 不支持的 routeType: ', host);
|
|
108
|
-
if (callback.fail) {
|
|
109
|
-
callback.fail(ERROR_NOT_SUPPORT("openCustomScheme ".concat(host)));
|
|
110
|
-
}
|
|
111
|
-
break;
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
var CAPR_PARAM_STR = 'caprMode=sync';
|
|
115
|
-
/**
|
|
116
|
-
* 根据传入的相对路径,生成完整的页面URL。注意,只支持雨燕部署的 Smallfish 应用在线URL!
|
|
117
|
-
* 示例:
|
|
118
|
-
* 当前页面URL: https://render.alipay.com/p/yuyan/180020010000000209/www/index.html?caprMode=sync&a=1&b=2
|
|
119
|
-
* 传入参数: /detail.html?c=3
|
|
120
|
-
* 返回的URL: https://render.alipay.com/p/yuyan/180020010000000209/www/detail.html?c=3&caprMode=sync(保留夜鹰参数caprMode,其他参数不保留)
|
|
121
|
-
* 文档: https://yuque.antfin.com/world-tour/fbip9a/scua9y7ph2cr2b2o#fIHjs
|
|
122
|
-
*/
|
|
123
|
-
function getFullPageUrl(path) {
|
|
124
|
-
// 移除最后的 /xx.html
|
|
125
|
-
var pathname = location.pathname.replace(/\/[^/]+.html/, '');
|
|
126
|
-
// 拼接新的URL
|
|
127
|
-
var url = "".concat(location.protocol, "//").concat(location.host).concat(pathname).concat(path);
|
|
128
|
-
// 若当前页面是夜鹰模式,则添加夜鹰参数
|
|
129
|
-
var isCaprMode = location.search.includes(CAPR_PARAM_STR);
|
|
130
|
-
if (isCaprMode) {
|
|
131
|
-
var separator = url.includes('?') ? '&' : '?';
|
|
132
|
-
return "".concat(url).concat(separator).concat(CAPR_PARAM_STR);
|
|
133
|
-
}
|
|
134
|
-
// 否则直接返回
|
|
135
|
-
return url;
|
|
136
|
-
}
|
|
137
|
-
export function implOpenURL(url, funcs, callback) {
|
|
138
|
-
if (!url) {
|
|
139
|
-
// TODO: url 为空的监控?
|
|
140
|
-
return;
|
|
141
|
-
}
|
|
142
|
-
if (url.startsWith('aplus://')) {
|
|
143
|
-
// 自定义 scheme,解析后调用具体的跳转方法
|
|
144
|
-
openCustomScheme(url, funcs, callback);
|
|
145
|
-
} else if (url.startsWith('/')) {
|
|
146
|
-
// 相对路径,在应用内打开
|
|
147
|
-
var fullPageUrl = getFullPageUrl(url);
|
|
148
|
-
funcs.openInApp(__assign({
|
|
149
|
-
url: fullPageUrl
|
|
150
|
-
}, callback));
|
|
151
|
-
} else {
|
|
152
|
-
// http[s]、deeplink 等
|
|
153
|
-
funcs.openWebURL(__assign({
|
|
154
|
-
url: url
|
|
155
|
-
}, callback));
|
|
156
|
-
}
|
|
157
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
|