• js调用app启动页


    第一步:添加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

  • 相关阅读:
    使用Speex中的AEC模块,提高声音质量(转)
    音频编解码speex库的使用方法
    VC 多线程编程(转)
    并口、串口、COM口区别
    用GDB调试程序
    [转]PCM文件格式
    PreTranslateMessage作用和使用方法
    音频编解码标准
    VS2010 运行速度加快方法(转)
    ON_COMMAND ON_MESSAGE ON_NOTIFY区别与联系
  • 原文地址:https://www.cnblogs.com/lynna/p/6992131.html
Copyright © 2020-2023  润新知