Browse Source

修改

master
liaoxinyu 2 months ago
parent
commit
d8bbb9ce24
  1. BIN
      src/assets/img/home/qrcode.png
  2. 2
      src/index.html
  3. 13
      static/SliderCaptcha/.gitee/ISSUE_TEMPLATE.zh-CN.md
  4. 15
      static/SliderCaptcha/.gitee/PULL_REQUEST_TEMPLATE.zh-CN.md
  5. 341
      static/SliderCaptcha/.gitignore
  6. 19
      static/SliderCaptcha/.issuetracker
  7. 191
      static/SliderCaptcha/LICENSE
  8. 230
      static/SliderCaptcha/README.md
  9. 241
      static/SliderCaptcha/README.zh-CN.md
  10. 336
      static/SliderCaptcha/src/disk/longbow.slidercaptcha.js
  11. 137
      static/SliderCaptcha/src/disk/slidercaptcha.css
  12. BIN
      static/SliderCaptcha/src/images/Pic0.jpg
  13. BIN
      static/SliderCaptcha/src/images/Pic1.jpg
  14. BIN
      static/SliderCaptcha/src/images/Pic2.jpg
  15. BIN
      static/SliderCaptcha/src/images/Pic3.jpg
  16. BIN
      static/SliderCaptcha/src/images/Pic4.jpg
  17. BIN
      static/SliderCaptcha/src/imgs/anniu.png
  18. 23
      static/SliderCaptcha/src/imgs/hongse.svg
  19. 15
      static/SliderCaptcha/src/imgs/icon-close.svg
  20. 15
      static/SliderCaptcha/src/imgs/icon-refresh.svg
  21. BIN
      static/SliderCaptcha/src/imgs/loading.png
  22. BIN
      static/SliderCaptcha/src/imgs/loading@2x.png
  23. 21
      static/SliderCaptcha/src/imgs/lvse.svg
  24. BIN
      static/SliderCaptcha/src/imgs/slice1.png
  25. BIN
      static/SliderCaptcha/src/imgs/slice1@2x.jpg
  26. BIN
      static/SliderCaptcha/src/imgs/slice1@2x.png
  27. BIN
      static/SliderCaptcha/src/imgs/slice2.png
  28. BIN
      static/SliderCaptcha/src/imgs/slice2@2x.jpg
  29. BIN
      static/SliderCaptcha/src/imgs/slice2@2x.png
  30. BIN
      static/SliderCaptcha/src/imgs/slice3.png
  31. BIN
      static/SliderCaptcha/src/imgs/slice3@2x.jpg
  32. BIN
      static/SliderCaptcha/src/imgs/slice3@2x.png
  33. BIN
      static/SliderCaptcha/src/imgs/slice4.png
  34. BIN
      static/SliderCaptcha/src/imgs/slice4@2x.jpg
  35. BIN
      static/SliderCaptcha/src/imgs/slice4@2x.png
  36. BIN
      static/SliderCaptcha/src/imgs/slice5.png
  37. BIN
      static/SliderCaptcha/src/imgs/slice5@2x.jpg
  38. BIN
      static/SliderCaptcha/src/imgs/slice5@2x.png
  39. 23
      static/SliderCaptcha/src/imgs/zise.svg
  40. 19
      static/SliderCaptcha/src/imgs/zise2.svg
  41. 122
      static/SliderCaptcha/src/index.css
  42. 110
      static/SliderCaptcha/src/index.html
  43. 2337
      static/SliderCaptcha/src/lib/font-awesome/css/font-awesome.css
  44. 7
      static/SliderCaptcha/src/lib/font-awesome/css/font-awesome.css.map
  45. 4
      static/SliderCaptcha/src/lib/font-awesome/css/font-awesome.min.css
  46. BIN
      static/SliderCaptcha/src/lib/font-awesome/fonts/FontAwesome.otf
  47. BIN
      static/SliderCaptcha/src/lib/font-awesome/fonts/fontawesome-webfont.eot
  48. 2671
      static/SliderCaptcha/src/lib/font-awesome/fonts/fontawesome-webfont.svg
  49. BIN
      static/SliderCaptcha/src/lib/font-awesome/fonts/fontawesome-webfont.ttf
  50. BIN
      static/SliderCaptcha/src/lib/font-awesome/fonts/fontawesome-webfont.woff
  51. BIN
      static/SliderCaptcha/src/lib/font-awesome/fonts/fontawesome-webfont.woff2
  52. 10364
      static/SliderCaptcha/src/lib/jquery/jquery.js
  53. 2
      static/SliderCaptcha/src/lib/jquery/jquery.min.js
  54. 1
      static/SliderCaptcha/src/lib/jquery/jquery.min.map
  55. 10038
      static/SliderCaptcha/src/lib/twitter-bootstrap/css/bootstrap.css
  56. 1
      static/SliderCaptcha/src/lib/twitter-bootstrap/css/bootstrap.css.map
  57. 10341
      static/SliderCaptcha/src/lib/twitter-bootstrap/css/bootstrap.min.css
  58. 1
      static/SliderCaptcha/src/lib/twitter-bootstrap/css/bootstrap.min.css.map
  59. 7013
      static/SliderCaptcha/src/lib/twitter-bootstrap/js/bootstrap.bundle.js
  60. 1
      static/SliderCaptcha/src/lib/twitter-bootstrap/js/bootstrap.bundle.js.map
  61. 7
      static/SliderCaptcha/src/lib/twitter-bootstrap/js/bootstrap.bundle.min.js
  62. 1
      static/SliderCaptcha/src/lib/twitter-bootstrap/js/bootstrap.bundle.min.js.map
  63. 69
      static/SliderCaptcha/src/指南.html

BIN
src/assets/img/home/qrcode.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

2
src/index.html

@ -22,7 +22,7 @@
for (var i = 0; i < mobileAgent.length; i++) {
if (browser.indexOf(mobileAgent[i]) != -1) {
//todo 手机版跳转
window.location.href = 'https://app.litexcoin.com';
window.location.href = 'https://app.litexcoins.com';
break;
}
}

13
static/SliderCaptcha/.gitee/ISSUE_TEMPLATE.zh-CN.md

@ -1,13 +0,0 @@
### 该问题是怎么引起的?
### 重现步骤
### 报错信息

15
static/SliderCaptcha/.gitee/PULL_REQUEST_TEMPLATE.zh-CN.md

@ -1,15 +0,0 @@
### 相关的Issue
### 原因(目的、决解的问题等)
### 描述(做了什么,变更了什么)
### 测试用例

341
static/SliderCaptcha/.gitignore

