Browse Source

app下载页

lizhen_gitee 1 year ago
parent
commit
fb01b2eab8

+ 37 - 0
application/index/controller/Appdown.php

@@ -0,0 +1,37 @@
+<?php
+
+namespace app\index\controller;
+
+use think\Controller;
+use think\Db;
+use think\Request;
+
+class Appdown extends Controller
+{
+
+    /**
+     * app下载页
+     * 判断是安卓还是ios
+     */
+    public function index() {
+
+        $layout = 'index';
+
+        if(request()->isMobile())
+        {
+            $layout = 'h5';
+        }
+
+        $this->view->assign('android_apkUrl', config("site.android_apkUrl"));
+        $this->view->assign('ios_downurl', config('site.ios_downurl'));
+
+        //手机端二维码
+        
+
+
+        return $this->view->fetch($layout);
+    }
+
+
+
+}

+ 168 - 0
application/index/view/appdown/h5.html

@@ -0,0 +1,168 @@
+<!DOCTYPE html>
+<html lang="en">
+
+	<head>
+		<meta charset="UTF-8">
+		<meta http-equiv="X-UA-Compatible" content="IE=edge">
+		<meta name="viewport" content="width=device-width, initial-scale=1.0">
+		<title>Elin Dance Studio</title>
+		<link rel="stylesheet" href="/assets/appdown/common/style.css">
+		<script type="text/javascript" src="/assets/appdown/common/resize.js"></script>
+		<script type="text/javascript" src="/assets/appdown/common/jquery.min.js"></script>
+		<style>
+			.page{
+				height: 100vh;
+				width: 100%;
+				background: url(/assets/appdown/images/h5_bg.png) no-repeat center/cover;
+			}
+			.header-placer{
+				height: 8%;
+				width: 100%;
+			}
+			.p-header{
+				height: 9%;
+			}
+			.p-header .logo{
+				height: 100%;
+				width: auto;
+				object-fit: cover;
+				margin: 0 auto;
+			}
+			.p-placer{
+				height: 12%;
+			}
+			.p-ic .ic{
+				height: 63%;
+				width: 100%;
+				object-fit: cover;
+			}
+			.p-bom{
+				height: 30%;
+				background-color: #2A2A2A;
+				width: 100%;
+				position: absolute;
+				bottom: 0;
+				left: 0;
+				z-index: 10;
+			}
+			.p-bom .line1{
+				height: 12%;
+				width: 100%;
+			}
+			.p-bom .btn{
+				height: 27%;
+				text-align: center;
+			}
+			.p-bom .btn img{
+			    height: 100%;
+				width: auto;
+				object-fit: cover;
+			}
+			.p-bom .line2{
+				height: 10%;
+				width: 100%;
+			}
+			.p-bom .tips{
+				height: 22%;
+			}
+			.p-bom .line3{
+				height: 3%;
+				width: 100%;
+			}
+			.p-bom .tips .txt{
+				font-size: 0.24rem;
+				font-family: PingFang SC;
+				font-weight: 500;
+				color: #96C4FF;
+				opacity: 0.5;
+			}
+
+		</style>
+	</head>
+
+	<body>
+		<div class="page">
+			<div class="header-placer"></div>
+			<div class="p-header align-center justify-center">
+				<img src="/assets/appdown/images/h5_logo.png" alt="" class="logo">
+			</div>
+			<div class="p-placer"></div>
+			<div class="p-ic">
+				<img src="/assets/appdown/images/h5_pic.png" class="ic">
+			</div>
+			<div class="p-bom flex-col align-center">
+				<div class="line1"></div>
+				<a href="{$ios_downurl}" class="btn">
+					<img data-locale="ios_down_img" src="/assets/appdown/images/h5zh_ios.png" alt="">
+				</a>
+				<div class="line2"></div>
+				<a href="{$android_apkUrl}" class="btn">
+					<img data-locale="android_down_img" src="/assets/appdown/images/h5zh_andr.png" alt="">
+				</a>
+				<div class="line3"></div>
+				<p class="tips align-center justify-center">
+					<span class="txt" data-locale="down_tips">Elin安全专属页面,请放心下载</span>
+				</p>
+			</div>
+		</div>	
+	</body>
+</html>
+
+<script>
+	function docReady(fn) {
+		if (document.readyState === 'complete' || document.readyState === 'interactive') {
+			fn()
+		} else {
+			document.addEventListener('DOMContentLoaded', fn);
+		}
+	}
+
+	function GetRequest() {
+		var url = location.search;
+		var theRequest = new Object();
+		// console.log('url---',url)
+		if (url.indexOf('?') != -1) {
+			var str = url.substr(1);
+			// console.log('str---',str)
+			var strs = str.split('&');
+			for (var i = 0; i < strs.length; i++) {
+				theRequest[strs[i].split('=')[0]] = (strs[i].split('=')[1]);
+			}
+		}
+		return theRequest;
+	}
+	var Request = new Object();
+	Request = GetRequest();
+	// let query = "order_no=" + Request.orderNo + "&name=" + Request.name + "&money=" + Request.money + "&token=" + Request
+	// 	.token + "&logo=" + Request.logo
+	let query = 'i=a';
+    
+	
+	docReady(async function() {
+	    // 语言包
+		const langZH = {
+			ios_down_img: '/assets/appdown/images/h5zh_ios.png',
+			android_down_img: '/assets/appdown/images/h5zh_andr.png',
+			down_tips: 'Elin安全专属页面,请放心下载',
+		}
+		const langEN = {
+			ios_down_img: '/assets/appdown/images/h5en_ios.png',
+			android_down_img: '/assets/appdown/images/h5en_andr.png',
+			down_tips: "Elin Safe and dedicated page, please feel free to download",
+		}
+		function loadLang(lang){
+			$("[data-locale]").each(function () {
+				var key = $(this).data("locale");
+				// console.log("===",key,lang[key])
+				if(key.indexOf('_img') !== -1){ 
+					$(this).attr("src", lang[key]);
+				}else{
+					$(this).html(lang[key]);
+				}
+			});
+		}
+		loadLang(langEN);
+	})
+
+
+</script>

