From a05ef386b1952ee272e0d34230497575c7fcbaed Mon Sep 17 00:00:00 2001 From: suwings Date: Fri, 10 Aug 2018 10:16:12 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=20-=20=E5=BC=B9=E7=AA=97?= =?UTF-8?q?=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/common/css/block.css | 9 ++++++++- public/common/js/tools.js | 28 ++++++++++++++++++++++++++++ public/index.html | 7 +++++-- public/template/center.html | 9 ++++++--- 4 files changed, 47 insertions(+), 6 deletions(-) diff --git a/public/common/css/block.css b/public/common/css/block.css index 74dc034f..85eb121f 100644 --- a/public/common/css/block.css +++ b/public/common/css/block.css @@ -284,8 +284,14 @@ right: 0px; bottom: 0px; background-color: #141A1D; - opacity: 0.4; + opacity: 0.6; z-index: 998; + display: none; + transition: opacity 1s; +} + +#balckWarp:hover { + opacity: 0.4; } /* 弹窗CSS */ @@ -295,4 +301,5 @@ top: 45%; right: 45%; z-index: 999; + display: none; } \ No newline at end of file diff --git a/public/common/js/tools.js b/public/common/js/tools.js index b3e122e7..d1a2ba35 100644 --- a/public/common/js/tools.js +++ b/public/common/js/tools.js @@ -160,4 +160,32 @@ return text; } + // 弹窗 + TOOLS.popWind = function (config) { + var popWinContext = $("#PopWinContext"); + MCSERVER.popWindCallback = config.callback || function () {}; //全局的callback变量 + var css = config.style || null; + popWinContext.html("

正在加载信息框,请稍等...

"); + + $(".PopWin").css(css) + .css({ + display: "block" + }); + $("#balckWarp").css({ + display: "block" + }); + popWinContext.load(config.template, function (response, status, xhr) { + if (status != 'success') { + popWinContext.html("信息框加载失败!请保持网络通畅!单击灰色区域关闭!"); + return; + } + }); + } + TOOLS.popWindClose = function (res) { + $(".PopWin").removeAttr("style"); + $("#balckWarp").removeAttr("style"); + //返回结果 + MCSERVER.popWindCallback(res); + } + })(); \ No newline at end of file diff --git a/public/index.html b/public/index.html index ea74786d..8b9065f7 100644 --- a/public/index.html +++ b/public/index.html @@ -148,11 +148,14 @@
信息框
- AAAAAAAAAA +
+ +

正在加载信息框,请稍等...

+
-
+
diff --git a/public/template/center.html b/public/template/center.html index cc7e8ec8..833bd240 100644 --- a/public/template/center.html +++ b/public/template/center.html @@ -184,12 +184,15 @@