@ -1,341 +0,0 @@
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
##
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
# User-specific files
*.rsuser
*.suo
*.user
*.userosscache
*.sln.docstates
# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs
# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
x86/
[Aa][Rr][Mm]/
[Aa][Rr][Mm]64/
bld/
[Bb]in/
[Oo]bj/
[Ll]og/
# Visual Studio 2015/2017 cache/options directory
.vs/
# Uncomment if you have tasks that create the project's static files in wwwroot
#wwwroot/
# Visual Studio 2017 auto generated files
Generated\ Files/
# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*
# NUNIT
*.VisualState.xml
TestResult.xml
# Build Results of an ATL Project
[Dd]ebugPS/
[Rr]eleasePS/
dlldata.c
# Benchmark Results
BenchmarkDotNet.Artifacts/
# .NET Core
project.lock.json
project.fragment.lock.json
artifacts/
# StyleCop
StyleCopReport.xml
# Files built by Visual Studio
*_i.c
*_p.c
*_h.h
*.ilk
*.meta
*.obj
*.iobj
*.pch
*.pdb
*.ipdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*_wpftmp.csproj
*.log
*.vspscc
*.vssscc
.builds
*.pidb
*.svclog
*.scc
# Chutzpah Test files
_Chutzpah*
# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opendb
*.opensdf
*.sdf
*.cachefile
*.VC.db
*.VC.VC.opendb
# Visual Studio profiler
*.psess
*.vsp
*.vspx
*.sap
# Visual Studio Trace Files
*.e2e
# TFS 2012 Local Workspace
$tf/
# Guidance Automation Toolkit
*.gpState
# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper
*.DotSettings.user
# JustCode is a .NET coding add-in
.JustCode
# TeamCity is a build add-in
_TeamCity*
# DotCover is a Code Coverage Tool
*.dotCover
# AxoCover is a Code Coverage Tool
.axoCover/*
!.axoCover/settings.json
# Visual Studio code coverage results
*.coverage
*.coveragexml
# NCrunch
_NCrunch_*
.*crunch*.local.xml
nCrunchTemp_*
# MightyMoose
*.mm.*
AutoTest.Net/
# Web workbench (sass)
.sass-cache/
# Installshield output folder
[Ee]xpress/
# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html
# Click-Once directory
publish/
# Publish Web Output
*.[Pp]ublish.xml
*.azurePubxml
# Note: Comment the next line if you want to checkin your web deploy settings,
# but database connection strings (with potential passwords) will be unencrypted
*.pubxml
*.publishproj
# Microsoft Azure Web App publish settings. Comment the next line if you want to
# checkin your Azure Web App publish settings, but sensitive information contained
# in these scripts will be unencrypted
PublishScripts/
# NuGet Packages
*.nupkg
# The packages folder can be ignored because of Package Restore
**/[Pp]ackages/*
# except build/, which is used as an MSBuild target.
!**/[Pp]ackages/build/
# Uncomment if necessary however generally it will be regenerated when needed
#!**/[Pp]ackages/repositories.config
# NuGet v3's project.json files produces more ignorable files
*.nuget.props
*.nuget.targets
# Microsoft Azure Build Output
csx/
*.build.csdef
# Microsoft Azure Emulator
ecf/
rcf/
# Windows Store app package directories and files
AppPackages/
BundleArtifacts/
Package.StoreAssociation.xml
_pkginfo.txt
*.appx
# Visual Studio cache files
# files ending in .cache can be ignored
*.[Cc]ache
# but keep track of directories ending in .cache
!?*.[Cc]ache/
# Others
ClientBin/
~$*
*~
*.dbmdl
*.dbproj.schemaview
*.jfm
*.pfx
*.publishsettings
orleans.codegen.cs
# Including strong name files can present a security risk
# (https://github.com/github/gitignore/pull/2483#issue-259490424)
#*.snk
# Since there are multiple workflows, uncomment next line to ignore bower_components
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
#bower_components/
# ASP.NET Core default setup: bower directory is configured as wwwroot/lib/ and bower restore is true
**/wwwroot/lib/
# RIA/Silverlight projects
Generated_Code/
# Backup & report files from converting an old project file
# to a newer Visual Studio version. Backup files are not needed,
# because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm
ServiceFabricBackup/
*.rptproj.bak
# SQL Server files
*.mdf
*.ldf
*.ndf
# Business Intelligence projects
*.rdl.data
*.bim.layout
*.bim_*.settings
*.rptproj.rsuser
# Microsoft Fakes
FakesAssemblies/
# GhostDoc plugin setting file
*.GhostDoc.xml
# Node.js Tools for Visual Studio
.ntvs_analysis.dat
node_modules/
# Visual Studio 6 build log
*.plg
# Visual Studio 6 workspace options file
*.opt
# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
*.vbw
# Visual Studio LightSwitch build output
**/*.HTMLClient/GeneratedArtifacts
**/*.DesktopClient/GeneratedArtifacts
**/*.DesktopClient/ModelManifest.xml
**/*.Server/GeneratedArtifacts
**/*.Server/ModelManifest.xml
_Pvt_Extensions
# Paket dependency manager
.paket/paket.exe
paket-files/
# FAKE - F# Make
.fake/
# JetBrains Rider
.idea/
*.sln.iml
# CodeRush personal settings
.cr/personal
# Python Tools for Visual Studio (PTVS)
__pycache__/
*.pyc
# Cake - Uncomment if you are using it
# tools/**
# !tools/packages.config
# Tabs Studio
*.tss
# Telerik's JustMock configuration file
*.jmconfig
# BizTalk build output
*.btp.cs
*.btm.cs
*.odx.cs
*.xsd.cs
# OpenCover UI analysis results
OpenCover/
# Azure Stream Analytics local run output
ASALocalRun/
# MSBuild Binary and Structured Log
*.binlog
# NVidia Nsight GPU debugger configuration file
*.nvuser
# MFractors (Xamarin productivity tool) working folder
.mfractor/
# Local History for Visual Studio
.localhistory/
# BeatPulse healthcheck temp database
healthchecksdb

19
static/SliderCaptcha/.issuetracker

@ -1,19 +0,0 @@
# Integration with Issue Tracker
#
# (note that '\' need to be escaped).
[issuetracker "Gitee-Issue"]
regex = "#((?!.*Issue|issue|Comme|comme).{5})"
url = "https://gitee.com/LongbowEnterprise/BootstrapAdmin/issues/$1?from=project-issue"
[issuetracker "Gitee-Url"]
regex = "([a-zA-z]+://[^\\s]*)"
url = "$1"
[issuetracker "Gitee-Commit"]
regex = "[C|c]ommit:([^\\s]*)"
url = "https://gitee.com/LongbowEnterprise/BootstrapAdmin/commit/$1"
[issuetracker "Gitee-PR"]
regex = "!([\\d]+)"
url = "https://gitee.com/LongbowEnterprise/BootstrapAdmin/pulls/$1"

191
static/SliderCaptcha/LICENSE

@ -1,191 +0,0 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction, and
distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by the copyright
owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all other entities
that control, are controlled by, or are under common control with that entity.
For the purposes of this definition, "control" means (i) the power, direct or
indirect, to cause the direction or management of such entity, whether by
contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity exercising
permissions granted by this License.
"Source" form shall mean the preferred form for making modifications, including
but not limited to software source code, documentation source, and configuration
files.
"Object" form shall mean any form resulting from mechanical transformation or
translation of a Source form, including but not limited to compiled object code,
generated documentation, and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or Object form, made
available under the License, as indicated by a copyright notice that is included
in or attached to the work (an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object form, that
is based on (or derived from) the Work and for which the editorial revisions,
annotations, elaborations, or other modifications represent, as a whole, an
original work of authorship. For the purposes of this License, Derivative Works
shall not include works that remain separable from, or merely link (or bind by
name) to the interfaces of, the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including the original version
of the Work and any modifications or additions to that Work or Derivative Works
thereof, that is intentionally submitted to Licensor for inclusion in the Work
by the copyright owner or by an individual or Legal Entity authorized to submit
on behalf of the copyright owner. For the purposes of this definition,
"submitted" means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems, and
issue tracking systems that are managed by, or on behalf of, the Licensor for
the purpose of discussing and improving the Work, but excluding communication
that is conspicuously marked or otherwise designated in writing by the copyright
owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity on behalf
of whom a Contribution has been received by Licensor and subsequently
incorporated within the Work.
2. Grant of Copyright License.
Subject to the terms and conditions of this License, each Contributor hereby
grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free,
irrevocable copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the Work and such
Derivative Works in Source or Object form.
3. Grant of Patent License.
Subject to the terms and conditions of this License, each Contributor hereby
grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free,
irrevocable (except as stated in this section) patent license to make, have
made, use, offer to sell, sell, import, and otherwise transfer the Work, where
such license applies only to those patent claims licensable by such Contributor
that are necessarily infringed by their Contribution(s) alone or by combination
of their Contribution(s) with the Work to which such Contribution(s) was
submitted. If You institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work or a
Contribution incorporated within the Work constitutes direct or contributory
patent infringement, then any patent licenses granted to You under this License
for that Work shall terminate as of the date such litigation is filed.
4. Redistribution.
You may reproduce and distribute copies of the Work or Derivative Works thereof
in any medium, with or without modifications, and in Source or Object form,
provided that You meet the following conditions:
You must give any other recipients of the Work or Derivative Works a copy of
this License; and
You must cause any modified files to carry prominent notices stating that You
changed the files; and
You must retain, in the Source form of any Derivative Works that You distribute,
all copyright, patent, trademark, and attribution notices from the Source form
of the Work, excluding those notices that do not pertain to any part of the
Derivative Works; and
If the Work includes a "NOTICE" text file as part of its distribution, then any
Derivative Works that You distribute must include a readable copy of the
attribution notices contained within such NOTICE file, excluding those notices
that do not pertain to any part of the Derivative Works, in at least one of the
following places: within a NOTICE text file distributed as part of the
Derivative Works; within the Source form or documentation, if provided along
with the Derivative Works; or, within a display generated by the Derivative
Works, if and wherever such third-party notices normally appear. The contents of
the NOTICE file are for informational purposes only and do not modify the
License. You may add Your own attribution notices within Derivative Works that
You distribute, alongside or as an addendum to the NOTICE text from the Work,
provided that such additional attribution notices cannot be construed as
modifying the License.
You may add Your own copyright statement to Your modifications and may provide
additional or different license terms and conditions for use, reproduction, or
distribution of Your modifications, or for any such Derivative Works as a whole,
provided Your use, reproduction, and distribution of the Work otherwise complies
with the conditions stated in this License.
5. Submission of Contributions.
Unless You explicitly state otherwise, any Contribution intentionally submitted
for inclusion in the Work by You to the Licensor shall be under the terms and
conditions of this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify the terms of
any separate license agreement you may have executed with Licensor regarding
such Contributions.
6. Trademarks.
This License does not grant permission to use the trade names, trademarks,
service marks, or product names of the Licensor, except as required for
reasonable and customary use in describing the origin of the Work and
reproducing the content of the NOTICE file.
7. Disclaimer of Warranty.
Unless required by applicable law or agreed to in writing, Licensor provides the
Work (and each Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied,
including, without limitation, any warranties or conditions of TITLE,
NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are
solely responsible for determining the appropriateness of using or
redistributing the Work and assume any risks associated with Your exercise of
permissions under this License.
8. Limitation of Liability.
In no event and under no legal theory, whether in tort (including negligence),
contract, or otherwise, unless required by applicable law (such as deliberate
and grossly negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special, incidental,
or consequential damages of any character arising as a result of this License or
out of the use or inability to use the Work (including but not limited to
damages for loss of goodwill, work stoppage, computer failure or malfunction, or
any and all other commercial damages or losses), even if such Contributor has
been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability.
While redistributing the Work or Derivative Works thereof, You may choose to
offer, and charge a fee for, acceptance of support, warranty, indemnity, or
other liability obligations and/or rights consistent with this License. However,
in accepting such obligations, You may act only on Your own behalf and on Your
sole responsibility, not on behalf of any other Contributor, and only if You
agree to indemnify, defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason of your
accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work
To apply the Apache License to your work, attach the following boilerplate
notice, with the fields enclosed by brackets "{}" replaced with your own
identifying information. (Don't include the brackets!) The text should be
enclosed in the appropriate comment syntax for the file format. We also
recommend that a file or class name and description of purpose be included on
the same "printed page" as the copyright notice for easier identification within
third-party archives.
Copyright 2019 LaoGanDie
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

230
static/SliderCaptcha/README.md

@ -1,230 +0,0 @@
## Slider Captcha
<span>English</span> | <a href="README.zh-CN.md">中文</a>
---
The user completes the verification by dragging the slider to support the PC and mobile terminals. The time, accuracy and sliding trajectory information of user dragging behavior can be sent to the server, and then the background algorithm verification can be carried out.
## Online Demonstration
Single page presentation: http://longbowenterprise.gitee.io/slidercaptcha/
In-Project Demonstration: https://argo.zylweb.cn/ (Open source Admin Control Pannel [[BootstrapAdmin](https://github.com/ArgoZhang/BootstrapAdmin)])
**Slide captcha appears for the fourth time after three times of incorrect password input**
## Screenshot
![输入图片说明](https://images.gitee.com/uploads/images/2019/0316/003740_c5175e6b_554725.png "SliderCaptcha.png")
![输入图片说明](https://gitee.com/uploads/images/2019/0410/124955_f9b6d54c_554725.png "Untitled.png")
## Quick Start
### Dependencies
jQuery bootstrap font-awesome
### CSS
```html
<link href="https://cdn.bootcss.com/twitter-bootstrap/4.3.1/css/bootstrap.min.css">
<link href="https://cdn.bootcss.com/font-awesome/5.7.2/css/all.min.css">
<link href="./src/slidercaptcha.css">
```
Copy-paste the stylesheet `<link>` into your `<head>` before all other stylesheets to load our CSS.
### JS
```html
<script src="https://cdn.bootcss.com/jquery/3.3.1/jquery.min.js"></script>
<script src="./src/longbow.slidercaptcha.js"></script>
```
Place the following `<script>`s near the end of your pages, right before the closing `</body>` tag, to enable them.
## Usage
```html
<div id="captcha"></div>
```
## API
### JavaScript behavior
```html
<div id="captcha"></div>
<script>
$('#captcha').sliderCaptcha();
</script>
```
### Options
```html
<div id="captcha"></div>
<script>
$('#captcha').sliderCaptcha({
width: 280,
height: 150,
sliderL: 42,
sliderR: 9,
offset: 5,
loadingText: 'Loading...',
failedText: 'Try again',
barText: 'Slide right to fill',
repeatIcon: 'fa fa-redo',
setSrc: function () {
},
onSuccess: function () {
},
onFail: function () {
},
onRefresh: function () {
}
});
</script>
```
Name | Type | Default | Description |
---|---|---|---
width | integer | 280 | Background picture width
height | integer | 150 | Background picture height
sliderL | integer | 42 | Puzzle Width
sliderR | integer | 9 | Puzzle Outburst Radius
offset | integer | 5 | Validation of error tolerance deviation. default 5px
loadingText | string | "Loading..." | Text information displayed when images are loaded
failedText | string | "Try again" | Text information displayed when validation fails
barText | integer | "Slide right to fill" | Text information displayed when dragging the slider to prepare for dragging
repeatIcon | string | "fa fa-redo" | Reload icons. dependent on `font-awesome`
setSrc | function | "https://picsum.photos/?image=random" | Setting the Picture Loading Path
onSuccess | function | *null* | Callback this function when validation passes
onFail | function | *null* | Callback this function when validation fails
onRefresh | function | *null* | Callback this function when click on the reload icon
localImages | function | function () { return 'images/Pic' + Math.round(Math.random() * 4) + '.jpg'; } | Call this function when the image loading fails
### Methods
```html
<div id="captcha"></div>
<script>
$('#captcha').sliderCaptcha();
$('#captcha').sliderCaptcha('reset');
</script>
```
Method | Example | Description
---|---|---
reset | $('#captcha').sliderCaptcha('reset') | reset
## Events
None
## Issue
Please go to [Issue](../../issues) page to create issue
## Verify On Server Side
### Client Code Example
#### 1. JavaScript
```js
verify: function (arr, url) {
var ret = false;
$.ajax({
url: url,
data: JSON.stringify(arr),
async: false,
cache: false,
type: 'POST',
contentType: 'application/json',
dataType: 'json',
success: function (result) {
ret = result;
}
});
return ret;
}
```
Parameter | Type | Default | Descript |
---|---|---|---
arr | array | object | trails of user dragging slider |
url | string | remoteUrl | option.remoteUrl |
sample code
```js
$('#captcha').sliderCaptcha({
repeatIcon: 'fa fa-redo',
setSrc: function () {
return 'https://imgs.sdgxgz.com/images/Pic' + Math.round(Math.random() * 136) + '.jpg';
},
onSuccess: function () {
window.location.href = 'https://gitee.com/LongbowEnterprise/SliderCaptcha';
},
remoteUrl: "api/Captcha"
});
```
### Server Code Example
#### 1. NETCore WebApi
```csharp
/// <summary>
/// slider verify web api
/// </summary>
[Route("api/[controller]")]
[ApiController]
[AllowAnonymous]
public class CaptchaController : ControllerBase
{
/// <summary>
/// 服务器端滑块验证方法
/// </summary>
/// <returns></returns>
[HttpPost]
public bool Post([FromBody]List<int> datas)
{
var sum = datas.Sum();
var avg = sum * 1.0 / datas.Count;
var stddev = datas.Select(v => Math.Pow(v - avg, 2)).Sum() / datas.Count;
return stddev != 0;
}
}
```
#### 2. JAVA SpringBoot
You may have precision problems, but you can use BigDecimal optimization
```java
@RestController
@RequestMapping("/sliderCaptcha")
public class SliderCaptchaController {
@PostMapping("/isVerify")
public boolean isVerify(List<Integer> datas) {
int sum = 0;
for (Integer data : datas) {
sum += data;
}
double avg = sum * 1.0 / datas.size();
double sum2 = 0.0;
for (Integer data : datas) {
sum2 += Math.pow(data - avg, 2);
}
double stddev = sum2 / datas.size();
return stddev != 0;
}
}
```
## Q&A
[linked issue](https://gitee.com/LongbowEnterprise/SliderCaptcha/issues/I110MF?from=project-issue)
## Contribution
1. Fork this project
2. Create new Feat_xxx branch
3. Commit
4. Create Pull Request

241
static/SliderCaptcha/README.zh-CN.md

@ -1,241 +0,0 @@
## 滑块式验证码
<a href="README.md">English</a> | <span>中文</span>
---
用户通过拖动滑块行为来完成校验,支持PC端及移动端。可以将用户拖动行为的时间、精度,滑动轨迹等信息到服务器,然后进行后台算法验证。
## 在线演示
单页面演示:http://longbowenterprise.gitee.io/slidercaptcha/
项目内演示:http://ba.sdgxgz.com/ (本项目为开源后台管理框架 [[BootstrapAdmin](https://gitee.com/LongbowEnterprise/BootstrapAdmin)])
**输入三次错误密码后第四次出现滑块式行为验证码**
## 效果图
![输入图片说明](https://images.gitee.com/uploads/images/2019/0316/003740_c5175e6b_554725.png "SliderCaptcha.png")
![输入图片说明](https://gitee.com/uploads/images/2019/0410/124955_f9b6d54c_554725.png "Untitled.png")
## 快速开始
### 组件依赖 jQuery bootstrap font-awesome
### CSS
```html
<link href="https://cdn.bootcss.com/twitter-bootstrap/4.3.1/css/bootstrap.min.css">
<link href="https://cdn.bootcss.com/font-awesome/5.7.2/css/all.min.css">
<link href="./src/slidercaptcha.css">
```
将引入样式表的 &lt;link&gt; 标签复制并粘贴到 &lt;head&gt; 中,并放在所有其他样式表之前。
### JS
```html
<script src="https://cdn.bootcss.com/jquery/3.3.1/jquery.min.js"></script>
<script src="./src/longbow.slidercaptcha.js"></script>
```
将引入脚本的 &lt;script&gt; 标签复制并粘贴到 &lt;body&gt; 最后面。
## 用法
添加网页Html元素
```html
<div id="captcha"></div>
```
## API
### 通过 javascript 初始化控件
```html
<div id="captcha"></div>
<script>
$('#captcha').sliderCaptcha();
</script>
```
### Options
可以根据自己需要设置宽度与高度等配置
```html
<div id="captcha"></div>
<script>
$('#captcha').sliderCaptcha({
width: 280,
height: 150,
sliderL: 42,
sliderR: 9,
offset: 5,
loadingText: '正在加载中...',
failedText: '再试一次',
barText: '向右滑动填充拼图',
repeatIcon: 'fa fa-redo',
setSrc: function () {
},
onSuccess: function () {
},
onFail: function () {
},
onRefresh: function () {
}
});
</script>
```
名称 | 类型 | 默认值 | 说明 |
---|---|---|---
width | integer | 280 | 背景图片宽度
height | integer | 150 | 背景图标高度
sliderL | integer | 42 | 拼图宽度
sliderR | integer | 9 | 拼图突出半径
offset | integer | 5 | 验证容错偏差值 默认5个像素偏差即认为验证通过
loadingText | string | "正在加载中..." | 图片加载时显示的文本信息
failedText | string | "再试一次" | 验证失败时显示的文本信息
barText | integer | "向右滑动填充拼图" | 拖动滑块准备拖动时显示的文本信息
repeatIcon | string | "fa fa-redo" | 重新加载图标 需引用 font-awesome
setSrc | function | "https://picsum.photos/?image=random" | 设置图片加载路径
onSuccess | function | *null* | 验证通过时回调此函数
onFail | function | *null* | 验证失败时回调此函数
onRefresh | function | *null* | 点击重新加载图标时回调此函数
localImages | function | function () { return 'images/Pic' + Math.round(Math.random() * 4) + '.jpg'; } | 图床图片加载失败时调用此方法返回本地图片路径
remoteUrl | string | null | 服务器端验证请求地址,请求方式默认为 post 方式
verify | function | function (arr, url) { return true; } | 服务器端验证方法 arr 为客户端拖动滑块轨迹,url 为服务器端请求地址,返回值为布尔值
### 方法
```html
<div id="captcha"></div>
<script>
$('#captcha').sliderCaptcha();
$('#captcha').sliderCaptcha('reset');
</script>
```
Method | Example | Description
---|---|---
reset | $('#captcha').sliderCaptcha('reset') | 重置控件
## 事件
## Issue
请前往 [Issue](../../issues) 页面添加问题
## 服务器端认证
### 客户端代码示例
#### 1. JavaScript
控件配置信息中有 remoteUrl 和 verify 两个配置项,合理正确的设置这两个配置项即可达到想要的服务器端认证逻辑
remoteUrl 默认值为 null 表示未启用服务器端认证方式,设置请求的 webapi 地址后启用服务器端认证方法
控件默认请求服务器端方法如下,可适当进行更改
```js
verify: function (arr, url) {
var ret = false;
$.ajax({
url: url,
data: JSON.stringify(arr),
async: false,
cache: false,
type: 'POST',
contentType: 'application/json',
dataType: 'json',
success: function (result) {
ret = result;
}
});
return ret;
}
```
参数 | 类型 | 默认值 | 说明 |
---|---|---|---
arr | array | object | 客户端拖动滑块轨迹数组 |
url | string | remoteUrl | 配置项中的 remoteUrl 参数值 |
完整示例代码
```js
$('#captcha').sliderCaptcha({
repeatIcon: 'fa fa-redo',
setSrc: function () {
return 'https://imgs.sdgxgz.com/images/Pic' + Math.round(Math.random() * 136) + '.jpg';
},
onSuccess: function () {
window.location.href = 'https://gitee.com/LongbowEnterprise/SliderCaptcha';
},
remoteUrl: "api/Captcha"
});
```
### 服务器端代码示例
#### 1. NETCore WebApi
```csharp
/// <summary>
/// 滑块服务器端验证方法
/// </summary>
[Route("api/[controller]")]
[ApiController]
[AllowAnonymous]
public class CaptchaController : ControllerBase
{
/// <summary>
/// 服务器端滑块验证方法
/// </summary>
/// <returns></returns>
[HttpPost]
public bool Post([FromBody]List<int> datas)
{
var sum = datas.Sum();
var avg = sum * 1.0 / datas.Count;
var stddev = datas.Select(v => Math.Pow(v - avg, 2)).Sum() / datas.Count;
return stddev != 0;
}
}
```
#### 2. JAVA SpringBoot
可能会存在精度问题,采用BigDecimal计算即可
```java
@RestController
@RequestMapping("/sliderCaptcha")
public class SliderCaptchaController {
@PostMapping("/isVerify")
public boolean isVerify(List<Integer> datas) {
int sum = 0;
for (Integer data : datas) {
sum += data;
}
double avg = sum * 1.0 / datas.size();
double sum2 = 0.0;
for (Integer data : datas) {
sum2 += Math.pow(data - avg, 2);
}
double stddev = sum2 / datas.size();
return stddev != 0;
}
}
```
## 常见问题
### 服务端验证的返回结果怎么一直都是true
示例代码中演示的是前端提交用户滑动轨迹到服务器端进行了 Y 轴的平方差校验,为零时才返回 false,否则返回 true,为 true 表示 Y 轴有偏移,简单的认为此操作是人为操作,因为人手拖动过程中的抖动 Y 轴理论上是不可能没有偏移的。因此依据此值进行是否是人为拖动滑块。
[相关问题](https://gitee.com/LongbowEnterprise/SliderCaptcha/issues/I110MF?from=project-issue)
## 参与贡献
1. Fork 本项目
2. 新建 Feat_xxx 分支
3. 提交代码
4. 新建 Pull Request

336
static/SliderCaptcha/src/disk/longbow.slidercaptcha.js

@ -1,336 +0,0 @@
(function ($) {
'use strict';
var SliderCaptcha = function (element, options) {
this.$element = $(element);
this.options = $.extend({}, SliderCaptcha.DEFAULTS, options);
this.$element.css({ 'position': 'relative' });
this.init();
};
SliderCaptcha.VERSION = '1.0';
SliderCaptcha.Author = 'argo@163.com';
SliderCaptcha.DEFAULTS = {
debug: false,
width: 280, // canvas宽度
height: 155, // canvas高度
PI: Math.PI,
sliderL: 42, // 滑块边长
sliderR: 9, // 滑块半径
offset: 5, // 容错偏差
loadingText: '正在加载中...',
failedText: '再试一次',
successText: '验证通过',
barText: '向右滑动填充拼图',
repeatIcon: 'fa fa-repeat',
maxLoadCount: 3,
localImages: function () {
return 'images/Pic' + Math.round(Math.random() * 4) + '.jpg';
},
verify: function (arr, url) {
var ret = false;
$.ajax({
url: url,
data: JSON.stringify(arr),
async: false,
cache: false,
type: 'POST',
contentType: 'application/json',
dataType: 'json',
success: function (result) {
ret = result;
}
});
return ret;
},
remoteUrl: null
};
function Plugin(option) {
return this.each(function () {
var $this = $(this);
var data = $this.data('lgb.SliderCaptcha');
var options = typeof option === 'object' && option;
if (data && !/reset/.test(option)) return;
if (!data) $this.data('lgb.SliderCaptcha', data = new SliderCaptcha(this, options));
if (typeof option === 'string') data[option]();
});
}
$.fn.sliderCaptcha = Plugin;
$.fn.sliderCaptcha.Constructor = SliderCaptcha;
var _proto = SliderCaptcha.prototype;
_proto.init = function () {
this.initDOM();
this.initImg();
this.bindEvents();
};
_proto.initDOM = function () {
var createElement = function (tagName, className) {
var elment = document.createElement(tagName);
elment.className = className;
return elment;
};
var createCanvas = function (width, height) {
var canvas = document.createElement('canvas');
canvas.width = width;
canvas.height = height;
return canvas;
};
var canvas = createCanvas(this.options.width - 2, this.options.height); // 画布
var block = canvas.cloneNode(true); // 滑块
var sliderContainer = createElement('div', 'sliderContainer');
var refreshIcon = createElement('i', 'refreshIcon ' + this.options.repeatIcon);
var sliderMask = createElement('div', 'sliderMask');
var sliderbg = createElement('div', 'sliderbg');
var slider = createElement('div', 'slider');
var sliderIcon = createElement('i', 'fa fa-arrow-right sliderIcon');
var text = createElement('span', 'sliderText');
block.className = 'block';
text.innerHTML = this.options.barText;
var el = this.$element;
el.append($(canvas));
el.append($(refreshIcon));
el.append($(block));
slider.appendChild(sliderIcon);
sliderMask.appendChild(slider);
sliderContainer.appendChild(sliderbg);
sliderContainer.appendChild(sliderMask);
sliderContainer.appendChild(text);
el.append($(sliderContainer));
var _canvas = {
canvas: canvas,
block: block,
sliderContainer: $(sliderContainer),
refreshIcon: refreshIcon,
slider: slider,
sliderMask: sliderMask,
sliderIcon: sliderIcon,
text: $(text),
canvasCtx: canvas.getContext('2d'),
blockCtx: block.getContext('2d')
};
if ($.isFunction(Object.assign)) {
Object.assign(this, _canvas);
}
else {
$.extend(this, _canvas);
}
};
_proto.initImg = function () {
var that = this;
var isIE = window.navigator.userAgent.indexOf('Trident') > -1;
var L = this.options.sliderL + this.options.sliderR * 2 + 3; // 滑块实际边长
var drawImg = function (ctx, operation) {
var l = that.options.sliderL;
var r = that.options.sliderR;
var PI = that.options.PI;
var x = that.x;
var y = that.y;
ctx.beginPath();
ctx.moveTo(x, y);
ctx.arc(x + l / 2, y - r + 2, r, 0.72 * PI, 2.26 * PI);
ctx.lineTo(x + l, y);
ctx.arc(x + l + r - 2, y + l / 2, r, 1.21 * PI, 2.78 * PI);
ctx.lineTo(x + l, y + l);
ctx.lineTo(x, y + l);
ctx.arc(x + r - 2, y + l / 2, r + 0.4, 2.76 * PI, 1.24 * PI, true);
ctx.lineTo(x, y);
ctx.lineWidth = 2;
ctx.fillStyle = 'rgba(255, 255, 255, 0.7)';
ctx.strokeStyle = 'rgba(255, 255, 255, 0.7)';
ctx.stroke();
ctx[operation]();
ctx.globalCompositeOperation = isIE ? 'xor' : 'destination-over';
};
var getRandomNumberByRange = function (start, end) {
return Math.round(Math.random() * (end - start) + start);
};
var img = new Image();
img.crossOrigin = "Anonymous";
var loadCount = 0;
img.onload = function () {
// 随机创建滑块的位置
that.x = getRandomNumberByRange(L + 10, that.options.width - (L + 10));
that.y = getRandomNumberByRange(10 + that.options.sliderR * 2, that.options.height - (L + 10));
drawImg(that.canvasCtx, 'fill');
drawImg(that.blockCtx, 'clip');
that.canvasCtx.drawImage(img, 0, 0, that.options.width - 2, that.options.height);
that.blockCtx.drawImage(img, 0, 0, that.options.width - 2, that.options.height);
var y = that.y - that.options.sliderR * 2 - 1;
var ImageData = that.blockCtx.getImageData(that.x - 3, y, L, L);
that.block.width = L;
that.blockCtx.putImageData(ImageData, 0, y + 1);
that.text.text(that.text.attr('data-text'));
};
img.onerror = function () {
loadCount++;
if (window.location.protocol === 'file:') {
loadCount = that.options.maxLoadCount;
console.error("can't load pic resource file from File protocal. Please try http or https");
}
if (loadCount >= that.options.maxLoadCount) {
that.text.text('加载失败').addClass('text-danger');
return;
}
img.src = that.options.localImages();
};
img.setSrc = function () {
var src = '';
loadCount = 0;
that.text.removeClass('text-danger');
if ($.isFunction(that.options.setSrc)) src = that.options.setSrc();
if (!src || src === '') src = 'https://picsum.photos/' + that.options.width + '/' + that.options.height + '/?image=' + Math.round(Math.random() * 20);
if (isIE) { // IE浏览器无法通过img.crossOrigin跨域,使用ajax获取图片blob然后转为dataURL显示
var xhr = new XMLHttpRequest();
xhr.onloadend = function (e) {
var file = new FileReader(); // FileReader仅支持IE10+
file.readAsDataURL(e.target.response);
file.onloadend = function (e) {
img.src = e.target.result;
};
};
xhr.open('GET', src);
xhr.responseType = 'blob';
xhr.send();
} else img.src = src;
};
img.setSrc();
this.text.attr('data-text', this.options.barText);
this.text.text(this.options.loadingText);
this.img = img;
};
_proto.clean = function () {
this.canvasCtx.clearRect(0, 0, this.options.width, this.options.height);
this.blockCtx.clearRect(0, 0, this.options.width, this.options.height);
this.block.width = this.options.width;
};
_proto.bindEvents = function () {
var that = this;
this.$element.on('selectstart', function () {
return false;
});
$(this.refreshIcon).on('click', function () {
that.text.text(that.options.barText);
that.reset();
if ($.isFunction(that.options.onRefresh)) that.options.onRefresh.call(that.$element);
});
var originX, originY, trail = [],
isMouseDown = false;
var handleDragStart = function (e) {
if (that.text.hasClass('text-danger')) return;
originX = e.clientX || e.touches[0].clientX;
originY = e.clientY || e.touches[0].clientY;
isMouseDown = true;
};
var handleDragMove = function (e) {
if (!isMouseDown) return false;
var eventX = e.clientX || e.touches[0].clientX;
var eventY = e.clientY || e.touches[0].clientY;
var moveX = eventX - originX;
var moveY = eventY - originY;
if (moveX < 0 || moveX + 40 > that.options.width) return false;
that.slider.style.left = (moveX - 1) + 'px';
var blockLeft = (that.options.width - 40 - 20) / (that.options.width - 40) * moveX;
that.block.style.left = blockLeft + 'px';
that.sliderContainer.addClass('sliderContainer_active');
that.sliderMask.style.width = (moveX + 4) + 'px';
trail.push(Math.round(moveY));
};
var handleDragEnd = function (e) {
if (!isMouseDown) return false;
isMouseDown = false;
var eventX = e.clientX || e.changedTouches[0].clientX;
if (eventX === originX) return false;
that.sliderContainer.removeClass('sliderContainer_active');
that.trail = trail;
if (that.verify()) {
that.sliderContainer.addClass('sliderContainer_success');
if (that.options.debug) return;
setTimeout(function () {
if ($.isFunction(that.options.onSuccess)) that.options.onSuccess.call(that.$element);
}, 1000)
} else {
that.sliderContainer.addClass('sliderContainer_fail');
that.text.text(that.options.failedText);
if (that.options.debug) return;
setTimeout(function () {
if ($.isFunction(that.options.onFail)) that.options.onFail.call(that.$element);
that.reset();
}, 1000);
}
};
this.slider.addEventListener('mousedown', handleDragStart);
this.slider.addEventListener('touchstart', handleDragStart);
document.addEventListener('mousemove', handleDragMove);
document.addEventListener('touchmove', handleDragMove);
document.addEventListener('mouseup', handleDragEnd);
document.addEventListener('touchend', handleDragEnd);
document.addEventListener('mousedown', function () { return false; });
document.addEventListener('touchstart', function () { return false; });
document.addEventListener('swipe', function () { return false; });
};
_proto.verify = function () {
var arr = this.trail; // 拖动时y轴的移动距离
var left = parseInt(this.block.style.left);
var verified = false;
var spliced = null;
// 前端验证
var sum = function (x, y) { return x + y; };
var square = function (x) { return x * x; };
var average = arr.reduce(sum) / arr.length;
var deviations = arr.map(function (x) { return x - average; });
var stddev = Math.sqrt(deviations.map(square).reduce(sum) / arr.length);
verified = stddev !== 0;
spliced = Math.abs(left - this.x) < this.options.offset;
if (verified && spliced) { // 前端通过
if (this.options.remoteUrl !== null) { // 验证后端
verified = this.options.verify(arr, this.options.remoteUrl);
}
}
return spliced && verified;
};
_proto.reset = function () {
this.sliderContainer.removeClass('sliderContainer_fail sliderContainer_success');
this.slider.style.left = 0;
this.block.style.left = 0;
this.sliderMask.style.width = 0;
this.clean();
this.text.attr('data-text', this.text.text());
this.text.text(this.options.loadingText);
this.img.setSrc();
};
})(jQuery);

137
static/SliderCaptcha/src/disk/slidercaptcha.css

@ -1,137 +0,0 @@
body {
overflow-x: hidden;
}
.block {
position: absolute;
left: 0;
top: 0;
}
.sliderContainer {
position: relative;
z-index: 99;
text-align: center;
line-height: 40px;
background: #f7f9fa;
color: #45494c;
border-radius: 2px;
}
.sliderbg {
position: absolute;
left: 0;
right: 0;
top: 0;
background-color: #f7f9fa;
height: 40px;
border-radius: 2px;
border: 1px solid #e6e8eb;
}
.sliderContainer_active .slider {
top: -1px;
border: 1px solid #1991FA;
}
.sliderContainer_active .sliderMask {
border-width: 1px 0 1px 1px;
}
.sliderContainer_success .sliderMask {
background: none;
border: 1px solid rgba(20,144,74,1);
}
.sliderContainer_success .slider {
top: -1px;
background:linear-gradient(135deg,rgba(37,188,103,1) 0%,rgba(20,144,74,1) 100%)!important;
}
.sliderContainer_success .sliderIcon:before {
/* border: 1px solid red; */
content: "\f00c";
}
.sliderContainer_fail .sliderMask {
background: none;
border:1px solid rgba(216,43,43,1);
}
.sliderContainer_fail .slider {
top: -1px;
background:linear-gradient(135deg,rgba(237,87,87,1) 0%,rgba(216,43,43,1) 100%)!important;
}
.sliderContainer_fail .sliderIcon:before {
content: "\f00d";
}
.sliderContainer_active .sliderText, .sliderContainer_success .sliderText, .sliderContainer_fail .sliderText {
display: none;
}
.sliderMask {
position: absolute;
left: 0;
top: 0;
height: 40px;
border: 0 solid #1991FA;
background: #D1E9FE;
border-radius: 2px;
}
.slider {
position: absolute;
top: 0;
left: 0;
width: 40px;
height: 40px;
background: #fff;
box-shadow: 0 0 3px rgba(0, 0, 0, 0.3);
cursor: pointer;
transition: background .2s linear;
border-radius: 2px;
display: flex;
align-items: center;
justify-content: center;
}
/* .slider:hover {
background: #1991FA;
}
.slider:hover .sliderIcon {
background-position: 0 -13px;
} */
.sliderText {
position: relative;
z-index : 999;
}
.refreshIcon {
position: absolute;
right: 0;
top: 0;
cursor: pointer;
margin: 6px;
color: rgba(0,0,0,.25);
font-size: 1rem;
z-index: 5;
transition: color .3s linear;
}
.refreshIcon:hover {
color: #6c757d;
}

