<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0">
    <title>测试jump跳转</title>
    <!-- 引入 WeUI -->
    <link rel="stylesheet" href="https://res.wx.qq.com/open/libs/weui/1.1.2/weui.min.css"/>
    <link rel="stylesheet" href="https://cdn.bootcss.com/jquery-weui/1.2.0/css/jquery-weui.css"/>
    <style type="text/css">
        body, html {
            height: 100%;
            background-color: #f4f4f4;
            -webkit-tap-highlight-color: transparent;
        }

        .basic-color {
            background-color: #1E88E5;
            color: #FFFFFF;
        }

        .basic-weui-btn {
            background-color: #1E88E5;
            color: #FFFFFF;
        }

        .basic-weui-btn:hover {
            background-color: #1E88E5;
            color: #FFFFFF;
        }

        .basic-weui-btn:active {
            background-color: #1E88E5 !important;
            color: #FFFFFF;
        }

        footer {
            text-align: center;
            font-size: 14px;
            padding: 20px;
        }

        .weui-loadmore_line .weui-loadmore__tips {
            background-color: #f4f4f4;
        }

        footer a {
            color: #999;
            text-decoration: none;
        }

    </style>
</head>

<body ontouchstart="">
<div class="weui-cells__title">测试jump跳转</div>
<div class="weui-cells weui-cells_form">


    <div class="weui-btn-area">
        <a class="weui-btn basic-weui-btn weui-btn_primary basic-color" href="javascript:" url-data="/manage/setBasic"
           id="jumpGithub">跳转浏览器 github</a>
    </div>


    <div class="weui-btn-area">
        <a class="weui-btn basic-weui-btn weui-btn_primary basic-color" href="javascript:" url-data="/manage/setBasic"
           id="jumpMsg">跳转消息帧</a>
    </div>


    <div class="weui-btn-area">
        <a class="weui-btn basic-weui-btn weui-btn_primary basic-color" href="javascript:" url-data="/manage/setBasic"
           id="jumpContacts">跳转通讯录</a>
    </div>


    <div class="weui-btn-area">
        <a class="weui-btn basic-weui-btn weui-btn_primary basic-color" href="javascript:" url-data="/manage/setBasic"
           id="jumpPersonal">跳转个人帧</a>
    </div>


    <div class="weui-btn-area">
        <a class="weui-btn basic-weui-btn weui-btn_primary basic-color" href="javascript:" url-data="/manage/setBasic"
           id="jumpFriendApply">跳转好友申请列表</a>
    </div>

    <div class="weui-btn-area">
        <a class="weui-btn basic-weui-btn weui-btn_primary basic-color" href="javascript:" url-data="/manage/setBasic"
           id="jumpAddFriend">添加张君为好友 无申请信息</a>
    </div>


    <div class="weui-btn-area">
        <a class="weui-btn basic-weui-btn weui-btn_primary basic-color" href="javascript:" url-data="/manage/setBasic"
           id="jumpAddFriends">添加张君为好友 申请信息：你好么</a>
    </div>

    <div class="weui-btn-area">
        <a class="weui-btn basic-weui-btn weui-btn_primary basic-color" href="javascript:" url-data="/manage/setBasic"
           id="jumpAdminManager">管理后台</a>
    </div>


    <div class="weui-btn-area">
        <a class="weui-btn basic-weui-btn weui-btn_primary basic-color" href="javascript:" url-data="/manage/setBasic"
           id="jumpUserSquer">用户广场</a>
    </div>


    <div class="weui-btn-area">
        <a class="weui-btn basic-weui-btn weui-btn_primary basic-color" href="javascript:" url-data="/manage/setBasic"
           id="jumpNonePlugin">扩展不存在</a>
    </div>

    <div class="weui-btn-area">
        <a class="weui-btn basic-weui-btn weui-btn_primary basic-color" href="javascript:" url-data="/manage/setBasic"
           id="jumpU2msg">张君 u2_msg</a>
    </div>

    <div class="weui-btn-area">
        <a class="weui-btn basic-weui-btn weui-btn_primary basic-color" href="javascript:" url-data="/manage/setBasic"
           id="jumpU2msg_fanzhen">范臻 u2_msg</a>
    </div>


    <div class="weui-btn-area">
        <a class="weui-btn basic-weui-btn weui-btn_primary basic-color" href="javascript:" url-data="/manage/setBasic"
           id="jumpu2Msg_none">人不存在 u2_msg</a>
    </div>


    <div class="weui-btn-area">
        <a class="weui-btn basic-weui-btn weui-btn_primary basic-color" href="javascript:" url-data="/manage/setBasic"
           id="jumpProfile">张君 profile</a>
    </div>

    <div class="weui-btn-area">
        <a class="weui-btn basic-weui-btn weui-btn_primary basic-color" href="javascript:" url-data="/manage/setBasic"
           id="jumpProfile_fanzhen">范臻 profile</a>
    </div>


    <div class="weui-btn-area">
        <a class="weui-btn basic-weui-btn weui-btn_primary basic-color" href="javascript:" url-data="/manage/setBasic"
           id="jumpProfile_none">人不存在 profile</a>
    </div>


    <div class="weui-btn-area">
        <a class="weui-btn basic-weui-btn weui-btn_primary basic-color" href="javascript:" url-data="/manage/setBasic"
           id="jumpGroupmsg">创世开源</a>
    </div>

    <div class="weui-btn-area">
        <a class="weui-btn basic-weui-btn weui-btn_primary basic-color" href="javascript:" url-data="/manage/setBasic"
           id="jumpGroupmsg_100032">100032 huanhang</a>
    </div>

    <div class="weui-btn-area">
        <a class="weui-btn basic-weui-btn weui-btn_primary basic-color" href="javascript:" url-data="/manage/setBasic"
           id="jumpGroupmsg_none">none group</a>
    </div>


    <div class="weui-btn-area">
        <a class="weui-btn basic-weui-btn weui-btn_primary basic-color" href="javascript:" url-data="/manage/setBasic"
           id="jumpGroupProfile">创世开源 profile</a>
    </div>

    <div class="weui-btn-area">
        <a class="weui-btn basic-weui-btn weui-btn_primary basic-color" href="javascript:" url-data="/manage/setBasic"
           id="jumpGroupProfile_100032">100032 huanhang profile</a>
    </div>

    <div class="weui-btn-area">
        <a class="weui-btn basic-weui-btn weui-btn_primary basic-color" href="javascript:" url-data="/manage/setBasic"
           id="jumpGroupProfile_none">none group profile</a>
    </div>


    <div class="weui-gallery" id="gallery">
        <span class="weui-gallery__img" id="galleryImg"></span>
        <div class="weui-gallery__opr">
            <a href="javascript:" class="weui-gallery__del">
                <i class="weui-icon-delete weui-icon_gallery-delete"></i>
            </a>
        </div>
    </div>
