第一步:添加js

$(function () {
var ua = window.navigator.userAgent.toLowerCase();
//微信
if(ua.match(/MicroMessenger/i) == 'micromessenger'){
     //微信浏览器绑定事件
/*$(".app").bind('click', function (event) {
window.location.href = '';
})*/
}else{//非微信浏览器
if (navigator.userAgent.match(/(iPhone|iPod|iPad);?/i)) { //iPhone|iPod|iPad浏览器
            $(".app").bind('click', function (event) {
var loadDateTime = new Date();
window.setTimeout(function () {
var timeOutDateTime = new Date();
if (timeOutDateTime - loadDateTime < 5000) {
window.location = "http://itunes.apple.com/app/1219885292";//ios下载页面
} else {
window.close();
}
}, 25);
window.location = "YuWan://com.YuWan.DianJingPingTai"; //调用ios启动页地址
})
}else if (navigator.userAgent.match(/android/i)) { //安卓浏览器
$(".app").bind('click', function (event) {
var state = null;
try {
window.location = 'appshare://bluemobi.cn.esport'; //调用andriod启动页地址
                    setTimeout(function(){
window.location= "download.html"; //android下载页面 },500);
} catch(e) {}
})
} }
})

第二步:请andriod人员配置一下参数 apps custom url schemes

http://blog.csdn.net/xc765926174/article/details/51397847

第三步:请ios人员配置一下参数apps custom url schemes

http://blog.csdn.net/ba_jie/article/details/6884818

js调用app启动页的更多相关文章

  1. JS调用App方法及App调用JS方法

    做App内嵌H5项目时,经常会遇到js与App的交互,最普遍的就是方法的互相调用,那么如何实现方法的互相调用呢? 写在前面: 如果只是小项目且后期扩大的可能性不大的时候,可以忽略,可如果是长期项目的话 ...

  2. React-Native App启动页制作(安卓端)

    原文地址:React-Native App启动页制作(安卓端) 这篇文章是根据开源项目react-native-splash-screen来写的.在使用react-native-link命令安装该包后 ...

  3. App启动页倒计时功能

    转载请注明出处:http://www.cnblogs.com/cnwutianhao/p/6753418.html 示例代码采用 RxJava + RxLifecycle + Data-Binding ...

  4. 用代码获取APP启动页图片

    用代码获取APP启动页图片 源码 - swift // // AppleSystemService.swift // Swift-Animations // // Created by YouXian ...

  5. App启动页设计实例与技巧

    App启动页,也称闪屏页,最初是为缓解用户等待Web/iOS/Android App数据加载的焦虑情绪而出现,后被设计师巧妙用于品牌文化展示,服务特色介绍以及功能界面熟悉等平台进行设计,被赋予了更加丰 ...

  6. Android App 启动页(Splash)黑/白闪屏现象产生原因与解决办法(转)

    转载: Android App 启动页(Splash)黑/白闪屏现象产生原因与解决办法   首先感谢博主分享,本文作为学习记录 惊鸿一瞥 微信的启动页,相信大家都不陌生. 不知道大家有没有发现一个现象 ...

  7. APP启动页

    关于APP启动引导页面模块 时间:2016年6月14日 作者:赵锐 模块使用说明 模块暴露在外的接口是- (void)showGuideViewWithImages:(NSArray *)images ...

  8. 【Android】Mac下Android Studio设置App启动页

    先将启动页放到项目资源中,图片一般是1080*1920的jpg. 新建一个activity,如图: 创建成功之后,打开刚刚创建的activity,来进行代码的编写: public class BZLa ...

  9. app启动页问题

    今天自己做的小作品准备提交,就差一个启动页,各种百度,各种搜,结果还好最后终于出来了,和大家分享一下,这个过程中遇到的各种小问题.(注XCode版本为7.2) 1.启动页一般都是图片,因为苹果有4,4 ...

随机推荐

  1. bzoj千题计划168:bzoj3513: [MUTC2013]idiots

    http://www.lydsy.com/JudgeOnline/problem.php?id=3513 组成三角形的条件:a+b>c 其中,a<c,b<c 若已知 两条线段之和=i ...

  2. url接收传参

    下面是接收传参的代码: 方法一: function getQueryString(name) { var reg = new RegExp("(^|&)" + name + ...

  3. [codechef]SnackDown 2017 Online Elimination Round Prefix XOR

    预处理后主席树维护 首先得出最后的答案为 \(\sum_{i=l}^{r}{min(right[i],r)-i+1}\) \(ri[i]\)表示i最远的上升序列(即代码中的f[i]) step1 那么 ...

  4. CSS--交互效果

    动画过渡效果 //vue <div class="search-list" v-show="searches.length"> <transi ...

  5. Jupyter Notebook插入图片的4种方法

    来自:https://blog.csdn.net/qq_33039859/article/details/78507316 方法1: ![title](img/python.png) Markdown ...

  6. pymysql的使用与参数简要

    pymysql.Connect()参数说明 host(str): MySQL服务器地址 port(int): MySQL服务器端口号 user(str): 用户名 passwd(str): 密码 db ...

  7. 7.5 GRASP原则五:高内聚 High Cohesion

    GRASP原则五:高内聚 High Cohesion  How to keep objects focused, understandable and manageable, and as a si ...

  8. Flask之项目创建,路由以及会话控制

    Flask Flask诞生于2010年,是Armin ronacher(人名)用 Python 语言基于 Werkzeug 工具箱编写的轻量级Web开发框架. Flask 本身相当于一个内核,其他几乎 ...

  9. Crisp String CodeForces - 1117F (状压)

    #include <iostream> #include <algorithm> #include <cstdio> #include <math.h> ...

  10. xml字符串,xml对象,数组之间的相互转化

    <?phpnamespace Home\Controller;use Think\Controller;class IndexController extends Controller { pu ...