BIN
static/SliderCaptcha/src/images/Pic0.jpg

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.2 KiB

BIN
static/SliderCaptcha/src/images/Pic1.jpg

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

BIN
static/SliderCaptcha/src/images/Pic2.jpg

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.4 KiB

BIN
static/SliderCaptcha/src/images/Pic3.jpg

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.6 KiB

BIN
static/SliderCaptcha/src/images/Pic4.jpg

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.4 KiB

BIN
static/SliderCaptcha/src/imgs/anniu.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

23
static/SliderCaptcha/src/imgs/hongse.svg

@ -1,23 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="17px" height="17px" viewBox="0 0 17 17" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 60.1 (88133) - https://sketch.com -->
<title>4@2x</title>
<desc>Created with Sketch.</desc>
<defs>
<linearGradient x1="13.6073056%" y1="5.83738745%" x2="89.7590385%" y2="91.4347123%" id="linearGradient-1">
<stop stop-color="#F57272" offset="0%"></stop>
<stop stop-color="#E34F4F" offset="100%"></stop>
</linearGradient>
</defs>
<g id="VirgoX-Web" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="2.4Login弹窗3备份-14" transform="translate(-766.000000, -624.000000)" fill="url(#linearGradient-1)">
<g id="滑块验证" transform="translate(574.997589, 417.000000)">
<g id="fail" transform="translate(172.002411, 188.000000)">
<g id="4" transform="translate(19.000000, 19.000000)">
<path d="M1.10363836,-5.32907052e-15 C1.71316099,-5.44103801e-15 2.20727672,0.494115724 2.20727672,1.10363836 L2.20727672,15.8188165 C2.20727672,16.4283391 1.71316099,16.9224548 1.10363836,16.9224548 C0.494115724,16.9224548 7.18007235e-15,16.4283391 5.55111512e-15,15.8188165 L5.55111512e-15,1.10363836 C5.69851473e-15,0.494115724 0.494115724,-5.21710303e-15 1.10363836,-5.32907052e-15 Z M8.47520519,-5.32907052e-15 C9.08472782,-5.44103801e-15 9.57884355,0.494115724 9.57884355,1.10363836 L9.57884355,15.8188165 C9.57884355,16.4283391 9.08472782,16.9224548 8.47520519,16.9224548 C7.86568255,16.9224548 7.37156683,16.4283391 7.37156683,15.8188165 L7.37156683,1.10363836 C7.37156683,0.494115724 7.86568255,-5.21710303e-15 8.47520519,-5.32907052e-15 Z M15.846772,-5.32907052e-15 C16.4562947,-5.44103801e-15 16.9504104,0.494115724 16.9504104,1.10363836 L16.9504104,15.8188165 C16.9504104,16.4283391 16.4562947,16.9224548 15.846772,16.9224548 C15.2372494,16.9224548 14.7431337,16.4283391 14.7431337,15.8188165 L14.7431337,1.10363836 C14.7431337,0.494115724 15.2372494,-5.21710303e-15 15.846772,-5.32907052e-15 Z" id="形状结合"></path>
</g>
</g>
</g>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 2.2 KiB

