|
@@ -0,0 +1,167 @@
|
|
|
+<!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/maJiaBaoGoApp.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>
|
|
|
+ <style>
|
|
|
+ .code-container {
|
|
|
+ background: url(../static/img/fullAttendAssistant/bg.png);
|
|
|
+ background-repeat: no-repeat;
|
|
|
+ background-size: 7.5rem 100vh;
|
|
|
+ }
|
|
|
+ </style>
|
|
|
+</head>
|
|
|
+
|
|
|
+<body>
|
|
|
+ <div class="code-container">
|
|
|
+ <div class="btn-content">
|
|
|
+ <img class="download-app" src="../static/img/fullAttendAssistant/download-bg.png" />
|
|
|
+ <img class="download-text" src="../static/img/fullAttendAssistant/download-text.png" />
|
|
|
+ </div>
|
|
|
+ <div class="mask">
|
|
|
+ <div class="point">
|
|
|
+ <img class="point-img" src="../static/img/point.png" />
|
|
|
+ </div>
|
|
|
+ <div class="dialog">
|
|
|
+ <img class="border" src="../static/img/fullAttendAssistant/border.png" />
|
|
|
+ <img class="border-close" src="../static/img/fullAttendAssistant/close.png" />
|
|
|
+ <img class="border-text" src="../static/img/border-text.png" />
|
|
|
+ <img class="border-btn" src="../static/img/fullAttendAssistant/btn.png" />
|
|
|
+ <img class="small-routine" src="../static/img/fullAttendAssistant/fullAttend.png" id="picurl" />
|
|
|
+ <img class="btn-text" src="../static/img/btn-text.png" />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <script>
|
|
|
+ toastr.options.positionClass = 'toast-center-center';
|
|
|
+ toastr.options.timeOut = '1500';
|
|
|
+ </script>
|
|
|
+ <script type="text/javascript">
|
|
|
+ // var baseUrl = 'http://14.215.128.96/'
|
|
|
+ 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),//从=号后面的内容
|
|
|
+ u = navigator.userAgent,
|
|
|
+ isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/),
|
|
|
+ isAndroid = u.indexOf('Android') > -1 || u.indexOf('Adr') > -1; //android终端
|
|
|
+ //埋点
|
|
|
+ if(isAndroid){
|
|
|
+ operate(id);
|
|
|
+ }
|
|
|
+ if(isiOS){
|
|
|
+ const pointName = id + '_IOS'
|
|
|
+ operate(pointName);
|
|
|
+ }
|
|
|
+ function operate(pointName){
|
|
|
+ $.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(isAndroid){
|
|
|
+ getAppDownload();
|
|
|
+ }
|
|
|
+ },
|
|
|
+ })
|
|
|
+ }
|
|
|
+ //点击下载APP
|
|
|
+ $('.btn-content')[0].addEventListener('click',()=>{
|
|
|
+ var ua = navigator.userAgent.toLowerCase();
|
|
|
+ if(ua.match(/MicroMessenger/i)=="micromessenger" || ua.match(/QQ\/[0-9]/i)){
|
|
|
+ $('.point').animate({top: '0.1rem'},"fast");
|
|
|
+ $('.mask').css('background','rgba(0,0,0,0.7)');
|
|
|
+ $('.mask').show();
|
|
|
+ document.documentElement.style.overflow='hidden';
|
|
|
+ }else if(isAndroid){
|
|
|
+ const pointName = id + '_click'
|
|
|
+ operate(pointName);
|
|
|
+ }else if(isiOS){
|
|
|
+ const pointName = id + '_IOS_click'
|
|
|
+ operate(pointName);
|
|
|
+ $('.dialog').animate({top: '4.36rem'},"fast");
|
|
|
+ $('.mask').show();
|
|
|
+ document.documentElement.style.overflow='hidden';
|
|
|
+ }
|
|
|
+ },false);
|
|
|
+ //关闭
|
|
|
+ $('.border-close')[0].addEventListener('click',handleClose,false);
|
|
|
+ function handleClose() {
|
|
|
+ $('.dialog').animate({top: '-6.96rem'},"fast");
|
|
|
+ $('.mask').hide();
|
|
|
+ document.documentElement.style.overflow='auto';
|
|
|
+ }
|
|
|
+ //调用下载接口
|
|
|
+ function getAppDownload(){
|
|
|
+ $.ajax({
|
|
|
+ url: baseUrl + '/api/user/v1/ditchClient/addChannelAppDownload',
|
|
|
+ type: 'post',
|
|
|
+ data:JSON.stringify({
|
|
|
+ code:"Q4796f4k26ST",
|
|
|
+ platform:"1",
|
|
|
+ version:""
|
|
|
+ }),
|
|
|
+ contentType: "application/json",
|
|
|
+ dataType: 'json',
|
|
|
+ cache: false,
|
|
|
+ success: function (res) {
|
|
|
+ if(res.status === 0){
|
|
|
+ window.location.href = baseUrl + '/file-center/fileOperate/downloadFile?id=169403';
|
|
|
+ }else{
|
|
|
+ stopManyClick(() =>{
|
|
|
+ toastr.error(res.msg)
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
+ })
|
|
|
+ }
|
|
|
+ //保存到相册
|
|
|
+ $('.btn-text')[0].addEventListener('click',savePic,false);
|
|
|
+ function savePic(){
|
|
|
+ var picurl= $("#picurl").attr("src");
|
|
|
+ savePicture(picurl);
|
|
|
+ }
|
|
|
+ //保存图片
|
|
|
+ function savePicture(Url){
|
|
|
+ var blob=new Blob([''], {type:'application/octet-stream'});
|
|
|
+ var url = URL.createObjectURL(blob);
|
|
|
+ var a = document.createElement('a');
|
|
|
+ a.href = Url;
|
|
|
+ a.download = Url.replace(/(.*\/)*([^.]+.*)/ig,"$2").split("?")[0];
|
|
|
+ var e = document.createEvent('MouseEvents');
|
|
|
+ e.initMouseEvent('click', true, false, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null);
|
|
|
+ a.dispatchEvent(e);
|
|
|
+ URL.revokeObjectURL(url);
|
|
|
+ stopManyClick(() =>{
|
|
|
+ toastr.error('保存成功!')
|
|
|
+ })
|
|
|
+ }
|
|
|
+ //防止提示一秒内重复显示
|
|
|
+ function stopManyClick(fn) {
|
|
|
+ if (flag) {
|
|
|
+ fn();
|
|
|
+ }
|
|
|
+ flag = false;
|
|
|
+ if(timer){clearTimeout(timer);}
|
|
|
+ timer = setTimeout(() => {flag = true}, 1500);
|
|
|
+ }
|
|
|
+ </script>
|
|
|
+</body>
|
|
|
+
|
|
|
+</html>
|