@dxd_sjtu/call-client
![npm download](https://camo.githubusercontent.com/7e761a0c4f8b6cd73e94c6918c1fa9a4dbab3f802b6542cb50d19e8af7189ef9/68747470733a2f2f696d672e736869656c64732e696f2f6e706d2f646d2f406478645f736a74752f63616c6c2d636c69656e742e7376673f7374796c653d666c61742d737175617265)
中文版文档
What is it:
This is a lib to call a app in h5 env.
Install
$ npm install @dxd_sjtu/call-client --save
$ yarn add @dxd_sjtu/call-client
Init Args:
- deepLink //URLSchema;
- intentLink //intent link for android;
- iosStore //ios's app store link for app
- androidStore //android's app store link for app
Usage
import CallClient from '@dxd_sjtu/call-client';
const deepLink = 'userschema for your app';
const intentLink = 'intent for your android app';
const iosStore = 'https://itunes.apple.com/app/id785385147?mt=8';
const androidStore = 'https://play.google.com/store/apps/details?id=com.lazada.android';
const callClient = new CallClient(
deepLink,
intentLink,
iosStore,
androidStore
);
callClient.callApp();
Behavior:
It will call app at first, if no app is called then it will link to your download link.
TODO:
track config