</div>
<script type="text/javascript" src="https://cdn.bootcss.com/jquery/2.2.4/jquery.js"></script>
<script type="text/javascript" src="https://res.wx.qq.com/open/libs/weuijs/1.1.3/weui.min.js"></script>
<script type="text/javascript" src="https://cdn.bootcss.com/jquery-weui/1.2.0/js/jquery-weui.js"></script>
<script type="text/javascript">
    function getOsType() {
        var u = navigator.userAgent;
        if (u.indexOf('Android') > -1 || u.indexOf('Linux') > -1) {
            return 'Android';
        } else if (u.indexOf('iPhone') > -1) {
            return 'IOS';
        } else {
            return 'PC';
        }
    }

    function reqUrl(reqUri, params, callbackName) {
        reqUri = "/akaxin" + reqUri;
        var type = getOsType();
        if (type == 'Android') {
            Android.requestPost(reqUri, params, callbackName);
        } else if (type == 'IOS') {
            ios_requestPost(reqUri, params, callbackName);
        } else {
            $.toast('暂时不支持该设备');
        }
    }

    function reqHtml(reqUri, params) {
        reqUri = "/akaxin" + reqUri;
        var type = getOsType();
        if (type == 'Android') {
            Android.requestPage(reqUri, params)
        } else if (type == 'IOS') {
            ios_requestPage(reqUri, params);
        } else {
            $.toast('暂时不支持该设备');
        }
    }

    function toast(msg) {
        var type = getOsType();
        if (type == 'Android') {
            Android.showToast(msg);
        } else if (type == 'IOS') {
            $.toast(msg);
        } else {
            $.toast('暂时不支持该设备');
        }
    }

    function jump(msg) {
        var type = getOsType();
        if (type == 'Android') {
            Android.gotoPage(msg);
        } else if (type == 'IOS') {
            ios_gotoPage(msg);
        } else {
            $.toast('暂时不支持该设备');
        }
    }

    $(document).on("click", "#jumpGithub", function () {
        jump("zaly://im.akaxin.com/goto?page=os_browser&page_url=github.com");
    });


    $(document).on("click", "#jumpContacts", function () {
        jump("zaly://im.akaxin.com/goto?page=contacts");
    });

    $(document).on("click", "#jumpMsg", function () {
        jump("zaly://im.akaxin.com/goto?page=message");
    });


    $(document).on("click", "#jumpPersonal", function () {
        jump("zaly://im.akaxin.com/goto?page=personal");
    });


    $(document).on("click", "#jumpFriendApply", function () {
        jump("zaly://im.akaxin.com/goto?page=friend_apply");
    });


    $(document).on("click", "#jumpAddFriend", function () {
        jump("zaly://im.akaxin.com/goto?page=request_friend&site_user_id=186542bb-644d-4aa2-a28c-d774c9cab1af");
    });


    $(document).on("click", "#jumpAddFriends", function () {
        jump("zaly://im.akaxin.com/goto?page=request_friend&site_user_id=186542bb-644d-4aa2-a28c-d774c9cab1af&request_message=你好么");
    });

    $(document).on("click", "#jumpAdminManager", function () {
        jump("zaly://im.akaxin.com/goto?page=plugin&plugin_id=1");
    });


    $(document).on("click", "#jumpUserSquer", function () {
        jump("zaly://im.akaxin.com/goto?page=plugin&plugin_id=2");
    });


    $(document).on("click", "#jumpNonePlugin", function () {
        jump("zaly://im.akaxin.com/goto?page=plugin&plugin_id=200000");
    });


    $(document).on("click", "#jumpU2msg", function () {
        jump("zaly://im.akaxin.com/goto?page=u2_msg&site_user_id=186542bb-644d-4aa2-a28c-d774c9cab1af");
    });

    $(document).on("click", "#jumpU2msg_fanzhen", function () {
        jump("zaly://im.akaxin.com/goto?page=u2_msg&site_user_id=f2aa5de3-ffb6-492b-ba04-64581201b40c");
    });

    $(document).on("click", "#jumpu2Msg_none", function () {
        jump("zaly://im.akaxin.com/goto?page=u2_msg&site_user_id=f2aa5de3-ffb6-492b-ba04-64581201b40cfjdosalfa");
    });

    $(document).on("click", "#jumpProfile", function () {
        jump("zaly://im.akaxin.com/goto?page=user_profile&site_user_id=186542bb-644d-4aa2-a28c-d774c9cab1af");
    });

    $(document).on("click", "#jumpProfile_fanzhen", function () {
        jump("zaly://im.akaxin.com/goto?page=user_profile&site_user_id=f2aa5de3-ffb6-492b-ba04-64581201b40c");
    });

    $(document).on("click", "#jumpProfile_none", function () {
        jump("zaly://im.akaxin.com/goto?page=user_profile&site_user_id=f2aa5de3-ffb6-492b-ba04-64581201b40cfjdosalfa");
    });

    $(document).on("click", "#jumpGroupmsg", function () {
        jump("zaly://im.akaxin.com/goto?page=group_msg&site_group_id=10001");
    });


    $(document).on("click", "#jumpGroupmsg_100032", function () {
        jump("zaly://im.akaxin.com/goto?page=group_msg&site_group_id=100032");
    });

    $(document).on("click", "#jumpGroupmsg_none", function () {
        jump("zaly://im.akaxin.com/goto?page=group_msg&site_group_id=10000032");
    });

    $(document).on("click", "#jumpGroupProfile", function () {
        jump("zaly://im.akaxin.com/goto?page=group_profile&site_group_id=10001");
    });


    $(document).on("click", "#jumpGroupProfile_100032", function () {
        jump("zaly://im.akaxin.com/goto?page=group_profile&site_group_id=100032");
    });

    $(document).on("click", "#jumpGroupProfile_none", function () {
        jump("zaly://im.akaxin.com/goto?page=group_profile&site_group_id=10000032");
    });


</script>
</body>

</html>