Просмотр исходного кода

@CRMAIF_REQ_2534@增加滑块验证演示

yangdingli лет назад: 3
Родитель
Сommit
afa67fffd6

+ 2 - 0
show-server/src/main/resources/server-page.xml

@ -59,6 +59,8 @@
59 59
    <action name="DetectApps" template="template/webapp/plugins/safe/detectApps.html"></action>
60 60
    <!--截屏权限-->
61 61
    <action name="CaptureAuthority" template="template/webapp/plugins/captureAuthority.html"></action>
62
     <!--滑块验证-->
63
    <action name="showSliderVerify" template="template/webapp/plugins/showSliderVerify.html"></action>
62 64
63 65
    <!-- JS组件 -->
64 66
    <action name="Carousel" template="template/webapp/jsComponent/carousel.html"></action>

+ 36 - 0
show-server/src/main/webapp/biz/js/plugins/showSliderVerify.js

@ -0,0 +1,36 @@
1
require(["ipuMobile", "jcl", "jquery", "ipuUI"], function (IpuMobile, Wade, $, ipuUI) {
2
	$(function() {
3
		$(".ipu-btn").click(function(){
4
			var json = {"title":"请完成下方验证",
5
						"startPointX":"0.1",
6
						"startPointY":"0.5",
7
						"endPointX":"0.9",
8
						"endPointY":"0.5",
9
						"tolerance":"5",
10
						"indicatorDuration":"0.5",
11
						"hideDelay":"0.5",
12
						"patternPathType":"0",
13
						"patternShadowColor":"#000000",
14
						"patternShadowOpacity":"0.8",
15
						"patternShadowRadius":"2",
16
						"patternInnerShadowColor":"#ffffff",
17
						"patternInnerShadowOpacity":"0.8",
18
						"patternInnerShadowRadius":"2",
19
						"blankInnerShadowColor":"#000000",
20
						"blankInnerShadowOpacity":"0.8",
21
						"blankInnerShadowRadius":"2"};
22
			var params = [JSON.stringify(json)];
23
			IpuMobile.showSliderVerify(params, function (result) {
24
				console.log(result)
25
				if(result=="true"){
26
					ipuUI.toast("验证成功")
27
				}else{
28
					ipuUI.toast("验证失败")
29
				}
30
			})
31
		})
32
33
34
	});
35
36
});

+ 4 - 0
show-server/src/main/webapp/ipu/frame/mobile/expand-mobile.js

@ -728,6 +728,10 @@ define(["require", "jcl"], function (require, Wade) {
728 728
      } ,chooseFile:function(callback){
729 729
        storageCallback("chooseFile",callback);
730 730
        execute("chooseFile",[]);
731
      }, showSliderVerify: function (params, callback, err) {
732
        // 显示滑块验证
733
        storageCallback("showSliderVerify", callback);
734
        execute("showSliderVerify", [params], err);
731 735
      }
732 736
    };
733 737
  })();

+ 5 - 0
show-server/src/main/webapp/template/webapp/plugins/index-list.html

@ -205,5 +205,10 @@
205 205
			<p>文件选择</p>
206 206
		</li>
207 207
208
		<li data-action="showSliderVerify">
209
			<div class="ipu-icon mdi mdi-flip-h"></div>
210
			<p>滑动验证</p>
211
		</li>
212
208 213
	</ul>
209 214
</div>

+ 53 - 0
show-server/src/main/webapp/template/webapp/plugins/showSliderVerify.html

@ -0,0 +1,53 @@
1
<!DOCTYPE html>
2
<html>
3
<head>
4
<title>滑块验证</title>
5
{%>template/common/Head.html%}
6
<script type="text/javascript" src="biz/js/plugins/showVerify.js"></script>
7
</head>
8
<body>
9
10
<div class="ipu-flex-row ipu-flex-vertical">
11
		<div class="ipu-flex-col">
12
			<header class="ipu-toolbar">
13
				<h1 class="ipu-toolbar-title">滑块验证</h1>
14
				<a class="ipu-fn-left page-back" href="javascript:;"> <i
15
					class="ipu-icon mdi mdi-chevron-left"></i>
16
				</a>
17
			</header>
18
		</div>
19
20
	<div class="ipu-flex-col ipu-flex-col-auto">
21
		<div class="page-content">
22
			<div class="demo-item">
23
				<div class="demo-body">
24
					<div class="ipu-list ipu-list-form">
25
						<ul>
26
							<li class="ipu-list-item">
27
								<div class="ipu-list-item-inner">
28
									<div class="ipu-list-item-label">滑块验证</div>
29
									<div class="ipu-list-item-input-wrap">
30
										<label class="ipu-switch">
31
											<input class="ipu-switch-input" type="checkbox" />
32
										</label>
33
									</div>
34
								</div>
35
							</li>
36
							<li class="ipu-list-item">
37
								<div class="ipu-list-item-inner">
38
									<div class="ipu-list-item-label">显示滑块验证:</div>
39
									<div class="ipu-list-item-input-wrap">
40
										<button class="ipu-btn">显示</button>
41
									</div>
42
								</div>
43
							</li>
44
						</ul>
45
					</div>
46
				</div>
47
			</div>
48
		</div>
49
	</div>
50
	</div>
51
52
</body>
53
</html>