15
static/SliderCaptcha/src/imgs/icon-close.svg

@ -1,15 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="16px" height="16px" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 60.1 (88133) - https://sketch.com -->
<title>Icon-Close@2x</title>
<desc>Created with Sketch.</desc>
<g id="VirgoX-Web" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="2.4Login弹窗3备份-11" transform="translate(-595.000000, -572.000000)" fill="#888888">
<g id="滑块验证" transform="translate(574.997589, 310.000000)">
<g id="Icon-Close" transform="translate(20.002411, 262.000000)">
<path d="M15.5529003,0.446729869 C14.9568939,-0.148909956 13.9907207,-0.148909956 13.3947153,0.446729869 L7.99976158,5.84220457 L2.60480785,0.446729869 C2.00931072,-0.148909956 1.04262888,-0.148909956 0.447004467,0.446729869 C-0.149001479,1.04275119 -0.149001479,2.00894928 0.447004467,2.60497046 L5.84195805,8.0000639 L0.447004467,13.3951569 C-0.149001479,13.9911776 -0.149001479,14.9573755 0.447004467,15.5533972 C0.744562328,15.8509626 1.135584,16 1.52596974,16 C1.91635561,16 2.30674124,15.8514719 2.60480785,15.5533972 L7.99976158,10.1579227 L13.3947153,15.5533972 C13.6927814,15.8509626 14.083168,16 14.4735537,16 C14.8639393,16 15.254961,15.8514719 15.5529003,15.5533972 C16.1485252,14.9573755 16.1485252,13.9911776 15.5529003,13.3951569 L10.1580734,8.0000639 L15.5529003,2.60497046 C16.1490326,2.00894928 16.1490326,1.04275119 15.5529003,0.446729869 Z" id="Fill-4"></path>
</g>
</g>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1.6 KiB

