diff --git a/admin/logs/counts/chart-14e91806a26be2aa8d8df5370b78fefc.php b/admin/logs/counts/chart-14e91806a26be2aa8d8df5370b78fefc.php deleted file mode 100755 index c9edec4..0000000 --- a/admin/logs/counts/chart-14e91806a26be2aa8d8df5370b78fefc.php +++ /dev/null @@ -1 +0,0 @@ -{"filename":"14e91806a26be2aa8d8df5370b78fefc","total_time":"2021-11-17 02:10:38","date":"2021111702","chart_data":[{"2021\/11\/17\/":10},{"2021\/11\/16\/":0},{"2021\/11\/15\/":0},{"2021\/11\/14\/":0},{"2021\/11\/13\/":0},{"2021\/11\/12\/":0},{"2021\/11\/11\/":0},{"2021\/11\/10\/":0},{"2021\/11\/09\/":0},{"2021\/11\/08\/":0},{"2021\/11\/07\/":0},{"2021\/11\/06\/":0},{"2021\/11\/05\/":0},{"2021\/11\/04\/":0},{"2021\/11\/03\/":0},{"2021\/11\/02\/":0},{"2021\/11\/01\/":0},{"2021\/10\/31\/":0},{"2021\/10\/30\/":0},{"2021\/10\/29\/":0},{"2021\/10\/28\/":0},{"2021\/10\/27\/":0},{"2021\/10\/26\/":0},{"2021\/10\/25\/":0},{"2021\/10\/24\/":0},{"2021\/10\/23\/":0},{"2021\/10\/22\/":0},{"2021\/10\/21\/":0},{"2021\/10\/20\/":0},{"2021\/10\/19\/":0}],"chart_disk":[{"2021\/11\/17\/":1932747},{"2021\/11\/16\/":0},{"2021\/11\/15\/":0},{"2021\/11\/14\/":0},{"2021\/11\/13\/":0},{"2021\/11\/12\/":0},{"2021\/11\/11\/":0},{"2021\/11\/10\/":0},{"2021\/11\/09\/":0},{"2021\/11\/08\/":0},{"2021\/11\/07\/":0},{"2021\/11\/06\/":0},{"2021\/11\/05\/":0},{"2021\/11\/04\/":0},{"2021\/11\/03\/":0},{"2021\/11\/02\/":0},{"2021\/11\/01\/":0},{"2021\/10\/31\/":0},{"2021\/10\/30\/":0},{"2021\/10\/29\/":0},{"2021\/10\/28\/":0},{"2021\/10\/27\/":0},{"2021\/10\/26\/":0},{"2021\/10\/25\/":0},{"2021\/10\/24\/":0},{"2021\/10\/23\/":0},{"2021\/10\/22\/":0},{"2021\/10\/21\/":0},{"2021\/10\/20\/":0},{"2021\/10\/19\/":0}]} \ No newline at end of file diff --git a/admin/logs/counts/chart-6b20c35069d8821f92d9f88d9ae4c6da.php b/admin/logs/counts/chart-6b20c35069d8821f92d9f88d9ae4c6da.php deleted file mode 100755 index 63a72cd..0000000 --- a/admin/logs/counts/chart-6b20c35069d8821f92d9f88d9ae4c6da.php +++ /dev/null @@ -1 +0,0 @@ -{"filename":"6b20c35069d8821f92d9f88d9ae4c6da","total_time":"2021-11-16 17:48:35","date":"2021111617","chart_data":[{"2021\/11\/16\/":0},{"2021\/11\/15\/":0},{"2021\/11\/14\/":0},{"2021\/11\/13\/":0},{"2021\/11\/12\/":0},{"2021\/11\/11\/":0},{"2021\/11\/10\/":0},{"2021\/11\/09\/":0},{"2021\/11\/08\/":0},{"2021\/11\/07\/":0},{"2021\/11\/06\/":0},{"2021\/11\/05\/":0},{"2021\/11\/04\/":0},{"2021\/11\/03\/":0},{"2021\/11\/02\/":0},{"2021\/11\/01\/":0},{"2021\/10\/31\/":0},{"2021\/10\/30\/":0},{"2021\/10\/29\/":0},{"2021\/10\/28\/":0},{"2021\/10\/27\/":0},{"2021\/10\/26\/":0},{"2021\/10\/25\/":0},{"2021\/10\/24\/":0},{"2021\/10\/23\/":0},{"2021\/10\/22\/":0},{"2021\/10\/21\/":0},{"2021\/10\/20\/":0},{"2021\/10\/19\/":0},{"2021\/10\/18\/":0}],"chart_disk":[{"2021\/11\/16\/":0},{"2021\/11\/15\/":0},{"2021\/11\/14\/":0},{"2021\/11\/13\/":0},{"2021\/11\/12\/":0},{"2021\/11\/11\/":0},{"2021\/11\/10\/":0},{"2021\/11\/09\/":0},{"2021\/11\/08\/":0},{"2021\/11\/07\/":0},{"2021\/11\/06\/":0},{"2021\/11\/05\/":0},{"2021\/11\/04\/":0},{"2021\/11\/03\/":0},{"2021\/11\/02\/":0},{"2021\/11\/01\/":0},{"2021\/10\/31\/":0},{"2021\/10\/30\/":0},{"2021\/10\/29\/":0},{"2021\/10\/28\/":0},{"2021\/10\/27\/":0},{"2021\/10\/26\/":0},{"2021\/10\/25\/":0},{"2021\/10\/24\/":0},{"2021\/10\/23\/":0},{"2021\/10\/22\/":0},{"2021\/10\/21\/":0},{"2021\/10\/20\/":0},{"2021\/10\/19\/":0},{"2021\/10\/18\/":0}]} \ No newline at end of file diff --git a/admin/logs/counts/total-files-14e91806a26be2aa8d8df5370b78fefc.php b/admin/logs/counts/total-files-14e91806a26be2aa8d8df5370b78fefc.php deleted file mode 100755 index 65b3248..0000000 --- a/admin/logs/counts/total-files-14e91806a26be2aa8d8df5370b78fefc.php +++ /dev/null @@ -1 +0,0 @@ -{"filename":"14e91806a26be2aa8d8df5370b78fefc","date":"2021111711","total_time":"2021-11-17 11:12:43","dirnum":5,"filenum":42,"usage_space":"2.13MB","todayUpload":10,"yestUpload":0} \ No newline at end of file diff --git a/admin/logs/counts/total-files-6b20c35069d8821f92d9f88d9ae4c6da.php b/admin/logs/counts/total-files-6b20c35069d8821f92d9f88d9ae4c6da.php deleted file mode 100755 index 918921c..0000000 --- a/admin/logs/counts/total-files-6b20c35069d8821f92d9f88d9ae4c6da.php +++ /dev/null @@ -1 +0,0 @@ -{"filename":"6b20c35069d8821f92d9f88d9ae4c6da","date":"2021111700","total_time":"2021-11-17 00:03:22","dirnum":4,"filenum":2,"usage_space":"10.81KB","todayUpload":0,"yestUpload":0} \ No newline at end of file diff --git a/admin/logs/upload/2021-11.php b/admin/logs/upload/2021-11.php deleted file mode 100755 index 1f0b2ea..0000000 --- a/admin/logs/upload/2021-11.php +++ /dev/null @@ -1,33 +0,0 @@ - -{"shztjo.jpg":{"date":"2021-11-16 17:23:27","ip":"0.0.0.0","user_agent":"Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/86.0.4240.198 Safari\/537.36","path":"http:\/\/localhost\/i\/2021\/11\/16\/shztjo.jpg","cache":null}} -{"3ba19e.jpg":{"date":"2021-11-17 02:00:34","ip":"0.0.0.0","user_agent":"Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/86.0.4240.198 Safari\/537.36","path":"http:\/\/localhost\/i\/2021\/11\/17\/3ba19e.jpg","cache":null}} -{"3ba5r6.jpg":{"date":"2021-11-17 02:00:34","ip":"0.0.0.0","user_agent":"Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/86.0.4240.198 Safari\/537.36","path":"http:\/\/localhost\/i\/2021\/11\/17\/3ba5r6.jpg","cache":null}} -{"3ba5gm.jpg":{"date":"2021-11-17 02:00:34","ip":"0.0.0.0","user_agent":"Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/86.0.4240.198 Safari\/537.36","path":"http:\/\/localhost\/i\/2021\/11\/17\/3ba5gm.jpg","cache":null}} -{"3ba6xu.jpg":{"date":"2021-11-17 02:00:34","ip":"0.0.0.0","user_agent":"Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/86.0.4240.198 Safari\/537.36","path":"http:\/\/localhost\/i\/2021\/11\/17\/3ba6xu.jpg","cache":null}} -{"3ba5vp.jpg":{"date":"2021-11-17 02:00:34","ip":"0.0.0.0","user_agent":"Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/86.0.4240.198 Safari\/537.36","path":"http:\/\/localhost\/i\/2021\/11\/17\/3ba5vp.jpg","cache":null}} -{"3ba3e6.jpg":{"date":"2021-11-17 02:00:34","ip":"0.0.0.0","user_agent":"Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/86.0.4240.198 Safari\/537.36","path":"http:\/\/localhost\/i\/2021\/11\/17\/3ba3e6.jpg","cache":null}} -{"x4s12t.jpg":{"date":"2021-11-17 02:00:34","ip":"0.0.0.0","user_agent":"Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/86.0.4240.198 Safari\/537.36","path":"http:\/\/localhost\/i\/2021\/11\/17\/x4s12t.jpg","cache":null}} -{"3ba52z.jpg":{"date":"2021-11-17 02:00:34","ip":"0.0.0.0","user_agent":"Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/86.0.4240.198 Safari\/537.36","path":"http:\/\/localhost\/i\/2021\/11\/17\/3ba52z.jpg","cache":null}} -{"3ba6o6.jpg":{"date":"2021-11-17 02:00:34","ip":"0.0.0.0","user_agent":"Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/86.0.4240.198 Safari\/537.36","path":"http:\/\/localhost\/i\/2021\/11\/17\/3ba6o6.jpg","cache":null}} -{"3ba4sn.jpg":{"date":"2021-11-17 02:00:34","ip":"0.0.0.0","user_agent":"Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/86.0.4240.198 Safari\/537.36","path":"http:\/\/localhost\/i\/2021\/11\/17\/3ba4sn.jpg","cache":null}} -{"3ba2e5.jpg":{"date":"2021-11-17 02:00:34","ip":"0.0.0.0","user_agent":"Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/86.0.4240.198 Safari\/537.36","path":"http:\/\/localhost\/i\/2021\/11\/17\/3ba2e5.jpg","cache":null}} -{"3ba1y7.jpg":{"date":"2021-11-17 02:00:34","ip":"0.0.0.0","user_agent":"Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/86.0.4240.198 Safari\/537.36","path":"http:\/\/localhost\/i\/2021\/11\/17\/3ba1y7.jpg","cache":null}} -{"3ba416.jpg":{"date":"2021-11-17 02:00:34","ip":"0.0.0.0","user_agent":"Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/86.0.4240.198 Safari\/537.36","path":"http:\/\/localhost\/i\/2021\/11\/17\/3ba416.jpg","cache":null}} -{"3ba3ow.jpg":{"date":"2021-11-17 02:00:34","ip":"0.0.0.0","user_agent":"Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/86.0.4240.198 Safari\/537.36","path":"http:\/\/localhost\/i\/2021\/11\/17\/3ba3ow.jpg","cache":null}} -{"3ba62z.jpg":{"date":"2021-11-17 02:00:35","ip":"0.0.0.0","user_agent":"Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/86.0.4240.198 Safari\/537.36","path":"http:\/\/localhost\/i\/2021\/11\/17\/3ba62z.jpg","cache":null}} -{"3ba918.jpg":{"date":"2021-11-17 02:00:35","ip":"0.0.0.0","user_agent":"Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/86.0.4240.198 Safari\/537.36","path":"http:\/\/localhost\/i\/2021\/11\/17\/3ba918.jpg","cache":null}} -{"3baal0.jpg":{"date":"2021-11-17 02:00:35","ip":"0.0.0.0","user_agent":"Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/86.0.4240.198 Safari\/537.36","path":"http:\/\/localhost\/i\/2021\/11\/17\/3baal0.jpg","cache":null}} -{"3bacf1.jpg":{"date":"2021-11-17 02:00:35","ip":"0.0.0.0","user_agent":"Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/86.0.4240.198 Safari\/537.36","path":"http:\/\/localhost\/i\/2021\/11\/17\/3bacf1.jpg","cache":null}} -{"3ba8yv.jpg":{"date":"2021-11-17 02:00:35","ip":"0.0.0.0","user_agent":"Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/86.0.4240.198 Safari\/537.36","path":"http:\/\/localhost\/i\/2021\/11\/17\/3ba8yv.jpg","cache":null}} -{"3ba8hu.jpg":{"date":"2021-11-17 02:00:35","ip":"0.0.0.0","user_agent":"Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/86.0.4240.198 Safari\/537.36","path":"http:\/\/localhost\/i\/2021\/11\/17\/3ba8hu.jpg","cache":null}} -{"3bac8v.jpg":{"date":"2021-11-17 02:00:35","ip":"0.0.0.0","user_agent":"Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/86.0.4240.198 Safari\/537.36","path":"http:\/\/localhost\/i\/2021\/11\/17\/3bac8v.jpg","cache":null}} -{"3bac5p.jpg":{"date":"2021-11-17 02:00:35","ip":"0.0.0.0","user_agent":"Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/86.0.4240.198 Safari\/537.36","path":"http:\/\/localhost\/i\/2021\/11\/17\/3bac5p.jpg","cache":null}} -{"3ba903.jpg":{"date":"2021-11-17 02:00:35","ip":"0.0.0.0","user_agent":"Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/86.0.4240.198 Safari\/537.36","path":"http:\/\/localhost\/i\/2021\/11\/17\/3ba903.jpg","cache":null}} -{"3baa91.jpg":{"date":"2021-11-17 02:00:35","ip":"0.0.0.0","user_agent":"Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/86.0.4240.198 Safari\/537.36","path":"http:\/\/localhost\/i\/2021\/11\/17\/3baa91.jpg","cache":null}} -{"3ba8hw.jpg":{"date":"2021-11-17 02:00:35","ip":"0.0.0.0","user_agent":"Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/86.0.4240.198 Safari\/537.36","path":"http:\/\/localhost\/i\/2021\/11\/17\/3ba8hw.jpg","cache":null}} -{"3badg8.jpg":{"date":"2021-11-17 02:00:35","ip":"0.0.0.0","user_agent":"Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/86.0.4240.198 Safari\/537.36","path":"http:\/\/localhost\/i\/2021\/11\/17\/3badg8.jpg","cache":null}} -{"3ba9tz.jpg":{"date":"2021-11-17 02:00:36","ip":"0.0.0.0","user_agent":"Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/86.0.4240.198 Safari\/537.36","path":"http:\/\/localhost\/i\/2021\/11\/17\/3ba9tz.jpg","cache":null}} -{"3bafpq.jpg":{"date":"2021-11-17 02:00:36","ip":"0.0.0.0","user_agent":"Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/86.0.4240.198 Safari\/537.36","path":"http:\/\/localhost\/i\/2021\/11\/17\/3bafpq.jpg","cache":null}} -{"3bamgu.jpg":{"date":"2021-11-17 02:00:36","ip":"0.0.0.0","user_agent":"Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/86.0.4240.198 Safari\/537.36","path":"http:\/\/localhost\/i\/2021\/11\/17\/3bamgu.jpg","cache":null}} -{"3baio3.jpg":{"date":"2021-11-17 02:00:36","ip":"0.0.0.0","user_agent":"Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/86.0.4240.198 Safari\/537.36","path":"http:\/\/localhost\/i\/2021\/11\/17\/3baio3.jpg","cache":null}} -{"igqgo1.jpg":{"date":"2021-11-17 11:16:49","ip":"0.0.0.0","user_agent":"Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/86.0.4240.198 Safari\/537.36","path":"http:\/\/localhost\/i\/2021\/11\/17\/igqgo1.jpg","cache":null}} \ No newline at end of file diff --git a/admin/logs/verson/verson.json b/admin/logs/verson/verson.json deleted file mode 100755 index b4422c8..0000000 --- a/admin/logs/verson/verson.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "url": "https://api.github.com/repos/icret/EasyImages2.0/releases/53348517", - "assets_url": "https://api.github.com/repos/icret/EasyImages2.0/releases/53348517/assets", - "upload_url": "https://uploads.github.com/repos/icret/EasyImages2.0/releases/53348517/assets{?name,label}", - "html_url": "https://github.com/icret/EasyImages2.0/releases/tag/2.4.2", - "id": 53348517, - "author": { - "login": "icret", - "id": 16373024, - "node_id": "MDQ6VXNlcjE2MzczMDI0", - "avatar_url": "https://avatars.githubusercontent.com/u/16373024?v=4", - "gravatar_id": "", - "url": "https://api.github.com/users/icret", - "html_url": "https://github.com/icret", - "followers_url": "https://api.github.com/users/icret/followers", - "following_url": "https://api.github.com/users/icret/following{/other_user}", - "gists_url": "https://api.github.com/users/icret/gists{/gist_id}", - "starred_url": "https://api.github.com/users/icret/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/icret/subscriptions", - "organizations_url": "https://api.github.com/users/icret/orgs", - "repos_url": "https://api.github.com/users/icret/repos", - "events_url": "https://api.github.com/users/icret/events{/privacy}", - "received_events_url": "https://api.github.com/users/icret/received_events", - "type": "User", - "site_admin": false - }, - "node_id": "RE_kwDOCzgjBc4DLgil", - "tag_name": "2.4.2", - "target_commitish": "master", - "name": "EasyImage2.0 简单图床 ver:2.4.2", - "draft": false, - "prerelease": false, - "created_at": "2021-11-14T15:25:21Z", - "published_at": "2021-11-15T02:17:03Z", - "assets": [ - - ], - "tarball_url": "https://api.github.com/repos/icret/EasyImages2.0/tarball/2.4.2", - "zipball_url": "https://api.github.com/repos/icret/EasyImages2.0/zipball/2.4.2", - "body": "- 2021-11-14 v2.4.2\r\n- 增加上传日志" -} diff --git a/public/.htaccess b/public/.htaccess deleted file mode 100755 index 6560465..0000000 --- a/public/.htaccess +++ /dev/null @@ -1,4 +0,0 @@ - -Order allow,deny -Deny from all - \ No newline at end of file diff --git a/public/static/verifycode.js b/public/static/verifycode.js deleted file mode 100755 index 7b08807..0000000 --- a/public/static/verifycode.js +++ /dev/null @@ -1,73 +0,0 @@ -$(function () { - var show_num = []; - draw(show_num); - $("#canvas").on('click', function () { - draw(show_num); - }) - $(".btn").on('click', function () { - var val = $(".input-val").val().toLowerCase(); - var num = show_num.join(""); - if (val == '') { - alert('请输入验证码!'); - } else if (val == num) { - alert('提交成功!'); - $(".input-val").val(''); - // draw(show_num); - } else { - alert('验证码错误!请重新输入!'); - $(".input-val").val(''); - // draw(show_num); - } - }) -}) -//生成并渲染出验证码图形 -function draw(show_num) { - var canvas_width = $('#canvas').width(); - var canvas_height = $('#canvas').height(); - var canvas = document.getElementById("canvas"); //获取到canvas的对象,演员 - var context = canvas.getContext("2d"); //获取到canvas画图的环境,演员表演的舞台 - canvas.width = canvas_width; - canvas.height = canvas_height; - var sCode = "a,b,c,d,e,f,g,h,i,j,k,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,E,F,G,H,J,K,L,M,N,P,Q,R,S,T,W,X,Y,Z,1,2,3,4,5,6,7,8,9,0"; - var aCode = sCode.split(","); - var aLength = aCode.length; //获取到数组的长度 - for (var i = 0; i < 4; i++) { //这里的for循环可以控制验证码位数(如果想显示6位数,4改成6即可) - var j = Math.floor(Math.random() * aLength); //获取到随机的索引值 - // var deg = Math.random() * 30 * Math.PI / 180;//产生0~30之间的随机弧度 - var deg = Math.random() - 0.5; //产生一个随机弧度 - var txt = aCode[j]; //得到随机的一个内容 - show_num[i] = txt.toLowerCase(); - var x = 10 + i * 20; //文字在canvas上的x坐标 - var y = 20 + Math.random() * 8; //文字在canvas上的y坐标 - context.font = "bold 23px 微软雅黑"; - context.translate(x, y); - context.rotate(deg); - context.fillStyle = randomColor(); - context.fillText(txt, 0, 0); - context.rotate(-deg); - context.translate(-x, -y); - } - for (var i = 0; i <= 5; i++) { //验证码上显示线条 - context.strokeStyle = randomColor(); - context.beginPath(); - context.moveTo(Math.random() * canvas_width, Math.random() * canvas_height); - context.lineTo(Math.random() * canvas_width, Math.random() * canvas_height); - context.stroke(); - } - for (var i = 0; i <= 30; i++) { //验证码上显示小点 - context.strokeStyle = randomColor(); - context.beginPath(); - var x = Math.random() * canvas_width; - var y = Math.random() * canvas_height; - context.moveTo(x, y); - context.lineTo(x + 1, y + 1); - context.stroke(); - } -} -//得到随机的颜色值 -function randomColor() { - var r = Math.floor(Math.random() * 256); - var g = Math.floor(Math.random() * 256); - var b = Math.floor(Math.random() * 256); - return "rgb(" + r + "," + g + "," + b + ")"; -} \ No newline at end of file