使用方式
import { CreditIframeSdk } from 'credit-iframe-sdk'
页面初始化
const creditIframeSdk = new CreditIframeSdk();
调用关闭页面初始化api
creditIframeSdk.pageReady();
调用关闭半弹层api
creditIframeSdk.closePanel();
所有函数支持传递回调,在非内嵌场景执行回调
const param = { cb: ()=>{
// 回调逻辑
}}
creditIframeSdk.updateResult(param);
有取现结果后通知外面单独做刷新动作
creditIframeSdk.updateResult();
调用关闭半弹层且通知外部刷新api
creditIframeSdk.closePanelAndUpdate();
调用刷新半弹层api
creditIframeSdk.refreshPanel();
默认index.min.js是cjs的,也提供了其他格式文件
dist/index.cjs.min.js
dist/index.es.min.js
dist/index.iife.min.js
dist/index.umd.min.js