wuyongxiang 4 anos atrás
pai
commit
39e5327160
2 arquivos alterados com 6 adições e 2 exclusões
  1. 3 1
      screenAndroid/home.html
  2. 3 1
      screenIos/home.html

+ 3 - 1
screenAndroid/home.html

@@ -226,11 +226,13 @@
 				//如果为Android	
 				const ch = (20 * clientWidth) / (clientheight + 122)
 				console.log("长和宽", clientWidth, clientheight)
+				$('.swiper-slide').css("padding", `20% ${ch}%`)
 			}
 			if (isiOS) {
 				//如果为iOS	
 				const ch = (20 * clientWidth) / (clientheight + 272)
 				console.log("长和宽", clientWidth, clientheight)
+				$('.swiper-slide').css("padding", `20% ${ch}%`)
 			}
 			var html = document.querySelector("html");
 			var clientWidth = html.getBoundingClientRect().width;
@@ -238,7 +240,7 @@
 			html.style.fontSize = clientWidth / 23.4375 + "px";
 			// const ch = (20 * clientWidth) / clientheight
 			// console.log("长和宽", clientWidth, clientheight)
-			$('.swiper-slide').css("padding", `20% ${ch}%`)
+			
 			var app = new Vue({
 				el: '#homeapp',
 				data: {

+ 3 - 1
screenIos/home.html

@@ -219,18 +219,20 @@
 				//如果为Android	
 				const ch = (20 * clientWidth) / (clientheight + 122)
 				console.log("长和宽", clientWidth, clientheight)
+				$('.swiper-slide').css("padding", `20% ${ch}%`)
 			}
 			if (isiOS) {
 				//如果为iOS	
 				const ch = (20 * clientWidth) / (clientheight + 272)
 				console.log("长和宽", clientWidth, clientheight)
+				$('.swiper-slide').css("padding", `20% ${ch}%`)
 			}
 			var html = document.querySelector("html");
 			var clientWidth = html.getBoundingClientRect().width;
 			var clientheight = window.innerHeight;
 			html.style.fontSize = clientWidth / 23.4375 + "px";
 
-			$('.swiper-slide').css("padding", `20% ${ch}%`)
+			// $('.swiper-slide').css("padding", `20% ${ch}%`)
 			// var player = new PCMPlayer({
 			// 	encoding: '16bitInt',
 			// 	channels: 2,