15
static/SliderCaptcha/src/imgs/icon-refresh.svg

@ -1,15 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="16px" height="18px" viewBox="0 0 16 18" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 60.1 (88133) - https://sketch.com -->
<title>刷新@2x</title>
<desc>Created with Sketch.</desc>
<g id="VirgoX-Web" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="2.4Login弹窗3备份-11" transform="translate(-631.000000, -571.000000)" fill="#888888" fill-rule="nonzero">
<g id="滑块验证" transform="translate(574.997589, 310.000000)">
<g id="刷新" transform="translate(56.002411, 261.000000)">
<path d="M14.8571429,8.49166995 C14.2262102,8.49166995 13.7142857,9.00359439 13.7142857,9.63452709 L13.7142857,9.63641611 C13.7123967,12.7854126 11.1508855,15.3488128 8,15.3488128 C4.84911452,15.3488128 2.28571429,12.7854126 2.28571429,9.63452709 C2.28571429,6.48364161 4.84911452,3.92024137 8,3.92024137 C8.69515939,3.92024137 9.35442739,4.0638069 9.97213695,4.29237833 C9.36765053,4.34904893 8.88783943,4.84208317 8.88783943,5.46168175 C8.88783943,6.11906074 9.42054309,6.6517644 10.0779221,6.6517644 L13.8918536,6.6517644 C14.5492326,6.6517644 15.0819362,6.11906074 15.0819362,5.46168175 L15.0819362,1.63452709 C15.0819362,0.977148104 14.5492326,0.444444444 13.8918536,0.444444444 C13.2344746,0.444444444 12.701771,0.977148104 12.701771,1.63452709 L12.701771,3.17218943 C11.3813459,2.21067821 9.76056671,1.63452709 8,1.63452709 C3.58158205,1.63452709 0,5.21610914 0,9.63452709 C0,14.052945 3.58158205,17.6345271 8,17.6345271 C12.4184179,17.6345271 16,14.052945 16,9.63452709 C16,9.00359439 15.4880756,8.49166995 14.8571429,8.49166995 Z" id="路径"></path>
</g>
</g>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1.8 KiB

