index.html 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. <style type="text/css">
  2. @media (max-width: 375px) {
  3. .edit-form tr td input {
  4. width: 100%;
  5. }
  6. .edit-form tr th:first-child, .edit-form tr td:first-child {
  7. width: 20%;
  8. }
  9. .edit-form tr th:nth-last-of-type(-n+2), .edit-form tr td:nth-last-of-type(-n+2) {
  10. display: none;
  11. }
  12. }
  13. .edit-form table > tbody > tr td a.btn-delcfg {
  14. visibility: hidden;
  15. }
  16. .edit-form table > tbody > tr:hover td a.btn-delcfg {
  17. visibility: visible;
  18. }
  19. .panel {
  20. min-height: 360px;
  21. }
  22. .panel-heading {
  23. background: #fff !important;
  24. border: none !important;
  25. }
  26. .title {
  27. padding: 10px 0;
  28. }
  29. .qrcode img {
  30. width: 120px;
  31. }
  32. .action {
  33. text-align: center;
  34. width: 120px;
  35. }
  36. .name {
  37. width: 120px;
  38. padding: 10px 0;
  39. text-align: center;
  40. }
  41. .url {
  42. padding: 10px 0;
  43. }
  44. </style>
  45. <div class="panel panel-default panel-intro">
  46. <div class="panel-heading">
  47. <div class="title">下载验证器并扫码绑定谷歌验证码:</div>
  48. <div class="qrcode">
  49. <img src="{$qrcode}" alt="">
  50. </div>
  51. <div class="name"><span>账号:{$admin.username}</span></div>
  52. {if !$admin.google_bind}
  53. <div class="action">
  54. <button type="button" class="btn btn-success" onclick="bind()">{:__('确定绑定')}</button>
  55. </div>
  56. {else}
  57. <div class="action">
  58. <button type="button" class="btn btn-primary">{:__('已绑定')}</button>
  59. </div>
  60. {/if}
  61. <div class="url">验证器安卓下载地址:<a href="https://google-authenticator.en.softonic.com/android"
  62. target="_blank">:立即下载</a></div>
  63. <div class="url">验证器IOS下载地址<a href="https://apps.apple.com/cn/app/google-authenticator/id388497605"
  64. target="_blank">:立即下载</a></div>
  65. </div>
  66. </div>
  67. <script>
  68. function bind() {
  69. $.get('general/googlecode/bind', function (res) {
  70. if (res.code == 1) {
  71. layer.msg('绑定成功')
  72. } else {
  73. layer.msg('绑定失败')
  74. }
  75. }, 'json')
  76. }
  77. </script>