closeSplashScreen

主动关闭启动页(3.0.3+版本生效)

import { MicCore } from "@yl/super-jssdk"

MicCore.closeSplashScreen()

注意

1、由于原生端对于前端页面加载完成的判断可能存在偏差,所以提供该接口便于前端在合适的时机关闭启动页。

2、 调用该接口需在添加插件时设置参数NOT_CHECK_SPLASH_SCREEN为true,否则原生端也会对前端页面是否加载完成进行检测。

返回说明

参数 类型 作用
resolve() Function 成功回调
reject(err) Function 失败回调,err为详细错误信息,是一个json对象,例如:{"errCode":-1,"errMsg":"出错啦"}

代码示例


MicCore.closeSplashScreen()
  .then((res) => {
    console.log(res);
  })
  .catch(err => {
    console.log('插件调用失败:', err)
  })

results matching ""

    No results matching ""