BIN
static/SliderCaptcha/src/imgs/loading.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

BIN
static/SliderCaptcha/src/imgs/loading@2x.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.2 KiB

21
static/SliderCaptcha/src/imgs/lvse.svg

@ -1,21 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="17px" height="17px" viewBox="0 0 17 17" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 60.1 (88133) - https://sketch.com -->
<title>3@2x</title>
<desc>Created with Sketch.</desc>
<defs>
<linearGradient x1="0%" y1="0.16478944%" x2="100%" y2="99.8352106%" id="linearGradient-1">
<stop stop-color="#35D87C" offset="0%"></stop>
<stop stop-color="#16C562" offset="100%"></stop>
</linearGradient>
</defs>
<g id="VirgoX-Web" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="2.4Login弹窗3备份-13" transform="translate(-766.000000, -624.000000)" fill="url(#linearGradient-1)">
<g id="滑块验证" transform="translate(574.997589, 417.000000)">
<g id="success" transform="translate(172.002411, 188.000000)">
<path d="M20.1036384,19 C20.713161,19 21.2072767,19.4941157 21.2072767,20.1036384 L21.2072767,34.8188165 C21.2072767,35.4283391 20.713161,35.9224548 20.1036384,35.9224548 C19.4941157,35.9224548 19,35.4283391 19,34.8188165 L19,20.1036384 C19,19.4941157 19.4941157,19 20.1036384,19 Z M27.4752052,19 C28.0847278,19 28.5788435,19.4941157 28.5788435,20.1036384 L28.5788435,34.8188165 C28.5788435,35.4283391 28.0847278,35.9224548 27.4752052,35.9224548 C26.8656826,35.9224548 26.3715668,35.4283391 26.3715668,34.8188165 L26.3715668,20.1036384 C26.3715668,19.4941157 26.8656826,19 27.4752052,19 Z M34.846772,19 C35.4562947,19 35.9504104,19.4941157 35.9504104,20.1036384 L35.9504104,34.8188165 C35.9504104,35.4283391 35.4562947,35.9224548 34.846772,35.9224548 C34.2372494,35.9224548 33.7431337,35.4283391 33.7431337,34.8188165 L33.7431337,20.1036384 C33.7431337,19.4941157 34.2372494,19 34.846772,19 Z" id="3"></path>
</g>
</g>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1.9 KiB

