diff --git a/.gitignore b/.gitignore
index 0fbbf86..2cc72b0 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,5 @@
.idea
npm-debug.log
node_modules
-.DS_Store
\ No newline at end of file
+.DS_Store
+.vs
\ No newline at end of file
diff --git a/demo/app.js b/demo/app.js
index f69824f..bcf77c1 100644
--- a/demo/app.js
+++ b/demo/app.js
@@ -8,7 +8,7 @@ app.use(bodyParser.json());
app.use(bodyParser.urlencoded({extended: true}));
app.use(express.static('./demo/static'));
-var fullpage = require('./static/fullpage');
+var fullpage = require('./fullpage');
app.get("/gt/register-fullpage", function (req, res) {
// 向极验申请每次验证所需的challenge
@@ -71,7 +71,7 @@ app.post("/gt/validate-fullpage", function (req, res) {
});
});
-var click = require('./static/click');
+var click = require('./click');
app.get("/gt/register-click", function (req, res) {
// 向极验申请每次验证所需的challenge
@@ -134,7 +134,7 @@ app.post("/gt/validate-click", function (req, res) {
});
});
-var slide = require('./static/slide');
+var slide = require('./slide');
app.get("/gt/register-slide", function (req, res) {
// 向极验申请每次验证所需的challenge
@@ -197,7 +197,7 @@ app.post("/gt/validate-slide", function (req, res) {
});
});
-var test = require('./static/test');
+var test = require('./test');
app.get("/gt/register-test", function (req, res) {
// 向极验申请每次验证所需的challenge
@@ -260,6 +260,35 @@ app.post("/gt/validate-test", function (req, res) {
});
});
+var jsonfile = require('jsonfile');
+var uas = require('../ua-list.json');
+app.get('/get-user-agent', function (req, res) {
+ var ua = req.headers['user-agent'];
+ if (uas.indexOf(ua) === -1) {
+ uas.unshift(ua);
+ jsonfile.writeFile('./ua-list.json', uas, {spaces: 2}, function(err) {
+ if (err) {
+ console.error(err)
+ }
+ });
+ }
+ res.send(`
+
+
+
+
+
+
+
+
+${uas.map((ua) => `- ${ua}
`).join('')}
+
+
+`);
+});
+
var port = 9977;
app.listen(port, function () {
console.log('listening at http://localhost:' + port)
diff --git a/demo/click.js b/demo/click.js
new file mode 100644
index 0000000..5bc5697
--- /dev/null
+++ b/demo/click.js
@@ -0,0 +1,7 @@
+var Geetest = require('../gt-sdk');
+
+var captcha = new Geetest({
+ geetest_id: '6216680937717fdab947ed9e71a3aaa1',
+ geetest_key: '0f7e44a231f89b91ff2a5f75069c4f86'
+});
+module.exports = captcha;
\ No newline at end of file
diff --git a/demo/fullpage.js b/demo/fullpage.js
new file mode 100644
index 0000000..f183041
--- /dev/null
+++ b/demo/fullpage.js
@@ -0,0 +1,7 @@
+var Geetest = require('../gt-sdk');
+
+var captcha = new Geetest({
+ geetest_id: 'e52c06c937981b90b275d0aff1d40076',
+ geetest_key: '02d6ff3aa1dd72ab1db7ebf90971a6e0'
+});
+module.exports = captcha;
\ No newline at end of file
diff --git a/demo/slide.js b/demo/slide.js
new file mode 100644
index 0000000..d1a7aae
--- /dev/null
+++ b/demo/slide.js
@@ -0,0 +1,7 @@
+var Geetest = require('../gt-sdk');
+
+var captcha = new Geetest({
+ geetest_id: '019924a82c70bb123aae90d483087f94',
+ geetest_key: '5e2cdacfba726b6ef221c999ebcc47a2'
+});
+module.exports = captcha;
\ No newline at end of file
diff --git a/demo/static/click-bind.html b/demo/static/click-bind.html
new file mode 100644
index 0000000..7654f5b
--- /dev/null
+++ b/demo/static/click-bind.html
@@ -0,0 +1,146 @@
+
+
+
+
+
+ 大图模式
+
+
+
+
+大图模式
+
+
+
+
+
+
+
+
+
diff --git a/demo/static/click-custom.html b/demo/static/click-custom.html
new file mode 100644
index 0000000..2d82710
--- /dev/null
+++ b/demo/static/click-custom.html
@@ -0,0 +1,155 @@
+
+
+
+
+
+ 大图模式
+
+
+
+
+大图模式
+
+
+
+
+
+
+
+
diff --git a/demo/static/click-douyu.html b/demo/static/click-douyu.html
new file mode 100644
index 0000000..1f1ed9b
--- /dev/null
+++ b/demo/static/click-douyu.html
@@ -0,0 +1,151 @@
+
+
+
+
+
+ 大图模式
+
+
+
+
+大图模式
+
+
+
+
+
+
+
+
+
diff --git a/demo/static/click-float.html b/demo/static/click-float.html
new file mode 100644
index 0000000..85d9a9c
--- /dev/null
+++ b/demo/static/click-float.html
@@ -0,0 +1,148 @@
+
+
+
+
+
+ 大图模式
+
+
+
+
+大图模式
+
+
+
+
+
+
+
+
+
diff --git a/demo/static/click-popup-en.html b/demo/static/click-popup-en.html
new file mode 100644
index 0000000..3a4ffb6
--- /dev/null
+++ b/demo/static/click-popup-en.html
@@ -0,0 +1,149 @@
+
+
+
+
+
+ 大图模式
+
+
+
+
+大图模式
+
+
+
+
+
+
+
+
+
diff --git a/demo/static/click.html b/demo/static/click-popup.html
similarity index 100%
rename from demo/static/click.html
rename to demo/static/click-popup.html
diff --git a/demo/static/click.js b/demo/static/click.js
deleted file mode 100644
index 867a5ea..0000000
--- a/demo/static/click.js
+++ /dev/null
@@ -1,8 +0,0 @@
-var Geetest = require('../../gt-sdk');
-
-var captcha = new Geetest({
- geetest_id: '683898b124098fd661657f731db857aa',
- geetest_key: '3f204e4be8c779614b2ad5caf5a6de8e'
-});
-
-module.exports = captcha;
\ No newline at end of file
diff --git a/demo/static/comment.html b/demo/static/comment.html
new file mode 100644
index 0000000..cc1c7fa
--- /dev/null
+++ b/demo/static/comment.html
@@ -0,0 +1,174 @@
+
+
+
+
+
+ 发表评论场景
+
+
+
+
+
+
+ *此处是将极验运用在评论场景的交互展示,表单随意填写, 点击"发表评论"按钮触发验证。
+
+
发表评论
+
+
+ 字号表情图片
+ 发表评论请遵守论坛规则
+
+
+
使用签名
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/demo/static/douyu.png b/demo/static/douyu.png
new file mode 100644
index 0000000..0b3f691
Binary files /dev/null and b/demo/static/douyu.png differ
diff --git a/demo/static/fullpage-bind.html b/demo/static/fullpage-bind.html
new file mode 100644
index 0000000..6d459af
--- /dev/null
+++ b/demo/static/fullpage-bind.html
@@ -0,0 +1,148 @@
+
+
+
+
+
+ 一键通过模式
+
+
+
+
+一键通过模式
+
+
+
+
+
+
+
+
+
diff --git a/demo/static/fullpage.js b/demo/static/fullpage.js
deleted file mode 100644
index 5e3e180..0000000
--- a/demo/static/fullpage.js
+++ /dev/null
@@ -1,8 +0,0 @@
-var Geetest = require('../../gt-sdk');
-
-var captcha = new Geetest({
- geetest_id: 'd84c7e8e5e27b68bc8e25c6da4556135',
- geetest_key: 'de0250bcc4a5e8e7b156637b301cfe77'
-});
-
-module.exports = captcha;
\ No newline at end of file
diff --git a/demo/static/image/LOCK.png b/demo/static/image/LOCK.png
new file mode 100644
index 0000000..28d9730
Binary files /dev/null and b/demo/static/image/LOCK.png differ
diff --git a/demo/static/image/USER.png b/demo/static/image/USER.png
new file mode 100644
index 0000000..63511cc
Binary files /dev/null and b/demo/static/image/USER.png differ
diff --git a/demo/static/image/qq.png b/demo/static/image/qq.png
new file mode 100644
index 0000000..f88e76e
Binary files /dev/null and b/demo/static/image/qq.png differ
diff --git "a/demo/static/image/\345\213\276\351\200\211.png" "b/demo/static/image/\345\213\276\351\200\211.png"
new file mode 100644
index 0000000..99af84a
Binary files /dev/null and "b/demo/static/image/\345\213\276\351\200\211.png" differ
diff --git "a/demo/static/image/\345\233\2761.png" "b/demo/static/image/\345\233\2761.png"
new file mode 100644
index 0000000..d1d3ec8
Binary files /dev/null and "b/demo/static/image/\345\233\2761.png" differ
diff --git "a/demo/static/image/\345\233\2762.png" "b/demo/static/image/\345\233\2762.png"
new file mode 100644
index 0000000..a6b1788
Binary files /dev/null and "b/demo/static/image/\345\233\2762.png" differ
diff --git "a/demo/static/image/\345\233\2763.png" "b/demo/static/image/\345\233\2763.png"
new file mode 100644
index 0000000..ce34e2f
Binary files /dev/null and "b/demo/static/image/\345\233\2763.png" differ
diff --git "a/demo/static/image/\345\233\276\347\211\207.png" "b/demo/static/image/\345\233\276\347\211\207.png"
new file mode 100644
index 0000000..40bd9b5
Binary files /dev/null and "b/demo/static/image/\345\233\276\347\211\207.png" differ
diff --git "a/demo/static/image/\345\255\227\345\217\267.png" "b/demo/static/image/\345\255\227\345\217\267.png"
new file mode 100644
index 0000000..6306d02
Binary files /dev/null and "b/demo/static/image/\345\255\227\345\217\267.png" differ
diff --git "a/demo/static/image/\345\276\256\344\277\241.png" "b/demo/static/image/\345\276\256\344\277\241.png"
new file mode 100644
index 0000000..0102ed3
Binary files /dev/null and "b/demo/static/image/\345\276\256\344\277\241.png" differ
diff --git "a/demo/static/image/\345\276\256\345\215\232.png" "b/demo/static/image/\345\276\256\345\215\232.png"
new file mode 100644
index 0000000..d48acb5
Binary files /dev/null and "b/demo/static/image/\345\276\256\345\215\232.png" differ
diff --git "a/demo/static/image/\350\241\250\346\203\205.png" "b/demo/static/image/\350\241\250\346\203\205.png"
new file mode 100644
index 0000000..5362f6d
Binary files /dev/null and "b/demo/static/image/\350\241\250\346\203\205.png" differ
diff --git "a/demo/static/image/\351\200\211\346\241\206.png" "b/demo/static/image/\351\200\211\346\241\206.png"
new file mode 100644
index 0000000..e2a7d17
Binary files /dev/null and "b/demo/static/image/\351\200\211\346\241\206.png" differ
diff --git a/demo/static/img/LOCK.png b/demo/static/img/LOCK.png
new file mode 100644
index 0000000..28d9730
Binary files /dev/null and b/demo/static/img/LOCK.png differ
diff --git a/demo/static/img/USER.png b/demo/static/img/USER.png
new file mode 100644
index 0000000..63511cc
Binary files /dev/null and b/demo/static/img/USER.png differ
diff --git "a/demo/static/img/\345\213\276\351\200\211.png" "b/demo/static/img/\345\213\276\351\200\211.png"
new file mode 100644
index 0000000..99af84a
Binary files /dev/null and "b/demo/static/img/\345\213\276\351\200\211.png" differ
diff --git "a/demo/static/img/\345\233\276\347\211\207.png" "b/demo/static/img/\345\233\276\347\211\207.png"
new file mode 100644
index 0000000..40bd9b5
Binary files /dev/null and "b/demo/static/img/\345\233\276\347\211\207.png" differ
diff --git "a/demo/static/img/\345\255\227\345\217\267.png" "b/demo/static/img/\345\255\227\345\217\267.png"
new file mode 100644
index 0000000..6306d02
Binary files /dev/null and "b/demo/static/img/\345\255\227\345\217\267.png" differ
diff --git "a/demo/static/img/\346\211\213\346\234\272\345\217\267.png" "b/demo/static/img/\346\211\213\346\234\272\345\217\267.png"
new file mode 100644
index 0000000..2df008a
Binary files /dev/null and "b/demo/static/img/\346\211\213\346\234\272\345\217\267.png" differ
diff --git "a/demo/static/img/\350\241\250\346\203\205.png" "b/demo/static/img/\350\241\250\346\203\205.png"
new file mode 100644
index 0000000..5362f6d
Binary files /dev/null and "b/demo/static/img/\350\241\250\346\203\205.png" differ
diff --git "a/demo/static/img/\351\200\211\346\241\206.png" "b/demo/static/img/\351\200\211\346\241\206.png"
new file mode 100644
index 0000000..e2a7d17
Binary files /dev/null and "b/demo/static/img/\351\200\211\346\241\206.png" differ
diff --git "a/demo/static/img/\351\252\214\350\257\201\347\240\201.png" "b/demo/static/img/\351\252\214\350\257\201\347\240\201.png"
new file mode 100644
index 0000000..dc925dd
Binary files /dev/null and "b/demo/static/img/\351\252\214\350\257\201\347\240\201.png" differ
diff --git a/demo/static/index.html b/demo/static/index.html
index ae6eaa1..fab7550 100644
--- a/demo/static/index.html
+++ b/demo/static/index.html
@@ -14,10 +14,10 @@
padding: 0;
}
li {
- margin: 20px 0;
+ margin: 10px 0;
}
a {
- font-size: 24px;
+ font-size: 18px;
}
@@ -25,9 +25,22 @@
demo 列表