发布测试版 2.5.0
This commit is contained in:
@@ -185,7 +185,7 @@ body {
|
||||
-->
|
||||
|
||||
<div class="footer">
|
||||
<small class="text-muted">© {{date('Y')}} {{$edition}} {{$version}}</small>
|
||||
<small class="text-muted">© {{date('Y')}} {{$version}}</small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -56,7 +56,7 @@ body {
|
||||
<div class="line line-dashed"></div>
|
||||
|
||||
<div class="text-center">
|
||||
<small class="text-muted">© {{date('Y')}} {{$edition}} {{$version}}</small>
|
||||
<small class="text-muted">© {{date('Y')}} {{$version}}</small>
|
||||
</div>
|
||||
|
||||
<div class="line line-dashed"></div>
|
||||
|
||||
@@ -47,7 +47,7 @@ body {
|
||||
<div class="line line-dashed"></div>
|
||||
|
||||
<div class="text-center">
|
||||
<small class="text-muted">© {{date('Y')}} {{$edition}} {{$version}}</small>
|
||||
<small class="text-muted">© {{date('Y')}} {{$version}}</small>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
@@ -55,11 +55,7 @@
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label">安全密钥</label>
|
||||
<strong>{{$user->auth_secret}}</strong>
|
||||
<span class="qrcodeTotp" style="display:none;">
|
||||
<div id="qrcode_canvas"></div>
|
||||
<div id="qrcode_img"></div>
|
||||
</span>
|
||||
<code>{{$user->auth_secret}}</code>
|
||||
<a href="javascript:;" onclick="qrcodeTotp();">
|
||||
<i class="fa fa-qrcode"></i>
|
||||
</a>
|
||||
@@ -82,27 +78,18 @@
|
||||
<script type="text/javascript" src="{{$asset_url}}/vendor/jquery.qrcode.min.js"></script>
|
||||
<script>
|
||||
function qrcodeTotp() {
|
||||
$.messager.alert("二次验证二维码", '<div align="center">' + $("#qrcode_img").prop("outerHTML") + '</div>');
|
||||
}
|
||||
|
||||
function qrcodeMake(qrcode_canvas, qrcode_image) {
|
||||
$("#" + qrcode_canvas).qrcode({
|
||||
$.messager.alert("二次验证二维码", '<div align="center" id="secret-qrcode"></div>');
|
||||
$("#secret-qrcode").qrcode({
|
||||
render: "canvas",
|
||||
text: "{{$secretURL}}",
|
||||
correctLevel: 1,
|
||||
width: 220,
|
||||
height: 220
|
||||
width: 200,
|
||||
height: 200
|
||||
});
|
||||
var canvas = $('#' + qrcode_canvas).find('canvas')[0];
|
||||
var image = new Image();
|
||||
image.src = canvas.toDataURL("image/png");
|
||||
$('#' + qrcode_image).append(image);
|
||||
}
|
||||
|
||||
$(function() {
|
||||
|
||||
// 生成二维码
|
||||
qrcodeMake('qrcode_canvas', 'qrcode_img');
|
||||
// 主题修改
|
||||
$('#change-theme').on('change', function() {
|
||||
var e = $(this).val();
|
||||
|
||||
@@ -11,9 +11,6 @@
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var action = '{{$form["action"]}}';
|
||||
var table = '{{$form["table"]}}';
|
||||
|
||||
function getAuthSecret(userId) {
|
||||
$.messager.confirm('操作警告', '确定要更新安全密钥。', function(btn) {
|
||||
if (btn == true) {
|
||||
@@ -24,13 +21,27 @@ function getAuthSecret(userId) {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
$(function() {
|
||||
function showSecretQrcode() {
|
||||
$.messager.alert('二次验证二维码','<div align="center" id="secret-qrcode"></div>');
|
||||
$('#secret-qrcode').qrcode({
|
||||
render: "canvas",
|
||||
text: "{{$secret_qrcode}}",
|
||||
width: 200,
|
||||
height: 200
|
||||
});
|
||||
}
|
||||
(function($) {
|
||||
var table = '{{$form["table"]}}';
|
||||
var action = '{{$form["action"]}}';
|
||||
if (action == 'show') {
|
||||
var text = $('#user_auth_secret').text();
|
||||
if (text) {
|
||||
$('#user_auth_secret').html('<a href="javascript:;" id="secretQrcode" onclick="showSecretQrcode();"><code id="secret">'+ text +'</code> <i class="fa fa-qrcode"></i></a>');
|
||||
}
|
||||
} else {
|
||||
var text = $('#user_auth_secret').data('content');
|
||||
$('#user_auth_secret').html('<input type="hidden" id="user_auth_secret_value" name="user[auth_secret]" value="'+ text +'"><code id="secret">' + text + '</code> <a class="btn btn-info btn-xs" onclick="getAuthSecret();" href="javascript:;">更新</a>');
|
||||
}
|
||||
$('#user_auth_secret').html('<input type="hidden" id="user_auth_secret_value" name="user[auth_secret]" value="'+ text +'"><code id="secret">' + text + '</code><a class="btn btn-info btn-xs" onclick="getAuthSecret();" href="javascript:;">更新</a>');
|
||||
});
|
||||
|
||||
})(jQuery);
|
||||
</script>
|
||||
Reference in New Issue
Block a user