| | |
| | | <div class="tools-item" @click="bindingUkey.show=true"> |
| | | <span class="iconfont icon-ukey-blue"></span> |
| | | </div> |
| | | <div class="tools-item" @click="face.show=true"> |
| | | <!-- <div class="tools-item" @click="face.show=true"> |
| | | <span class="iconfont icon-renlianshibie"></span> |
| | | </div> |
| | | </div> --> |
| | | </div> |
| | | <div class="login"> |
| | | <div class="login-header"> |
| | |
| | | </div> |
| | | <div class="login-content"> |
| | | <div class="tieta-img"><img src="./iview/images/logo.png" alt=""></div> |
| | | <div class="input-contain"> |
| | | <i-input |
| | | v-model="info.name" |
| | | placeholder="请输入用户名" |
| | | style="width: 80%; margin-top: 10px;" |
| | | @on-focus="userfocus=true" |
| | | @on-blur="userfocus=false"> |
| | | <Icon type="ios-contact" :color="userColor" slot="prefix" /> |
| | | </i-input> |
| | | </div> |
| | | <div class="input-contain"> |
| | | <i-input |
| | | v-model="info.password" |
| | | type="password" |
| | | placeholder="请输入密码" |
| | | style="width: 80%; margin-top: 30px;" |
| | | @on-focus="pwdfoucus=true" |
| | | @on-blur="pwdfoucus=false"> |
| | | <Icon :type="getPwdIcon" :color="pwdColor" slot="prefix" /> |
| | | </i-input> |
| | | </div> |
| | | <div class="btn-contain"> |
| | | <div class="ukey-icon" :class="getUKeyState"><span class="iconfont icon-ukey-blue"></span></div> |
| | | <div class="msg" id="msg">{{msg}}</div> |
| | | <!-- <input type="button" id="sub" value="登录"> --> |
| | | <a href="javascript:;" class="sub" id="sub" @click="showVerify"><span>登录</span><i class="fa fa-spinner faa-spin animated"></i></a> |
| | | </div> |
| | | <template v-if="showPwd"> |
| | | <div class="input-contain"> |
| | | <i-input |
| | | v-model="info.name" |
| | | placeholder="请输入用户名" |
| | | style="width: 80%; margin-top: 10px;" |
| | | @on-focus="userfocus=true" |
| | | @on-blur="userfocus=false"> |
| | | <Icon type="ios-contact" :color="userColor" slot="prefix" /> |
| | | </i-input> |
| | | </div> |
| | | <div class="input-contain"> |
| | | <i-input |
| | | v-model="info.password" |
| | | type="password" |
| | | placeholder="请输入密码" |
| | | style="width: 80%; margin-top: 30px;" |
| | | @on-focus="pwdfoucus=true" |
| | | @on-blur="pwdfoucus=false"> |
| | | <Icon :type="getPwdIcon" :color="pwdColor" slot="prefix" /> |
| | | </i-input> |
| | | </div> |
| | | <div class="btn-contain"> |
| | | <div class="ukey-icon" :class="getUKeyState"><span class="iconfont icon-ukey-blue"></span></div> |
| | | <div class="msg" id="msg">{{msg}}</div> |
| | | <!-- <input type="button" id="sub" value="登录"> --> |
| | | <a href="javascript:;" class="sub" id="sub" @click="showVerify"><span>登录</span><i class="fa fa-spinner faa-spin animated"></i></a> |
| | | </div> |
| | | </template> |
| | | <div class="face-login" v-else> |
| | | <span class="iconfont icon-renlianshibie" title="人脸识别登录" @click="face.show=true"></span> |
| | | <div>点击上图进行人脸识别登录</div> |
| | | </div> |
| | | </div> |
| | | <div class="login-footer"> |
| | | <div class="login-footer" v-if="showPwd"> |
| | | <div class="check-contain"> |
| | | <input type="checkbox" id="check" checked="checked"><span>记住密码</span> |
| | | </div> |
| | | <div class="miss-pwd" @click="guestModal = true"><a href="javascript:void(0);" class="help">游客登录>></a></div> |
| | | <!-- <div class="miss-pwd" @click="guestModal = true"><a href="javascript:void(0);" class="help">游客登录>></a></div> --> |
| | | </div> |
| | | </div> |
| | | <Spin fix v-if="loading"> |
| | |
| | | hCookie: new HCookie(), |
| | | stream: '', |
| | | } |
| | | // ukey对应的用户的登录方式 1为用户名密码 2为人脸 |
| | | ,login_type: 1 |
| | | }, |
| | | watch: { |
| | | userfocus: function() { |
| | |
| | | this.ukey.UPubKeyX=''; |
| | | this.ukey.UPubKeyY=''; |
| | | this.ukey.UKey_ID=''; |
| | | this.login_type = 1; |
| | | }, |
| | | toIndex: function(page) { |
| | | // 存储 |
| | |
| | | // ukey的信息 |
| | | self.ukey.UKey_ID = UK_Data.return_value; |
| | | s_simnew1.GetPubKeyX(DevicePath); |
| | | |
| | | // 根据ukeyid 查询用户的登录方式 |
| | | self.getLoginType(UK_Data.return_value); |
| | | } |
| | | break; |
| | | case 3: |
| | |
| | | |
| | | } |
| | | }, |
| | | // 根据ukeyid 查询用户的登录方式 |
| | | getLoginType: function (uKeyId) { |
| | | var self = this; |
| | | var param = { |
| | | UKey_ID: uKeyId |
| | | }; |
| | | ajax({ |
| | | url: 'User_infAction!searchLoginType', |
| | | data: 'addjson=' + JSON.stringify(param), |
| | | success: function(res) { |
| | | var rs = JSON.parse(res.result); |
| | | |
| | | if(rs.code) { |
| | | self.login_type = rs.data; |
| | | } else { |
| | | self.msg = res.msg; |
| | | } |
| | | }, |
| | | error: function() { |
| | | self.msg = "网络连接失败!"; |
| | | }, |
| | | complete: function() { |
| | | self.verify = false; |
| | | } |
| | | }); |
| | | }, |
| | | guestOk: function() { |
| | | if(this.guest.Upassword.trim()) { |
| | | this.guestLogin(); |
| | |
| | | }, |
| | | error: function() { |
| | | self.msg = "网络连接失败!"; |
| | | }, |
| | | complete: function() { |
| | | self.verify = false; |
| | | } |
| | | // ,complete: function() { |
| | | // self.verify = false; |
| | | // } |
| | | }); |
| | | }, |
| | | guestStateChange: function() { |
| | |
| | | //console.log(this.bConnect); |
| | | return this.bConnect?'blue':''; |
| | | } |
| | | // 是否显示用户名密码面板 |
| | | ,showPwd: function () { |
| | | return !this.bConnect || this.login_type == 1; |
| | | } |
| | | }, |
| | | created: function() { |
| | | // 删除username |