123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195 |
- <!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>下载APP</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/changePhoneActivity.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="container">
- <div class="header">
- <img class="bg_img" src="../static/img/changePhoneActivity/bg.png" />
- <img class="share" src="../static/img/changePhoneActivity/share.png" />
- <img class="logo" src="../static/img/changePhoneActivity/logo.png" />
- <img class="theme" src="../static/img/changePhoneActivity/theme.png" />
- <img class="activity-bg" src="../static/img/changePhoneActivity/activity-bg.png" />
- <img class="time" src="../static/img/changePhoneActivity/time.png" />
- <div class="login-container">
- <img class="login-bg" src="../static/img/changePhoneActivity/login-bg.png" />
- <div class="login-row-select">
- <div class="login-row-title">选择:</div>
- <input class="login-row-ipt" id="select" placeholder="请选择兑换时常的平台" disabled="true" />
- <img class="icon-down-img" src="../static/img/changePhoneActivity/icon-down.png" />
- </div>
- <div class="options">
- <div class="icon-down-first">
- <img class="first" src="../static/img/changePhoneActivity/icon-down-first.png" />
- <span class="first-text">多多云</span>
- </div>
- <div class="icon-down-second">
- <img class="second" src="../static/img/changePhoneActivity/icon-down-second.png" />
- <span class="second-text">红手指</span>
- </div>
- </div>
- <div class="login-row-account">
- <div class="login-row-title">账号:</div>
- <input class="login-row-ipt" id="account" placeholder="请输入兑换时常的账号" />
- </div>
- <div class="login-row-password">
- <div class="login-row-title">密码:</div>
- <input class="login-row-ipt" id="password" placeholder="请输入兑换时常的密码" />
- </div>
- <img class="login-btn" src="../static/img/changePhoneActivity/login-btn.png" />
- <img class="login-btn-text" src="../static/img/changePhoneActivity/login-btn-text.png" />
- </div>
- <div class="read-rule">
- <img class="selected" src="../static/img/changePhoneActivity/selected.png" />
- <img class="rule-text" src="../static/img/changePhoneActivity/rule-text.png" />
- </div>
- <div class="entry-QQ">
- <img class="entry-QQ-btn" src="../static/img/changePhoneActivity/entry-QQ-btn.png" />
- <img class="entry-QQ-text" src="../static/img/changePhoneActivity/entry-QQ-text.png" />
- </div>
- </div>
- <div class="middle">
- <img class="middle_bg_img" src="../static/img/changePhoneActivity/middle_bg_img.png" />
- <div class="activity-rule">
- <img class="activity-rule-btn" src="../static/img/changePhoneActivity/activity-rule-btn.png" />
- <img class="activity-rule-text" src="../static/img/changePhoneActivity/activity-rule-text.png" />
- </div>
- <img class="rule1" src="../static/img/changePhoneActivity/rule1.png" />
- <img class="rule2" src="../static/img/changePhoneActivity/rule2.png" />
- <img class="rule3" src="../static/img/changePhoneActivity/rule3.png" />
- </div>
- <div class="footer">
- <img class="footer_bg_img" src="../static/img/changePhoneActivity/footer_bg_img.png" />
- <img class="rule4" src="../static/img/changePhoneActivity/rule4.png" />
- </div>
- </div>
- <script>
- toastr.options.positionClass = 'toast-center-center';
- toastr.options.timeOut = '1500';
- </script>
- <script type="text/javascript">
- let timer,flag = true;
- let fromType = 0,
- account = '',
- password = '';
- var url = window.location.href;
- url = url.split('/')
- var baseUrl = 'http://192.168.31.198'
- var loc = window.location.search,
- n1 = loc.length,//地址的总长度
- n2 = loc.indexOf("="),//取得=号的位置
- id = loc.substr(n2 + 1, n1 - n2),//从=号后面的内容
- u = navigator.userAgent,
- ua = navigator.userAgent.toLowerCase(),
- isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/),
- isAndroid = u.indexOf('Android') > -1 || u.indexOf('Adr') > -1; //android终端
-
- //埋点
- operate('10月换机活动');
- function operate(pointName,type){
- $.ajax({
- url: baseUrl + '/api/public/v1/systemBuriedPoint/stat',
- type: 'post',
- data:JSON.stringify({
- pointName: pointName
- }),
- contentType:"application/json",
- dataType: 'json',
- cache: false,
- success: function (res) {
- if(type === 'click'){
- changePhone();
- }
- },
- })
- }
- //点击选择框
- $('.login-row-select')[0].addEventListener('click',()=>{
- $('.options')[0].className = 'options show';
- },false);
- //点击多多云
- $('.icon-down-first')[0].addEventListener('click',()=>{
- $('.options')[0].className = 'options';
- $('#select').val('多多云');
- fromType = 1;
- },false);
- //点击红手指
- $('.icon-down-second')[0].addEventListener('click',()=>{
- $('.options')[0].className = 'options';
- $('#select').val('红手指');
- fromType = 2;
- },false);
- //点击免费换机按钮
- $('.login-btn-text')[0].addEventListener('click',changePhoneHandle,false);
- $('.login-btn')[0].addEventListener('click',changePhoneHandle,false);
- function changePhoneHandle(){
- account = $('#account').val();
- password = $('#password').val();
- if(fromType === 0){
- stopManyClick(() =>{
- toastr.error('请选择兑换时常的平台')
- })
- return
- }
- if(account === ''){
- stopManyClick(() =>{
- toastr.error('请输入兑换时常的账号')
- })
- return
- }
- if(password === ''){
- stopManyClick(() =>{
- toastr.error('请输入兑换时常的密码')
- })
- return
- }
- operate('10月换机活动','click');
- }
- //调用免费换机接口
- function changePhone(){
- $.ajax({
- url: baseUrl + '/api/public/v1/activity/change/phone',
- type: 'post',
- data:JSON.stringify({
- type: fromType,
- account: account,
- password: password
- }),
- contentType: "application/json",
- dataType: 'json',
- cache: false,
- success: function (res) {
- if(res.status === 0){
- window.location.href = 'https://wjzx.androidscloud.com:9091/file-center/fileOperate/downloadFile?id=573420181';
- }else{
- stopManyClick(() =>{
- toastr.error(res.msg)
- })
- }
- },
- })
- }
- //防止提示一秒内重复显示
- function stopManyClick(fn) {
- if (flag) {
- fn();
- }
- flag = false;
- if(timer){clearTimeout(timer);}
- timer = setTimeout(() => {flag = true}, 1500);
- }
- </script>
- </body>
- </html>
|