+ 230 - 0
application/index/view/appdown/index.html

@@ -0,0 +1,230 @@
+<!DOCTYPE html>
+<html lang="en">
+
+	<head>
+		<meta charset="UTF-8">
+		<meta http-equiv="X-UA-Compatible" content="IE=edge">
+		<meta name="viewport" content="width=device-width, initial-scale=1.0">
+		<title>Elin Dance Studio</title>
+		<link rel="stylesheet" href="/assets/appdown/common/style.css">
+		<!-- <script type="text/javascript" src="/assets/appdown/common/resize.js"></script> -->
+		<script type="text/javascript" src="/assets/appdown/common/jquery.min.js"></script>
+		<style>
+			.page{
+				height: 100vh;
+				width: 100%;
+				background-color: #fff;
+			}
+			.p-header{
+				background-color: #fff;
+			}
+			.p-header .header-inner{
+				width: 1390px;
+				margin: 0 auto;
+				height: 10vh;
+			}
+			.p-header .logo{
+				width: 77px;
+				height: 65px;
+				margin-right: 5px;
+			}
+			.p-header .title{
+				font-size: 25px;
+				font-family: PingFang SC;
+				font-weight: 500;
+				color: #333333;
+			}
+		    .p-con{
+				height: 90vh;
+				width: 100%;
+				background: url(/assets/appdown/images/pc_bg.png) no-repeat center/cover;
+				position: relative;
+			}
+			.p-con .con-placer{
+				height: 10%;
+			}
+			.p-con .con-inner{
+				width: 1390px;
+				margin: 0 auto;
+				height: 75%;
+				/* padding-top: 10%; */
+			}
+			.p-con .r{
+				height: 100%;
+			}
+			.p-con .r{
+				.ic{
+					width: 590px;
+				    height: 100%;
+					object-fit: cover;
+				}
+			}
+			.p-con .l  .mtitle{
+				font-size: 44px;
+				font-family: PingFang SC;
+				font-weight: bold;
+				color: #FFFFFF;
+			}
+			.p-con .l  .stitle{
+				margin-top: 28px;
+				font-size: 24px;
+				font-family: PingFang SC;
+				font-weight: 400;
+				color: #FFFFFF;
+			}
+			.p-con .l  .c-r{
+				width: 192px;
+				height: 192px;
+				background-color: #fff;
+				margin-left: 70px;
+			}
+			.p-con .l  .c-r .ic{
+                width: 182px;
+				height: 182px;
+			}
+			.p-con .l .con{
+				margin-top: 100px;
+			}
+			.p-con .l  .c-l{
+				height: 192px;
+			}
+			.p-con .l  .btn{
+				width: 305px;
+				height: 80px;
+				border-radius: 4px;
+				line-height: 80px;
+				text-align: center;
+				cursor: pointer;
+			}
+			.p-con .l .btn.apple{
+                background: #000000;
+				box-shadow: 0px 6px 20px 0px rgba(13,55,140,0.25);
+			}
+			.p-con .l .btn.android{
+				background: #A5C845;
+				box-shadow: 0px 6px 20px 0px rgba(13,55,140,0.25);
+			}
+			.p-con .l .btn .ic{
+				width: 33px;
+				height: 41px;
+				margin-right: 15px;
+			}
+			.p-con .l .btn .txt{
+				font-size: 24px;
+				font-family: Microsoft YaHei;
+				font-weight: 400;
+				color: #FFFFFF;
+			}
+
+			.p-con .con-tips{
+				position: absolute;
+				bottom: 0;
+				left: 50%;
+				transform: translateX(-50%);
+				height: 7%;
+			}
+			.p-con .con-tips .txt{
+				font-size: 16px;
+				font-family: PingFang SC;
+				font-weight: 500;
+				color: #FFFFFF;
+			}
+		</style>
+	</head>
+
+	<body>
+		<div class="page">
+			<div class="p-header">
+				<div class="header-inner align-center">
+					<img src="/assets/appdown/images/pc_logo.png" alt="" class="logo">
+					<h1 class="title">Elin Dance Studio</h1>	
+				</div>
+			</div>
+			<div class="p-con">
+				<div class="con-placer"></div>
+				<div class="con-inner align-center justify-between">
+					<div class="l flex-col align-start">
+						<div class="mtitle">Elin Dance Studio</div>
+						<div class="stitle">新加坡唯一的蹦极健身室和训练中心</div>
+						<div class="con flex-row">
+							<div class="c-l flex-col justify-between">
+								<a class="btn apple align-center justify-center" href="{$ios_downurl}">
+									<img src="/assets/appdown/images/pcxia_apple.png" alt="" class="ic">
+									<span class="txt" data-locale="ios_down">App Store 下载</span>
+								</a>
+								<a class="btn android align-center justify-center" href="{$android_apkUrl}">
+									<img src="/assets/appdown/images/pcxia_android.png" alt="" class="ic">
+									<span class="txt" data-locale="android_down">Android 下载</span>
+								</a>
+							</div>
+							<div class="c-r align-center justify-center">
+								<img src="/assets/appdown/images/pc_ma.png" alt="" class="ic">
+							</div>
+						</div>
+					</div>
+					<div class="r">
+						<img src="/assets/appdown/images/pc_pic.png" alt="" class="ic">
+					</div>
+				</div>
+				<div class="con-tips align-center justify-center">
+					<span class="txt" data-locale="down_tips">Elin安全专属页面,请放心下载</span>
+			    </div>
+			</div>
+		</div>	
+	</body>
+</html>
+
+<script>
+	function docReady(fn) {
+		if (document.readyState === 'complete' || document.readyState === 'interactive') {
+			fn()
+		} else {
+			document.addEventListener('DOMContentLoaded', fn);
+		}
+	}
+
+	function GetRequest() {
+		var url = location.search;
+		var theRequest = new Object();
+		// console.log('url---',url)
+		if (url.indexOf('?') != -1) {
+			var str = url.substr(1);
+			// console.log('str---',str)
+			var strs = str.split('&');
+			for (var i = 0; i < strs.length; i++) {
+				theRequest[strs[i].split('=')[0]] = (strs[i].split('=')[1]);
+			}
+		}
+		return theRequest;
+	}
+	var Request = new Object();
+	Request = GetRequest();
+	// let query = "order_no=" + Request.orderNo + "&name=" + Request.name + "&money=" + Request.money + "&token=" + Request
+	// 	.token + "&logo=" + Request.logo
+	let query = 'i=a';
+    
+	
+	docReady(async function() {
+	    // 语言包
+		const langZH = {
+			ios_down: 'App Store 下载',
+			android_down: 'Android 下载',
+			down_tips: 'Elin安全专属页面,请放心下载',
+		}
+		const langEN = {
+			ios_down: 'IOS Download',
+			android_down: 'Android Download',
+			down_tips: "Elin's exclusive security page,please feel free to download it",
+		}
+		function loadLang(lang){
+			$("[data-locale]").each(function () {
+				var key = $(this).data("locale");
+				console.log("===",key,lang[key])
+				$(this).html(lang[key]);
+			});
+		}
+		loadLang(langEN);
+	})
+
+
+</script>

