<html>
<head>
<meta charset="UTF-8">
<title>伊语</title>
<meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"/>
<meta http-equiv="x-dns-prefetch-control" content="on">
<script src="shipei.js" type="text/javascript" charset="utf-8"></script>
<link rel="icon" href="img/yue.ico"/>
</head>
<style type="text/css">
.head {
width: 710px;
left: 10px;
position: absolute;
z-index: 10;
top: 10px;
color: white;
letter-spacing: 60px;
font-size: 24px;
overflow: hidden;
}
body {
width: 720px;
height: 100%;
/*background-image: url(img/bjmob.png);*/
}
.bj {
width: 720px;
background-size: cover;
}
a {
text-decoration: none;
}
.img {
width: 100%;
position: absolute;
z-index: 10;
}
.img2 {
position: absolute;
z-index: 10;
width: 680px;
margin: auto;
margin-top: 20px;
margin-left: 20px;
}
.img3 {
position: absolute;
z-index: 10;
width: 180px;
margin: auto;
left: 0px;
right: 0;
margin-top: 140px;
}
* {
padding: 0;
margin: 0;
}
.qi {
width: 100%;
text-align: center;
font-size: 42px;
color: white;
position: absolute;
z-index: 10;
top: 380px;
}
.qi2 {
width: 100%;
text-align: center;
font-size: 30px;
color: white;
position: absolute;
z-index: 10;
top: 490px
}
.lie {
width: 500px;
margin: auto;
top: 37em;
position: absolute;
z-index: 10;
left: 0;
right: 0;
}
.lie2 {
width: 500px;
margin: auto;
top: 45em;
position: absolute;
z-index: 10;
left: 0;
right: 0;
}
.xia {
display: flex;
align-items: center;
text-align: center;
justify-content: center;
width: 80%;
margin: auto;
border-radius: 4.375rem;
color: white;
font-size: 1.375rem;
line-height: 4.375rem;
box-shadow: 0px 0px 2px #CCCCCC;
}
.xia > img {
/* margin-left: 36px; */
margin-right: 20px;
}
.bg_bc{
background-color: #3bc624;
}
.bg_do{
background-color: dodgerblue;
}
/*.wx{
position: absolute;
top: 0;
left: 0;
bottom: 0;
right: 0;
z-index: 100;
width: 100%;
height: 100%;
display: none;
}*/
.yin {
width: 100%;
height: 100%;
position: fixed;
z-index: 15;
background-color: rgba(0, 0, 0, 0.4);
margin: auto;
top: 0px;
left: 0;
bottom: 0;
right: 0;
display: none;
}
.a1 {
right: 40px;
position: absolute;
top: 20px;
}
.a2 {
width: 355px;
height: 174px;
text-align: center;
background-image: url(img/a6.png);
line-height: 170px;
position: absolute;
right: 170px;
top: 50px;
}
.a2 > img {
margin-top: 40px;
}
</style>
<body>
<div class="bj">
<!--<img src="./img/2.png" class="img" />-->
<img src="./img/bg2.jpg" class="img"/>
<!--<img src="img/mob2.png" class="mob" height="700px"/>-->
<div class="head"></div>
<img src="./img/logo.png" class="img3"/>
<div class="qi">
伊语
</div>
<div class="qi2">
安全加密 即时通讯
</div>
<div class="lie">
<a href="http://file.guchengkeji.cn/yiyu.apk">
<div class="xia bg_bc">
<img src="./img/yd.png"/>
<div>
Android 下载
</div>
</div>
</a>
</div>
<div class="lie2">
<a οnclick="copyText()" href="https://apps.apple.com/cn/app/%E4%BC%8A%E8%AF%AD/id1625853076">
<div class="xia bg_do">
<img src="./img/pg.png"/>
<div>
IOS 下载
</div>
</div>
</a>
</div>
</div>
<div class="yin" id="yin">
<img src="img/a3.png" class="a1"/>
<div class="a2">
<img src="img/a4.png"/>
</div>
</div>
<button id="xxl">点我唤起</button>
<!--<img src="./img/wxts.png" class="wx" id="wx"/>-->
<!--徐成-->
</body>
<script>
var deviceWidth = parseInt(window.screen.width);
var deviceScale = deviceWidth / 720;
var ua = navigator.userAgent;
if (/Android (\d+\.\d+)/.test(ua)) {
var version = parseFloat(RegExp.$1);
if (version > 2.3) {
document.write('<meta name="viewport" content="width=720,initial-scale=' + deviceScale + ', minimum-scale = ' + deviceScale + ', maximum-scale = ' + deviceScale + ', target-densitydpi=device-dpi">');
} else {
document.write('<meta name="viewport" content="width=720,initial-scale=0.72,maximum-scale=0.72,minimum-scale=0.72,target-densitydpi=device-dpi" />');
}
} else {
document.write('<meta name="viewport" content="width=720, user-scalable=no">');
}
</script>
<script type="text/javascript">
const copyText = (text) => {
text = getQuery2("code");
// 数字没有 .length 不能执行selectText 需要转化成字符串
const textString = text.toString();
let input = document.querySelector('#copy-input');
if (!input) {
input = document.createElement('input');
input.id = "copy-input";
input.readOnly = "readOnly"; // 防止ios聚焦触发键盘事件
input.style.position = "absolute";
input.style.left = "-1000px";
input.style.zIndex = "-1000";
document.body.appendChild(input)
}
input.value = textString;
// ios必须先选中文字且不支持 input.select();
selectText(input, 0, textString.length);
if (document.execCommand('copy')) {
document.execCommand('copy');
// alert('已复制到粘贴板');
}else {
console.log('不兼容');
}
input.blur();
// input自带的select()方法在苹果端无法进行选择,所以需要自己去写一个类似的方法
// 选择文本。createTextRange(setSelectionRange)是input方法
function selectText(textbox, startIndex, stopIndex) {
if (textbox.createTextRange) {//ie
const range = textbox.createTextRange();
range.collapse(true);
range.moveStart('character', startIndex);//起始光标
range.moveEnd('character', stopIndex - startIndex);//结束光标
range.select();//不兼容苹果
} else {//firefox/chrome
textbox.setSelectionRange(startIndex, stopIndex);
textbox.focus();
}
}
};
var u = navigator.appVersion;
var spli = u.split('zh-cn;').length //判断是否在qq浏览器中打开
// var wx = ((u.match(/MicroMessenger/i)) && (u.match(/MicroMessenger/i).toString().toLowerCase() == 'micromessenger'));
fangfa()
function fangfa() {
var browser = {
versions: function () {
var u = navigator.userAgent,
app = navigator.appVersion;
return { //移动终端浏览器版本信息
trident: u.indexOf('Trident') > -1, //IE内核
presto: u.indexOf('Presto') > -1, //opera内核
webKit: u.indexOf('AppleWebKit') > -1, //苹果、谷歌内核
gecko: u.indexOf('Gecko') > -1 && u.indexOf('KHTML') == -1, //火狐内核
mobile: !!u.match(/AppleWebKit.*Mobile.*/), //是否为移动终端
ios: !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/), //ios终端
android: u.indexOf('Android') > -1 || u.indexOf('Linux') > -1, //android终端或uc浏览器
iPhone: u.indexOf('iPhone') > -1, //是否为iPhone或者QQHD浏览器
iPad: u.indexOf('iPad') > -1, //是否iPad
webApp: u.indexOf('Safari') == -1 //是否web应该程序,没有头部与底部
};
}(),
language: (navigator.browserLanguage || navigator.language).toLowerCase()
}
if (browser.versions.mobile) {
//判断是否是移动设备打开。browser代码在下面
var ua = navigator.userAgent.toLowerCase(); //获取判断用的对象
if (ua.match(/MicroMessenger/i) == "micromessenger") {
// "微信端"
localStorage.setItem("mobile", "wei")
//在微信中打开
var wx = document.getElementById("yin");
wx.style.display = "block"
} else if (ua.match(/QQ/i) == "qq") {
if (spli < 2) {
var wx = document.getElementById("yin");
wx.style.display = "block"
}
} else {
if (browser.versions.ios == true) {
//在ios中打开
} else {
//在android中打开
//android
}
}
} else {
//否则就是PC浏览器打开
window.location = "./index.html"
}
}
function getQuery2(name) {
let reg = new RegExp('(^|&)' + name + "=([^&]*)", "i");
let r = decodeURI(window.location.search.substr(1)).match(reg);
console.log(r, '=======================================')
if (r != null) return r[2];
}
</script>
<script src="https://g.alicdn.com/jssdk/u-link/index.min.js"></script>
<script>
function getQuery(name) {
let reg = new RegExp('(^|&)' + name + "=([^&]*)", "i");
let r = decodeURI(window.location.search.substr(1)).match(reg);
console.log(r, '=======================================')
if (r != null) return r[2];
return null;
}
ULink([{
id: "usr14okrj6atikjm",// 后台生成的裂变活动LinkID
data: {// 传递的自定义动态参数
code: getQuery('code')
},
selector: "#xxl",//按钮的名称
// 可选高级功能,具体含义请看下方U-Link API文档
auto: false,
timeout: 2000,
lazy: false
}]);
</script>
</html>
不是原创,并不知道谁写的,做个记录而已