登录页:滑动验证加载以及监听处理
This commit is contained in:
parent
7746171721
commit
72ea9ab623
BIN
src/assets/images/login/Rectangle 381.jpg
Normal file
BIN
src/assets/images/login/Rectangle 381.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 62 KiB |
BIN
src/assets/images/login/Rectangle 382.jpg
Normal file
BIN
src/assets/images/login/Rectangle 382.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 52 KiB |
BIN
src/assets/images/login/Rectangle 383.jpg
Normal file
BIN
src/assets/images/login/Rectangle 383.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 79 KiB |
BIN
src/assets/images/login/Rectangle 384.jpg
Normal file
BIN
src/assets/images/login/Rectangle 384.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 64 KiB |
BIN
src/assets/images/login/Rectangle 385.jpg
Normal file
BIN
src/assets/images/login/Rectangle 385.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 107 KiB |
@ -92,7 +92,6 @@
|
|||||||
<el-form-item style="margin-top: 25px" label="" prop="password">
|
<el-form-item style="margin-top: 25px" label="" prop="password">
|
||||||
<!-- @keyup.enter.native="loginFn" -->
|
<!-- @keyup.enter.native="loginFn" -->
|
||||||
<el-input
|
<el-input
|
||||||
@change="onChange2"
|
|
||||||
v-model="form.password"
|
v-model="form.password"
|
||||||
style="height: 53px; font-size: 16px"
|
style="height: 53px; font-size: 16px"
|
||||||
type="password"
|
type="password"
|
||||||
@ -212,6 +211,7 @@
|
|||||||
:r="10"
|
:r="10"
|
||||||
:w="330"
|
:w="330"
|
||||||
:h="175"
|
:h="175"
|
||||||
|
:imgs="imageList"
|
||||||
slider-text="向右滑动滑块填充拼图"
|
slider-text="向右滑动滑块填充拼图"
|
||||||
ref="slideverify"
|
ref="slideverify"
|
||||||
@success="onSuccess"
|
@success="onSuccess"
|
||||||
@ -260,10 +260,11 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
msg: '',
|
msg: '',
|
||||||
|
oldVal:'',
|
||||||
show: false,
|
show: false,
|
||||||
showVerify:false,
|
showVerify:false, // 滑动验证
|
||||||
verificateBtn:false,//验证按钮
|
verificateBtn:false, //验证按钮
|
||||||
pass:true,
|
pass:true, // 登录按钮
|
||||||
input: "",
|
input: "",
|
||||||
radio: "",
|
radio: "",
|
||||||
projectType: "",
|
projectType: "",
|
||||||
@ -316,6 +317,13 @@ export default {
|
|||||||
platformLogo: "",
|
platformLogo: "",
|
||||||
platformName: "",
|
platformName: "",
|
||||||
},
|
},
|
||||||
|
imageList:[
|
||||||
|
require('../../assets/images/login/Rectangle 381.jpg'),
|
||||||
|
require('../../assets/images/login/Rectangle 382.jpg'),
|
||||||
|
require('../../assets/images/login/Rectangle 383.jpg'),
|
||||||
|
require('../../assets/images/login/Rectangle 384.jpg'),
|
||||||
|
require('../../assets/images/login/Rectangle 385.jpg'),
|
||||||
|
]
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
@ -327,7 +335,19 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
window._paq.push(["trackEvent", "点击", "登录", "使用账号登录"]);
|
window._paq.push(["trackEvent", "点击", "登录", "使用账号登录"]);
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
// oldVal:{
|
||||||
|
// handler(n,o){
|
||||||
|
// console.log(n,o);
|
||||||
|
// if(n!= o){
|
||||||
|
// console.log('====监听不一样')
|
||||||
|
// this.showVerify = true,
|
||||||
|
// this.pass = false
|
||||||
|
// }
|
||||||
|
// },
|
||||||
|
// deep:true,
|
||||||
|
// immediate:false
|
||||||
|
// }
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.company = COMPANY;
|
this.company = COMPANY;
|
||||||
@ -369,35 +389,28 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
onChange1(e){
|
onChange1(val){
|
||||||
if(e!=this.form.account){
|
if(this.oldVal != ''){
|
||||||
// this.verificateBtn = false
|
if(this.oldVal != this.form){
|
||||||
// this.showVerify = true
|
this.verificateBtn = false,
|
||||||
}
|
this.pass = true
|
||||||
},
|
}
|
||||||
onChange2(e){
|
}
|
||||||
if(e!=this.form.password){
|
|
||||||
// this.verificateBtn = false
|
|
||||||
// this.showVerify = true
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
onReset() {
|
onReset() {
|
||||||
//重置图片验证组件
|
//重置图片验证组件
|
||||||
this.$refs.slideverify.reset();
|
this.$refs.slideverify.reset();
|
||||||
},
|
},
|
||||||
onSuccess(){
|
onSuccess(){
|
||||||
setTimeout(()=>{
|
this.oldVal = this.form.account
|
||||||
this.showVerify = false
|
this.verificateBtn = true
|
||||||
this.verificateBtn = true
|
this.showVerify = false
|
||||||
this.pass = false
|
this.pass = false
|
||||||
},100)
|
},
|
||||||
},
|
|
||||||
onFail(){
|
onFail(){
|
||||||
this.msg = '验证失败'
|
this.msg = '验证失败'
|
||||||
},
|
},
|
||||||
onRefresh(){
|
onRefresh(){},
|
||||||
this.msg = ''
|
|
||||||
},
|
|
||||||
getData() {
|
getData() {
|
||||||
getOneComputerAuthApi().then((res) => {
|
getOneComputerAuthApi().then((res) => {
|
||||||
if (res.result) {
|
if (res.result) {
|
||||||
@ -431,7 +444,7 @@ export default {
|
|||||||
goSignIn() {
|
goSignIn() {
|
||||||
this.$router.push({ path: "/sign" });
|
this.$router.push({ path: "/sign" });
|
||||||
},
|
},
|
||||||
// 验证
|
// 立即验证
|
||||||
verificateFn(){
|
verificateFn(){
|
||||||
this.showVerify = true
|
this.showVerify = true
|
||||||
// this.$bus.$emit('resetSlideVerify')
|
// this.$bus.$emit('resetSlideVerify')
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user