安装web-launch-app
yarn add web-launch-app
引入web-launch-app
import { LaunchApp, detector, copy, ua, isAndroid, isIos, inWeixin,
inWeibo, supportLink } from 'web-launch-app';
使用
const lanchApp = new LaunchApp();
lanchApp.open({
launchType: {
ios: 'scheme',
android: 'scheme'
},
scheme: 'xxx://xxxx',
param: {
},
pkgs: {
android: 'https://....',
ios: 'https://apps.apple.com/cn...',
}
}, (s, d, url) => {
console.log('callbackout', s, d, url);
});
完成