demo.html 1.35 KB
Newer Older
manxiaoqiang committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>灵犀</title>
    <meta name="keywords" content="热云数据 灵犀" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=0" name="viewport">
    <link rel="shortcut icon" href="favicon.ico" type="image/x-icon">
    <!-- build:js scripts/change.js -->
    <script src="js/app/page.js"></script>
    <!-- endbuild -->
    <!-- build:js scripts/demo.js -->
   <script src="js/common/jquery.min.js"></script>
   <script src="js/common/jquery.cookie.min.js"></script>
   <!-- endbuild -->

   <script type="text/javascript">
     $.get("/api/demo",function(data) {
        data = JSON.parse(data);
        var account = data.content.account,token = data.content.token;

        $.cookie("ryioUid",account.id);
        $.cookie("ryioUname",account.email);
        // $.cookie("ryioUauth",account.authStr);
        window.localStorage.setItem("ryioUauth",account.authStr);
        $.cookie("ryioToken",token);
        $.cookie("ryioPastDate",account.pastDate);

        var isSuper = account.isSuperUser == true && account.isChannelPerson!=true;
        $.cookie("ryioIsSuper",isSuper);
        window.location.href="index.html";
     });
    </script>
  </head>
 <body>
 </body>
</html>