dootask/public/site/zh/distribute.html
2023-07-11 15:28:58 +08:00

123 lines
4.5 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>DooTask</title>
<meta name="google" value="notranslate">
<meta name="description" content="DooTask是一款轻量级的开源在线项目任务管理工具提供各类文档协作工具、在线思维导图、在线流程图、项目管理、任务分发、即时IM文件管理等工具。助力团队高效推进项目让工作更简单。">
<meta name="keywords" content="中国 DooTask 开源在线项目 任务管理工具 任务管理 轻量级 海豚有海 团队协作">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="shortcut icon" href="../img/favicon.ico">
<link rel="stylesheet" href="../css/common.css">
<link rel="stylesheet" href="../css/distribution.css">
</head>
<body>
<main class="distrbution">
<img class="bg_fpic1" src="../img/bg_fpic1.svg" alt="广西海豚有海信息科技公司,HITOSEA,海豚有海,广西海豚有海">
<img class="bg_fpic2" src="../img/bg_fpic2.svg" alt="广西海豚有海信息科技公司,HITOSEA,海豚有海,广西海豚有海">
<section>
<div class="content">
<div class="layout" id="target">
<img class="icon1" src="../img/logo_y.svg" alt="DooTask">
<div class="qr_code">
<i id="qrcode" style="width: 130px; height: 130px;display: inline-block;"></i>
</div>
<div class="name">
<img class="icon2" src="../img/android_y.svg" alt="安卓,abdroid">
<i class="">DooTask</i>
</div>
<div class="scan">
<i class="scan-txt" style="margin-bottom: 4px;">扫描二维码下载</i>
<span class="scan-txt" style="margin-bottom: 18px;">
或用手机浏览器输入这个网址:
<i class="scan-txt-b">http://dootask.com/</i>
</span>
</div>
<div class="line-con">
<i class="line1"></i>
<i class="line2">微信/QQ内无法下载应用</i>
</div>
<div class="info-btn">
<button class="info-dow" onclick="dowHandle()">下载安装</button>
<i class="info-tip">仅支持Android设备</i>
</div>
<div class="info">
<span class="info-t">
<i>v0.27.46 - </i>
<i>64.86 MB</i>
</span>
<span class="info-b">2023-06-19更新</span>
</div>
</div>
<div class="operat-tips">
<div class="operat-con">
<i class="lower_triangle"></i>
<div class="group_num">
<p>请点击右上角</p>
<p>选择“浏览器中打开”</p>
</div>
</div>
</div>
</div>
</section>
</main>
</body>
<script src="https://cdn.bootcdn.net/ajax/libs/qrcodejs/1.0.0/qrcode.min.js"></script>
<script>
// 处理分发页面的逻辑
const dowBtnDom = document.querySelector('.info-dow')
const line1Dom = document.querySelector('.line1')
const line2Dom = document.querySelector('.line2')
const tipDom = document.querySelector('.info-tip')
const infoDom = document.querySelector('.info')
const operatDom = document.querySelector('.operat-tips')
const ua = window.navigator.userAgent.toLowerCase();
const isWechat = /micromessenger/.test(ua);
const isAndroid = /android/.test(ua);
let timer;
if(!isAndroid){
dowBtnDom.style.display = 'none'
infoDom.style.display = 'none'
tipDom.style.display = 'inline-block'
}else{
if(isWechat){
// 在微信中,显示下载按钮
dowBtnDom.style.display = 'block'
tipDom.style.display = 'none'
}else{
// 不在微信中,直接下载 app
window.location.href = "https://www.dootask.com/uploads/android/DooTask-v0.27.46-android.apk";
}
}
const dowHandle = ()=>{
if(isWechat){
operatDom.style.display = 'block'
line2Dom.style.display = 'block'
line1Dom.style.display = 'none'
dowBtnDom.style.display = 'none'
infoDom.style.display = 'none'
}else{
dowBtnDom.style.color = '#b3e19d'
dowBtnDom.style.backgroundColor = '#f0f9eb'
dowBtnDom.style.borderColor = '#e1f3d8'
dowBtnDom.disabled = true;
timer = setTimeout(()=>{
dowBtnDom.style.color = '#fff'
dowBtnDom.style.backgroundColor = '#8BCF70'
dowBtnDom.style.borderColor = 'transparent'
dowBtnDom.disabled = false;
clearTimeout(timer)
},5000)
}
window.location.href = "https://www.dootask.com/uploads/android/DooTask-v0.27.46-android.apk";
}
/* 生成分发页面的二维码 */
if(window.location.host !== ''){
const url = window.location.href;
const matchResult = url.match(/^(.*?)(?=\/site)/);
const result = matchResult[1];
new QRCode(document.getElementById('qrcode'), `${result}/site/zh/distribute.html`); // 测试
}
</script>
</html>