|
@@ -1,6 +1,6 @@
|
|
|
- Vue.component('login',{
|
|
|
+Vue.component('login',{
|
|
|
template:`
|
|
|
- <div v-bind:style="style.box" align="center">
|
|
|
+ <div type="login" v-on:click="on.button.exit()" v-bind:style="style.box" align="center">
|
|
|
<div v-bind:style="style.frame">
|
|
|
<label v-bind:style="style.label">
|
|
|
<span v-bind:style="style.head">登录</span>
|
|
@@ -20,7 +20,7 @@
|
|
|
<label v-bind:style="style.label">
|
|
|
<button v-on:click="on.button.QR_code()" v-bind:style="[style.button,style.button[2]]">扫码</button>
|
|
|
<button v-on:click="on.button.login()" v-bind:style="[style.button,style.button[2]]">登录</button>
|
|
|
- <button v-on:click="on.button.exit()" v-bind:style="[style.button,style.button[1]]">关闭</button>
|
|
|
+ <button v-on:click="on.button.exit()" type="quit" v-bind:style="[style.button,style.button[1]]">关闭</button>
|
|
|
</label>
|
|
|
<label v-bind:style="style.qr.box">
|
|
|
<img v-bind:style="style.qr.img" width="100" height="100" alt=""/>
|
|
@@ -145,13 +145,15 @@
|
|
|
} else {
|
|
|
info.innerText = '';
|
|
|
}
|
|
|
- input.style.borderColor = '#c3c3c3';
|
|
|
+ input.style.borderColor = '#c3c3c3';
|
|
|
}
|
|
|
},
|
|
|
button:{
|
|
|
exit:function () {
|
|
|
- $(event.target).parent('label').parent('div').parent('div').css('display','none');
|
|
|
- },
|
|
|
+ if ($("div[type='login']").is(event.target) || $("button[type='quit']").is(event.target)){
|
|
|
+ $("div[type='login']").css('display','none');
|
|
|
+ }
|
|
|
+ },
|
|
|
login:function () {
|
|
|
var message = $(event.target).parent('label').prevAll('label');
|
|
|
var account = $(message[1]).find('input').val();
|
|
@@ -193,6 +195,7 @@
|
|
|
QR_code:function(){
|
|
|
let qr_info = {
|
|
|
time:new Date(),
|
|
|
+
|
|
|
}
|
|
|
$(event.target).parent('label').next('label').find('img').attr('src','http://qrs.kegood.com/?url='+JSON.stringify(qr_info))
|
|
|
$(event.target).parent('label').parent('div').find('label').css('display','none')
|