File diff suppressed because it is too large
+ 1 - 0
public/assets/appdown/common/jquery.min.js


+ 32 - 0
public/assets/appdown/common/resize.js

@@ -0,0 +1,32 @@
+!(function(win, doc) {
+    const MOBILE_WIDTH = 710 // 750 refer to Bootstrap's responsive design
+
+    function $_getDevice() {
+        const rectWidth = doc.documentElement.clientWidth
+        if(rectWidth < MOBILE_WIDTH){
+          return 'mobile'
+        }else {
+          return 'pc'
+        }
+    }
+
+    function setFontSize(device) {
+      var docEl = doc.documentElement;
+      var winWidth = docEl.clientWidth;
+      console.log("setFontSize===",device);
+      if(device === 'mobile'){
+        doc.documentElement.style.fontSize = (winWidth / 750) * 100 + "px";
+      }else{
+        doc.documentElement.style.fontSize =  1 + "px";
+      }
+      
+    }
+    var userAgent = navigator.userAgent;
+    win.addEventListener("resize", function() {
+      if (navigator.userAgent !== userAgent) {
+        location.reload();
+      }
+    });
+    var device = $_getDevice()
+    setFontSize(device);
+  })(window, document);

+ 177 - 0
public/assets/appdown/common/style.css

@@ -0,0 +1,177 @@
+/* http://meyerweb.com/eric/tools/css/reset/ 
+   v2.0 | 20110126
+   License: none (public domain)
+*/
+
+html, body, div, span, applet, object, iframe,
+h1, h2, h3, h4, h5, h6, p, blockquote, pre,
+a, abbr, acronym, address, big, cite, code,
+del, dfn, em, img, ins, kbd, q, s, samp,
+small, strike, strong, sub, sup, tt, var,
+b, u, i, center,
+dl, dt, dd, ol, ul, li,
+fieldset, form, label, legend,
+table, caption, tbody, tfoot, thead, tr, th, td,
+article, aside, canvas, details, embed, 
+figure, figcaption, footer, header, hgroup, 
+menu, nav, output, ruby, section, summary,
+time, mark, audio, video {
+	margin: 0;
+	padding: 0;
+	border: 0;
+	font-size: 100%;
+	font: inherit;
+	vertical-align: baseline;
+	box-sizing: border-box;
+	font-family: Source Han Sans CN;
+}
+
+/* HTML5 display-role reset for older browsers */
+article, aside, details, figcaption, figure, 
+footer, header, hgroup, menu, nav, section {
+	display: block;
+}
+input{
+	/* outline: none;
+	-webkit-appearance: button;
+	-webkit-appearance: none; */
+	border-radius: 0;
+	border:none;
+	padding:0;
+	margin:0;
+	box-sizing: border-box;
+}
+textarea{
+	box-sizing: border-box;
+	resize: none;
+	outline: none;
+	padding:0;
+	margin:0;
+}
+a{
+    text-decoration: none;
+	color: inherit;
+}
+
+body {
+	line-height: 1;
+}
+ol, ul {
+	list-style: none;
+}
+blockquote, q {
+	quotes: none;
+}
+blockquote:before, blockquote:after,
+q:before, q:after {
+	content: '';
+	content: none;
+}
+table {
+	border-collapse: collapse;
+	border-spacing: 0;
+}
+
+.clamp {
+	overflow: hidden;
+	text-overflow: ellipsis;
+	white-space: nowrap;
+	display: block;
+}
+.clamp2 {
+	display: -webkit-box;
+	-webkit-box-orient: vertical;
+	-webkit-line-clamp: 2;
+	overflow: hidden;
+}
+.clamp3 {
+	display: -webkit-box;
+	-webkit-box-orient: vertical;
+	-webkit-line-clamp: 3;
+	overflow: hidden;
+}
+.clamp4 {
+	display: -webkit-box;
+	-webkit-box-orient: vertical;
+	-webkit-line-clamp: 3;
+	overflow: hidden;
+}
+/* 布局 */
+.flex-col {
+    display: flex;
+    flex-direction: column;
+  }
+  .flex-row {
+    display: flex;
+    flex-direction: row;
+  }
+  .justify-start {
+    display: flex;
+    justify-content: flex-start;
+  }
+  .justify-center {
+    display: flex;
+    justify-content: center;
+  }
+  
+  .justify-end {
+    display: flex;
+    justify-content: flex-end;
+  }
+  .justify-evenly {
+    display: flex;
+    justify-content: space-evenly;
+  }
+  .justify-around {
+    display: flex;
+    justify-content: space-around;
+  }
+  .justify-between {
+    display: flex;
+    justify-content: space-between;
+  }
+  .align-start {
+    display: flex;
+    align-items: flex-start;
+  }
+  .align-center {
+    display: flex;
+    align-items: center;
+  }
+  .align-end {
+    display: flex;
+    align-items: flex-end;
+  }
+  .items-start {
+    display: flex;
+    align-items: flex-start;
+  }
+  
+  .items-center {
+    display: flex;
+    align-items: center;
+  }
+  
+  .items-end {
+    display: flex;
+    align-items: flex-end;
+  }
+  .self-start {
+    align-self: flex-start;
+  }
+  
+  .self-end {
+    align-self: flex-end;
+  }
+  
+  .self-center {
+    align-self: center;
+  }
+  
+  .self-baseline {
+    align-self: baseline;
+  }
+  
+  .self-stretch {
+    align-self: stretch;
+  }

File diff suppressed because it is too large
+ 0 - 0
public/assets/appdown/common/sweetalert.min.js


BIN
public/assets/appdown/images/h5_bg.png


BIN
public/assets/appdown/images/h5_logo.png


BIN
public/assets/appdown/images/h5_pic.png


BIN
public/assets/appdown/images/h5en_andr.png


BIN
public/assets/appdown/images/h5en_ios.png


BIN
public/assets/appdown/images/h5zh_andr.png


BIN
public/assets/appdown/images/h5zh_ios.png


BIN
public/assets/appdown/images/pc_bg.png


BIN
public/assets/appdown/images/pc_logo.png


BIN
public/assets/appdown/images/pc_ma.png


BIN
public/assets/appdown/images/pc_pic.png


BIN
public/assets/appdown/images/pcxia_android.png


BIN
public/assets/appdown/images/pcxia_apple.png


Some files were not shown because too many files changed in this diff