|
@@ -0,0 +1,118 @@
|
|
|
+<!DOCTYPE html>
|
|
|
+<html lang="zh-CN">
|
|
|
+
|
|
|
+<head>
|
|
|
+ <meta charset="UTF-8">
|
|
|
+ <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
|
|
|
+ <title>激活码领取页</title>
|
|
|
+ <link rel="icon" href="../static/img/favicon2.ico" type="img/x-ico">
|
|
|
+ <link rel="stylesheet" href="../static/js/vender/toastr/toastr.min.css">
|
|
|
+ <link rel="stylesheet" href="../static/css/activationCode.css">
|
|
|
+ <script src="../static/js/vender/jquery-3.4.1.min.js"></script>
|
|
|
+ <script src="../static/js/vender/toastr/toastr.min.js"></script>
|
|
|
+ <script src="../static/js/vender/config.js"></script>
|
|
|
+</head>
|
|
|
+
|
|
|
+<body>
|
|
|
+ <div class="code-container">
|
|
|
+ <div class="bottom-content">
|
|
|
+ <img class="img-container" src="../static/img/gifContent.png" />
|
|
|
+ <div class="btn-content">
|
|
|
+ <img class="get-gif" src="../static/img/getGif.png" />
|
|
|
+ <img class="try-play" src="../static/img/tryPlay.png" />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="mask">
|
|
|
+ <div class="dialog">
|
|
|
+ <div class="head-list">
|
|
|
+ <div class="head-title">提示信息</div>
|
|
|
+ <div class="close"></div>
|
|
|
+ </div>
|
|
|
+ <div class="content">恭喜您,激活码领取成功!</div>
|
|
|
+ <div id="copy-code">P005242s5c</div>
|
|
|
+ <div class="btn-list">
|
|
|
+ <div class="close-text">关闭</div>
|
|
|
+ <img class="copy-btn" src="../static/img/copy.png" />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="copy-success">
|
|
|
+ <img class="success-img" src="../static/img/success.png" />
|
|
|
+ <div class="success-text">复制成功</div>
|
|
|
+ </div>
|
|
|
+ <input type="text" style="opacity: 0;z-index: -10;position: fixed;" id="codeCopy" value="">
|
|
|
+ </div>
|
|
|
+ <script>
|
|
|
+ toastr.options.positionClass = 'toast-center-center';
|
|
|
+ toastr.options.timeOut = '1500';
|
|
|
+ </script>
|
|
|
+ <script type="text/javascript">
|
|
|
+ // var baseUrl = 'http://192.168.31.198'
|
|
|
+ let timer,flag = true;
|
|
|
+ var url = window.location.href;
|
|
|
+ url = url.split('/')
|
|
|
+ var loc = window.location.search,
|
|
|
+ n1 = loc.length,//地址的总长度
|
|
|
+ n2 = loc.indexOf("="),//取得=号的位置
|
|
|
+ id = loc.substr(n2 + 1, n1 - n2);//从=号后面的内容
|
|
|
+ $.ajax({
|
|
|
+ url: baseUrl + '/api/public/v1/game/activationCode',
|
|
|
+ type: 'get',
|
|
|
+ headers: {
|
|
|
+ // 'Authorization': id //id
|
|
|
+ },
|
|
|
+ contentType: "application/json",
|
|
|
+ dataType: 'json',
|
|
|
+ cache: false,
|
|
|
+ success: function (res) {
|
|
|
+ console.log(res)
|
|
|
+ $('#copy-code').text('P005242235')
|
|
|
+ if (res.data.friendList.length > 0) {
|
|
|
+
|
|
|
+ }
|
|
|
+ },
|
|
|
+ })
|
|
|
+
|
|
|
+ $('.get-gif')[0].addEventListener('click',handleShow,false);
|
|
|
+ function handleShow() {
|
|
|
+ $('.dialog').animate({top: '4.36rem'},"fast");
|
|
|
+ $('.mask').show();
|
|
|
+ document.documentElement.style.overflow='hidden';
|
|
|
+ }
|
|
|
+ $('.close')[0].addEventListener('click',handleClose,false);
|
|
|
+ $('.close-text')[0].addEventListener('click',handleClose,false);
|
|
|
+ function handleClose() {
|
|
|
+ $('.dialog').animate({top: '-6.96rem'},"fast");
|
|
|
+ $('.mask').hide();
|
|
|
+ document.documentElement.style.overflow='auto';
|
|
|
+ }
|
|
|
+ $('.copy-btn')[0].addEventListener('click',copyCode,false);
|
|
|
+ //复制按钮
|
|
|
+ function copyCode() {
|
|
|
+ stopManyClick(() =>{
|
|
|
+ //加载数据
|
|
|
+ $('#codeCopy').val($('#copy-code').text());
|
|
|
+ var input = document.getElementById("codeCopy");
|
|
|
+ // 选中文本
|
|
|
+ input.select();
|
|
|
+ // 执行浏览器复制命令
|
|
|
+ document.execCommand("copy");
|
|
|
+ $('.copy-success').addClass('on');
|
|
|
+ setTimeout(() => {
|
|
|
+ $('.copy-success').removeClass('on');
|
|
|
+ },1500)
|
|
|
+ })
|
|
|
+ }
|
|
|
+ //防止提示一秒内重复显示
|
|
|
+ function stopManyClick(fn) {
|
|
|
+ if (flag) {
|
|
|
+ fn();
|
|
|
+ }
|
|
|
+ flag = false;
|
|
|
+ if(timer){clearTimeout(timer);}
|
|
|
+ timer = setTimeout(() => {flag = true}, 1500);
|
|
|
+ }
|
|
|
+ </script>
|
|
|
+</body>
|
|
|
+
|
|
|
+</html>
|