From 3203eaab9072f2d9502d3369b175a907afdac29b Mon Sep 17 00:00:00 2001 From: Weslie0803 Date: Tue, 25 Oct 2022 00:28:06 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=86=E7=AA=97=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 2 ++ index.html | 4 ++-- index.js | 28 +++++++++++++++++++--------- scripts.72999ec6.css | 5 +++-- 4 files changed, 26 insertions(+), 13 deletions(-) diff --git a/.gitignore b/.gitignore index 49c5775..604cd5b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,4 @@ 抽奖软件UI.zip analysis.md +抽奖方案设计3.0(2).pdf +抽奖软件UI/ \ No newline at end of file diff --git a/index.html b/index.html index bb10dba..d2d1d11 100644 --- a/index.html +++ b/index.html @@ -15,7 +15,7 @@ your browser to improve your experience.

-
+
diff --git a/index.js b/index.js index 9a83502..c1f4651 100644 --- a/index.js +++ b/index.js @@ -12,15 +12,25 @@ $(document).ready(function () { const url = new URL(window.location.href); var minNum = 1, maxNum = 999, size = 4, hasBackground = false, cardBackground = false, showMode = 0; - minNum = parseInt(url.searchParams.get("min") || "1"); - maxNum = parseInt(url.searchParams.get("max") || "999"); - if (maxNum<1000) - { - $("#num4").parent().remove(); - $(".col-xs-4").css("width","33.33333333%"); - size=3; - } - else size = 4; + minNum = parseInt(url.searchParams.get("min") || "0"); + maxNum = parseInt(url.searchParams.get("max") || "99"); + if (maxNum<1000) { + $("#num4").parent().remove(); + $(".col-xs-4").css("width","33.33333333%"); + size=3; + if (maxNum < 100) { + $("#num3").parent().remove(); + $(".col-xs-4").css("width", "50%"); + size=2; + if (maxNum<10) { + $("#num2").parent().remove(); + $(".col-xs-4").css("width", "100%"); + $(".container").css("max-width", "400px"); + size=1; + } + } + } + else size = 4; const customBackground = url.searchParams.get("bg_url"); cardBackground = false; showMode = 1; diff --git a/scripts.72999ec6.css b/scripts.72999ec6.css index c062b8a..3deea14 100644 --- a/scripts.72999ec6.css +++ b/scripts.72999ec6.css @@ -794,7 +794,7 @@ body { } .showNum { - height: 200px; + height: 400px; border: 1px solid #fff; border-radius: 12px; box-sizing: border-box; @@ -810,7 +810,8 @@ body { .row { margin-right: 0; - margin-left: 0 + margin-left: 0; + margin-top: 15% } body {