1.0.2 • Published 6 years ago
tgu-launchapp v1.0.2
唤起 APP
import { launchApp, jumpH5Page } from 'tgu-launchapp'
// 普通 scheme
launchApp(scheme,options).then().catch()
// 打开app内特定页面
jumpH5page(url, options).then().catch()
// options 可选参数
{
// 协议头
PROTOCAL: {
ANDROID: 'togetuapp://togetu.in',
IOS: location.href.replace(location.host, 't.togetu.in') + '&t=1&'
},
// 主页
HOME: '?fromPage=splash&requestCode=-1&tabId=u10&nextPageId=null&nextUrl={null}&subTabId=null',
// 唤起失败时的跳转链接
FAILBACK: {
ANDROID: 'https://play.google.com/store/apps/details?id=in.togetu.video&referrer=placement%3Dh5',
IOS: 'https://itunes.apple.com/us/app/togetu-short-video-community/id1420382010'
},
// 唤起超时时间,超时则跳转到下载页面
LOAD_WAITING: 2000
};