BIN
static/SliderCaptcha/src/imgs/slice1.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 78 KiB

BIN
static/SliderCaptcha/src/imgs/slice1@2x.jpg

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

BIN
static/SliderCaptcha/src/imgs/slice1@2x.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 41 KiB

BIN
static/SliderCaptcha/src/imgs/slice2.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 74 KiB

BIN
static/SliderCaptcha/src/imgs/slice2@2x.jpg

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

BIN
static/SliderCaptcha/src/imgs/slice2@2x.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 46 KiB

BIN
static/SliderCaptcha/src/imgs/slice3.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 64 KiB

BIN
static/SliderCaptcha/src/imgs/slice3@2x.jpg

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

BIN
static/SliderCaptcha/src/imgs/slice3@2x.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

BIN
static/SliderCaptcha/src/imgs/slice4.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 88 KiB

BIN
static/SliderCaptcha/src/imgs/slice4@2x.jpg

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

BIN
static/SliderCaptcha/src/imgs/slice4@2x.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 91 KiB

BIN
static/SliderCaptcha/src/imgs/slice5.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 91 KiB

BIN
static/SliderCaptcha/src/imgs/slice5@2x.jpg

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

BIN
static/SliderCaptcha/src/imgs/slice5@2x.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 74 KiB

23
static/SliderCaptcha/src/imgs/zise.svg

@ -1,23 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="17px" height="17px" viewBox="0 0 17 17" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 60.1 (88133) - https://sketch.com -->
<title>1@2x</title>
<desc>Created with Sketch.</desc>
<defs>
<linearGradient x1="13.300497%" y1="8.05771803%" x2="100%" y2="99.8352106%" id="linearGradient-1">
<stop stop-color="#E884E8" offset="0%"></stop>
<stop stop-color="#7B66C5" offset="100%"></stop>
</linearGradient>
</defs>
<g id="VirgoX-Web" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="2.4Login弹窗3备份-11" transform="translate(-609.000000, -624.000000)" fill="url(#linearGradient-1)">
<g id="滑块验证" transform="translate(574.997589, 417.000000)">
<g id="anniu" transform="translate(15.002411, 188.000000)">
<g id="1" transform="translate(19.000000, 19.000000)">
<path d="M1.10363836,-5.32907052e-15 C1.71316099,-5.44103801e-15 2.20727672,0.494115724 2.20727672,1.10363836 L2.20727672,15.8188165 C2.20727672,16.4283391 1.71316099,16.9224548 1.10363836,16.9224548 C0.494115724,16.9224548 -3.33880441e-13,16.4283391 -3.35509398e-13,15.8188165 L-3.35509398e-13,1.10363836 C-3.35361998e-13,0.494115724 0.494115724,-5.21710303e-15 1.10363836,-5.32907052e-15 Z M8.47520519,-5.32907052e-15 C9.08472782,-5.44103801e-15 9.57884355,0.494115724 9.57884355,1.10363836 L9.57884355,15.8188165 C9.57884355,16.4283391 9.08472782,16.9224548 8.47520519,16.9224548 C7.86568255,16.9224548 7.37156683,16.4283391 7.37156683,15.8188165 L7.37156683,1.10363836 C7.37156683,0.494115724 7.86568255,-5.21710303e-15 8.47520519,-5.32907052e-15 Z M15.846772,-5.32907052e-15 C16.4562947,-5.44103801e-15 16.9504104,0.494115724 16.9504104,1.10363836 L16.9504104,15.8188165 C16.9504104,16.4283391 16.4562947,16.9224548 15.846772,16.9224548 C15.2372494,16.9224548 14.7431337,16.4283391 14.7431337,15.8188165 L14.7431337,1.10363836 C14.7431337,0.494115724 15.2372494,-5.21710303e-15 15.846772,-5.32907052e-15 Z" id="形状结合"></path>
</g>
</g>
</g>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 2.2 KiB

19
static/SliderCaptcha/src/imgs/zise2.svg

@ -1,19 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="29px" height="11px" viewBox="0 0 29 11" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 60.1 (88133) - https://sketch.com -->
<title>2@2x</title>
<desc>Created with Sketch.</desc>
<defs>
<linearGradient x1="13.300497%" y1="43.7222287%" x2="100%" y2="57.4591567%" id="linearGradient-1">
<stop stop-color="#E884E8" offset="0%"></stop>
<stop stop-color="#7B66C5" offset="100%"></stop>
</linearGradient>
</defs>
<g id="VirgoX-Web" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="2.4Login弹窗3备份-12" transform="translate(-658.000000, -627.000000)" fill="url(#linearGradient-1)">
<g id="anniu2" transform="translate(644.500000, 605.000000)">
<path d="M34.6682513,22.1417459 L41.7088042,27.5202765 L34.6682513,32.8988071 L34.6682513,22.1417459 Z M20.8988071,22.1417459 L20.8988071,32.8988071 L13.8582541,27.5202765 L20.8988071,22.1417459 Z M27.7835292,25.0202765 C29.1642411,25.0202765 30.2835292,26.1395646 30.2835292,27.5202765 C30.2835292,28.9009884 29.1642411,30.0202765 27.7835292,30.0202765 C26.4028173,30.0202765 25.2835292,28.9009884 25.2835292,27.5202765 C25.2835292,26.1395646 26.4028173,25.0202765 27.7835292,25.0202765 Z" id="2"></path>
</g>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1.4 KiB

122
static/SliderCaptcha/src/index.css

