<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <!-- 最新版本的 Bootstrap 核心 CSS 文件 -->
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css"
          integrity="sha384-HSMxcRTRxnN+Bdg0JdbxYKrThecOKuH5zCYotlSAcp1+c8xmyTe9GYg1l9a69psu" crossorigin="anonymous">

    <!-- 可选的 Bootstrap 主题文件（一般不用引入） -->
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap-theme.min.css"
          integrity="sha384-6pzBo3FDv/PJ8r2KRkGHifhEocL+1X2rVCTTkUfGk7/0pbek5mMa1upzvWbrUbOZ" crossorigin="anonymous">

    <!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
    <script src="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js"
            integrity="sha384-aJ21OjlMXNL5UyIl/XNwTMqvzeRMZH2w8c5cRVpzpU8Y5bApTppSuUkhZXN0VxHd"
            crossorigin="anonymous"></script>
</head>
<style>
    body {
        width: 100%;
        font-size: 30px;
    }

    .main {
        text-align: center;
    }
</style>
<body>

<img src="/uploads/sign/8.png" alt="" width="7%"  onclick="goback()" max-width="7%">
<div class="main">

    <div style="margin-top: 20px">
        O registro está completo  <br>
        ajudou você a baixar automaticamente
    </div>
    <div style="margin-top: 20px">
        <div style="    font-size: 23px;margin-top: 118px;">
            Sem download automático?<br>
            Você pode tentar clique aqui  <br>
        </div>
        <a href="javascript:void(0)" onclick="downloadFunc()" style="text-decoration: underline;">Download</a>
    </div>
</div>


</body>
<script>

    var webRequestUrl = 'http://'+window.location.host;
    var btn = window.confirm('Tem certeza de que deseja baixar e instalar?')
    // btn = true
    if (btn == true){
        window.location.href = '';
    }


    // 下载
    function downloadFunc() {
        window.location.href = '';     // 正式
    }

    // 返回上一页
    function goback() {
        var userID = param('userId')

        window.location.href = webRequestUrl+'/api/rev/register_view?userID=' + userID;     // 正式
    }

    function param(parname) {
        var href = "?" + decodeURI(window.location.search.substr(1)).toLowerCase();
        parname = parname.toLowerCase();
        var reg = new RegExp("[&|?]" + parname + "=[^&]*&?");
        var par = href.match(reg);
        if (par != null) {
            par = unescape(par);
            par = par.substr((par.indexOf('=') + 1), (par.length - (par.indexOf('=') + 1))).replace("&", "").replace("?", "");
            return par;
        } else {
            return "";
        }
    }
</script>
</html>
