Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
H
hr_book_store
Project
Project
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
Graph
比较
统计图
议题
0
议题
0
列表
看板
标记
Milestones
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
注册表
注册表
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
袁龙涛
hr_book_store
Commits
f9e06108
提交
f9e06108
authored
5月 20, 2020
作者:
liupengfei
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
滑动验证码图片 400*200 抠图 61*200
上级
fe265f84
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
21 行增加
和
22 行删除
+21
-22
VerifyPoints.vue
src/components/verifition/Verify/VerifyPoints.vue
+11
-12
VerifySlide.vue
src/components/verifition/Verify/VerifySlide.vue
+10
-10
没有找到文件。
src/components/verifition/Verify/VerifyPoints.vue
浏览文件 @
f9e06108
...
...
@@ -22,7 +22,7 @@
<!--
<canvas
:width=
"setSize.imgWidth"
:height=
"setSize.imgHeight"
ref=
"canvas"
@
click=
"bindingClick?canvasClick($event):undefined"
></canvas>
-->
<img
:src=
"'data:image/png;base64,'+pointBackImgBase"
<img
:src=
"'data:image/png;base64,'+pointBackImgBase"
ref=
"canvas"
alt=
""
style=
"width:100%;height:100%;display:block"
@
click=
"bindingClick?canvasClick($event):undefined"
>
...
...
@@ -60,7 +60,7 @@
* VerifyPoints
* @description 点选
* */
import
{
resetSize
,
_code_chars
,
_code_color1
,
_code_color2
}
from
'./../utils/util'
...
...
@@ -118,8 +118,8 @@
type
:
Object
,
default
()
{
return
{
width
:
'
31
0px'
,
height
:
'
155
px'
width
:
'
40
0px'
,
height
:
'
200
px'
}
}
},
...
...
@@ -127,7 +127,7 @@
type
:
Object
,
default
()
{
return
{
width
:
'
31
0px'
,
width
:
'
40
0px'
,
height
:
'40px'
}
}
...
...
@@ -282,9 +282,9 @@
//获取坐标
getMousePos
:
function
(
obj
,
e
)
{
// console.log(e);
var
x
=
e
.
offsetX
var
y
=
e
.
offsetY
var
x
=
e
.
offsetX
var
y
=
e
.
offsetY
return
{
x
,
y
}
},
...
...
@@ -377,8 +377,8 @@
//坐标转换函数
pointTransfrom
(
pointArr
,
imgSize
){
var
newPointArr
=
pointArr
.
map
(
p
=>
{
let
x
=
Math
.
round
(
310
*
p
.
x
/
parseInt
(
imgSize
.
imgWidth
))
let
y
=
Math
.
round
(
155
*
p
.
y
/
parseInt
(
imgSize
.
imgHeight
))
let
x
=
Math
.
round
(
400
*
p
.
x
/
parseInt
(
imgSize
.
imgWidth
))
let
y
=
Math
.
round
(
200
*
p
.
y
/
parseInt
(
imgSize
.
imgHeight
))
return
{
x
,
y
}
})
// console.log(newPointArr,"newPointArr");
...
...
@@ -407,4 +407,4 @@
}
}
}
</
script
>
\ No newline at end of file
</
script
>
src/components/verifition/Verify/VerifySlide.vue
浏览文件 @
f9e06108
...
...
@@ -11,7 +11,7 @@
<div
style=
"position: relative;"
>
<!-- puzzle的情况 -->
<div
v-if=
"type === '2'"
class=
"verify-img-out"
v-show=
"showImage"
:style=
"
{height: (parseInt(setSize.imgHeight) + vSpace) + 'px'}"
...
...
@@ -48,8 +48,8 @@
<!-- 'background': 'url(data:image/png;base64,'+ blockBackImgBase + ')', -->
<div
v-if=
"type === '2'"
class=
"verify-sub-block"
:style=
"
{'width':Math.ceil(parseInt(setSize.imgWidth)*
50/31
0)+ 'px' ,
:style=
"
{'width':Math.ceil(parseInt(setSize.imgWidth)*
61/40
0)+ 'px' ,
'height': setSize.imgHeight,
'top':'-' + (parseInt(setSize.imgHeight) + vSpace) + 'px',
'background-size': setSize.imgWidth + ' ' + setSize.imgHeight,
...
...
@@ -114,8 +114,8 @@
type
:
Object
,
default
()
{
return
{
width
:
'
31
0px'
,
height
:
'
155
px'
width
:
'
40
0px'
,
height
:
'
200
px'
}
}
},
...
...
@@ -132,7 +132,7 @@
type
:
Object
,
default
()
{
return
{
width
:
'
31
0px'
,
width
:
'
40
0px'
,
height
:
'40px'
}
}
...
...
@@ -287,13 +287,13 @@
//鼠标松开
end
:
function
()
{
this
.
endMovetime
=
+
new
Date
();
this
.
endMovetime
=
+
new
Date
();
var
_this
=
this
;
// 判断是否重合
if
(
this
.
status
&&
this
.
isEnd
==
false
)
{
if
(
this
.
type
!==
'1'
)
{
//图片滑动
var
moveLeftDistance
=
parseInt
((
this
.
moveBlockLeft
||
''
).
replace
(
'px'
,
''
));
moveLeftDistance
=
moveLeftDistance
*
31
0
/
parseInt
(
this
.
setSize
.
imgWidth
)
moveLeftDistance
=
moveLeftDistance
*
40
0
/
parseInt
(
this
.
setSize
.
imgWidth
)
let
data
=
{
captchaType
:
this
.
captchaType
,
...
...
@@ -308,7 +308,7 @@
this
.
iconColor
=
'#fff'
this
.
iconClass
=
'icon-check'
this
.
showRefresh
=
false
this
.
isEnd
=
true
;
this
.
isEnd
=
true
;
if
(
this
.
mode
==
'pop'
)
{
setTimeout
(()
=>
{
this
.
$parent
.
clickShow
=
false
;
...
...
@@ -468,7 +468,7 @@
}
},
// created(){
// },
i18n
:
{
messages
:
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论