@ -1,122 +0,0 @@
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
background: #fff;
padding: 5px 12px;
}
#captcha {
/* border: 1px solid red; */
background: url('./imgs/loading.png') no-repeat center center;
}
#captcha img {
margin: 0;
padding: 0;
}
.refreshIcon {
color: #C1BBF2;
font-size: 1.6em;
right: 50px;
top: -52px;
z-index: 10;
}
.sliderContainer {
margin-top: 10px;
color: #88949d;
border: none;
border-radius: 22px;
}
.sliderbg {
/* background: #F5DFDF; */
background: rgba(31, 24, 50, 0.1);
/* box-shadow: 0px 0px 4px 0px rgba(188, 106, 188, 0.3); */
border-radius: 20px;
}
.sliderMask {
background: #E8DCEC;
border: none;
border-bottom-left-radius: 20px;
border-top-left-radius: 20px;
}
/* 初始 */
.sliderMask .slider {
top: -6px;
left: -3px;
border: none;
width: 55px;
height: 55px;
border-radius: 50%;
margin-left: -8px;
background: linear-gradient(134deg, rgba(255, 255, 255, 1) 0%, rgba(237, 237, 237, 1) 100%);
}
.sliderMask .slider .fa {
display: inline-block;
}
.fa-arrow-right:before {
content: "";
display: inline-block;
width: 20px;
height: 20px;
background: url('./imgs/zise.svg') no-repeat center center;
}
/* 失败 */
.sliderContainer_fail .slider {
background: linear-gradient(134deg, rgba(255, 255, 255, 1) 0%, rgba(237, 237, 237, 1) 100%) !important;
}
.sliderContainer_fail .sliderMask {
border: none;
}
.sliderContainer_fail .sliderIcon:before {
content: "";
display: inline-block;
width: 20px;
height: 20px;
background: url('./imgs/hongse.svg') no-repeat center center;
}
.sliderContainer_fail .sliderMask {
background: #F5DFDF;
border: none;
border-bottom-left-radius: 20px;
border-top-left-radius: 20px;
}
/* 成功 */
.sliderContainer_success .slider {
background: linear-gradient(134deg, rgba(255, 255, 255, 1) 0%, rgba(237, 237, 237, 1) 100%) !important;
}
.sliderContainer_success .sliderMask {
border: none;
}
.sliderContainer_success .sliderIcon:before {
content: "";
display: inline-block;
width: 20px;
height: 20px;
background: url('./imgs/lvse.svg') no-repeat center center;
}
.sliderContainer_success .sliderMask {
background: #DAE7E0;
border: none;
border-bottom-left-radius: 20px;
border-top-left-radius: 20px;
}

110
static/SliderCaptcha/src/index.html

@ -1,110 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link href="lib/twitter-bootstrap/css/bootstrap.min.css" rel="stylesheet">
<link href="lib/font-awesome/css/font-awesome.min.css" rel="stylesheet">
<link href="disk/slidercaptcha.css" rel="stylesheet" />
<link rel="stylesheet" href="./index.css">
</head>
<body>
<script src="lib/jquery/jquery.min.js"></script>
<script src="lib/twitter-bootstrap/js/bootstrap.bundle.js"></script>
<script src="disk/longbow.slidercaptcha.js"></script>
<div id="captcha"></div>
<script>
function getArgs(qs) {
// 检测是否含有?
let search = decodeURIComponent(qs);
if (search.startsWith("?")) search = search.slice(1);
const params = {};
search.split("&").forEach(item => {
let pos = item.indexOf("=");
let name = item.slice(0, pos),
value = item.slice(pos + 1);
params[name] = value;
});
return params;
}
// 提取请求参数
var { account, slider_type, nextStep, lang } = getArgs(location.search);
var tokenCode; // 接收token
$captcha = $('#captcha').sliderCaptcha({
// 文案设置
loadingText : 'Processing...',
failedText : 'Try Again',
barText : 'Slide to fill the puzzle',
// 画布的大小
width: 275,
height: 178,
offset: 5, // 容错像素值
remoteUrl : window.parent.api_path,
verify: function (datas, url) { // 服务端验证方法
let ret = false;
$.ajax(url, {
type: 'POST',
data: JSON.stringify({
datas,
account,
slider_type,
}),
async: false,
cache: false,
contentType: 'application/json',
headers: { lang },
success: function (response) {
tokenCode = response.data.token;
if (response.code == 200) {
ret = true;
} else {
ret = false;
}
}
});
return ret;
},
onSuccess: function () { //成功事件
// 刷新并跳转
$captcha.sliderCaptcha('reset');
window.parent[nextStep](tokenCode);
},
onFail: function () { // 自动刷新
// $captcha.sliderCaptcha('reset');
},
onRefresh: function () {
$captcha.sliderCaptcha('reset');
},
setSrc: function () {
return './imgs/slice' + Math.ceil(Math.random() * 5) + '@2x.png';
},
});
// $('.refresh').click(function () {
// $captcha.sliderCaptcha('reset');
// });
// $('.close').click(function () {
// window.parent.closeBox();
// });
</script>
</body>
</html>

2337
static/SliderCaptcha/src/lib/font-awesome/css/font-awesome.css

File diff suppressed because it is too large

7
static/SliderCaptcha/src/lib/font-awesome/css/font-awesome.css.map

File diff suppressed because one or more lines are too long

4
static/SliderCaptcha/src/lib/font-awesome/css/font-awesome.min.css

File diff suppressed because one or more lines are too long

BIN
static/SliderCaptcha/src/lib/font-awesome/fonts/FontAwesome.otf

Binary file not shown.

BIN
static/SliderCaptcha/src/lib/font-awesome/fonts/fontawesome-webfont.eot

Binary file not shown.

2671
static/SliderCaptcha/src/lib/font-awesome/fonts/fontawesome-webfont.svg

File diff suppressed because it is too large

Before

Width:  |  Height:  |  Size: 434 KiB

BIN
static/SliderCaptcha/src/lib/font-awesome/fonts/fontawesome-webfont.ttf

Binary file not shown.

BIN
static/SliderCaptcha/src/lib/font-awesome/fonts/fontawesome-webfont.woff

Binary file not shown.

BIN
static/SliderCaptcha/src/lib/font-awesome/fonts/fontawesome-webfont.woff2

Binary file not shown.

10364
static/SliderCaptcha/src/lib/jquery/jquery.js

File diff suppressed because it is too large

2
static/SliderCaptcha/src/lib/jquery/jquery.min.js

File diff suppressed because one or more lines are too long

1
static/SliderCaptcha/src/lib/jquery/jquery.min.map

File diff suppressed because one or more lines are too long

10038
static/SliderCaptcha/src/lib/twitter-bootstrap/css/bootstrap.css

File diff suppressed because it is too large

1
static/SliderCaptcha/src/lib/twitter-bootstrap/css/bootstrap.css.map

File diff suppressed because one or more lines are too long

10341
static/SliderCaptcha/src/lib/twitter-bootstrap/css/bootstrap.min.css

File diff suppressed because it is too large

1
static/SliderCaptcha/src/lib/twitter-bootstrap/css/bootstrap.min.css.map

File diff suppressed because one or more lines are too long

7013
static/SliderCaptcha/src/lib/twitter-bootstrap/js/bootstrap.bundle.js

File diff suppressed because it is too large

1
static/SliderCaptcha/src/lib/twitter-bootstrap/js/bootstrap.bundle.js.map

File diff suppressed because one or more lines are too long

7
static/SliderCaptcha/src/lib/twitter-bootstrap/js/bootstrap.bundle.min.js

File diff suppressed because one or more lines are too long

1
static/SliderCaptcha/src/lib/twitter-bootstrap/js/bootstrap.bundle.min.js.map

File diff suppressed because one or more lines are too long

69
static/SliderCaptcha/src/指南.html

@ -1,69 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>Slider Captcha Demo</title>
<link href="lib/twitter-bootstrap/css/bootstrap.min.css" rel="stylesheet">
<link href="lib/font-awesome/css/font-awesome.min.css" rel="stylesheet">
<link href="disk/slidercaptcha.css" rel="stylesheet" />
<style>
.slidercaptcha {
margin: 0 auto;
width: 314px;
height: 286px;
border-radius: 4px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.125);
margin-top: 40px;
}
.slidercaptcha .card-body {
padding: 1rem;
}
.slidercaptcha canvas:first-child {
border-radius: 4px;
border: 1px solid #e6e8eb;
}
.slidercaptcha.card .card-header {
background-image: none;
background-color: rgba(0, 0, 0, 0.03);
}
.refreshIcon {
top: -54px;
}
</style>
</head>
<body>
<div class="container-fluid">
<div class="form-row">
<div class="col-12">
<div class="slidercaptcha card">
<div class="card-header">
<span>请完成安全验证!</span>
</div>
<div class="card-body">
<div id="captcha"></div>
</div>
</div>
</div>
</div>
</div>
<script src="lib/jquery/jquery.min.js"></script>
<script src="lib/twitter-bootstrap/js/bootstrap.bundle.js"></script>
<script src="disk/longbow.slidercaptcha.js"></script>
<script>
var $captcha = $('#captcha').sliderCaptcha({
repeatIcon: 'fa fa-redo',
setSrc: function () {
return 'http://imgs.sdgxgz.com/images/Pic' + Math.round(Math.random() * 136) + '.jpg';
},
onSuccess: function () { //成功事件
var handler = setTimeout(function () {
window.clearTimeout(handler);
$captcha.sliderCaptcha('reset');
}, 500);
}
});
</script>
</body>
</html>
Loading…
Cancel
Save