update
This commit is contained in:
@@ -21,6 +21,7 @@
|
||||
}
|
||||
|
||||
$(function () {
|
||||
// 监听modal窗口事件
|
||||
$('#exampleModal').on('show.bs.modal', function (event) {
|
||||
console.log(qr_websocket)
|
||||
console.log('打开');
|
||||
@@ -30,11 +31,29 @@
|
||||
}
|
||||
qr_websocket.websocket = ws
|
||||
});
|
||||
|
||||
$('#exampleModal').on('hidden.bs.modal', function (event) {
|
||||
console.log('关闭');
|
||||
qr_websocket.websocket.close()
|
||||
});
|
||||
|
||||
// 点击注册控件
|
||||
$('#register_a').click(function () {
|
||||
$('.log-in-group').hide();
|
||||
$('.register-group').show();
|
||||
set_modal_title('注册');
|
||||
})
|
||||
|
||||
// 点击登录
|
||||
$('#log-in_a').click(function () {
|
||||
$('.log-in-group').show();
|
||||
$('.register-group').hide();
|
||||
set_modal_title('扫码登录');
|
||||
})
|
||||
|
||||
// 设置窗口名称
|
||||
function set_modal_title(title) {
|
||||
$('#exampleModal .modal-title').html(title);
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--script end-->
|
||||
@@ -51,10 +70,34 @@
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<!--log-in start-->
|
||||
<div class="modal-body log-in-group" style="height: 360px;">
|
||||
<img src="https://img0.baidu.com/it/u=3881180510,1470858589&fm=253&fmt=auto&app=138&f=JPEG?w=200&h=200" height="300px">
|
||||
</div>
|
||||
<div class="modal-footer">其他登录方式</div>
|
||||
<div class="modal-footer log-in-group">
|
||||
<a class="nav-link active" id="register_a" href="#">
|
||||
<span data-feather="check-circle"></span>
|
||||
注册
|
||||
</a>
|
||||
</div>
|
||||
<!--log-in end-->
|
||||
|
||||
<!--register start-->
|
||||
<div class="modal-body register-group" style="display: none;height: 360px;">
|
||||
<h1 class="h3 mb-3 font-weight-normal">请输入手机号和密码</h1>
|
||||
<label for="inputEmail" class="sr-only">Email address</label>
|
||||
<input type="email" id="inputEmail" class="form-control" placeholder="Email address" required autofocus>
|
||||
|
||||
<label for="inputPassword" class="sr-only">Password</label>
|
||||
<input type="password" id="inputPassword" class="form-control" placeholder="Password" required>
|
||||
</div>
|
||||
<div class="modal-footer register-group" style="display: none;">
|
||||
<a class="nav-link active" href="#" id="log-in_a">
|
||||
<span data-feather="log-in"></span>
|
||||
登录
|
||||
</a>
|
||||
</div>
|
||||
<!--register end-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user