| | |
| | | </li> |
| | | </ul> |
| | | <ul class="layui-nav layui-layout-right"> |
| | | <li class="layui-nav-item" lay-unselect id="activation-icon"> |
| | | <a ew-event="license" title="token"><i class="layui-icon layui-icon-auz"></i></a> |
| | | </li> |
| | | <li class="layui-nav-item" lay-unselect> |
| | | <a ew-event="note" title="便签"><i class="layui-icon layui-icon-note"></i></a> |
| | | </li> |
| | |
| | | base: baseUrl + "/static/layui/lay/modules/" |
| | | }).extend({ |
| | | notice: 'notice/notice', |
| | | }).use(['index', 'element', 'layer', 'admin', 'notice'], function () { |
| | | }).use(['index', 'element', 'layer', 'admin', 'notice', 'form'], function () { |
| | | var $ = layui.jquery; |
| | | var index = layui.index; |
| | | var element = layui.element; |
| | | var layer = layui.layer; |
| | | var admin = layui.admin; |
| | | var notice = layui.notice; |
| | | var form = layui.form; |
| | | |
| | | var easywebIframeMsg = localStorage.getItem("easyweb-iframe"); |
| | | if (!isEmpty(easywebIframeMsg)) { |
| | |
| | | } |
| | | |
| | | $.ajax({ |
| | | url: baseUrl + "/system/activation/auth", |
| | | method: 'GET', |
| | | async: false, |
| | | success: function (res) { |
| | | if (res.code === 200) { |
| | | $("#activation-icon").hide(); |
| | | } else { |
| | | $("#activation-icon").click(); |
| | | } |
| | | } |
| | | }); |
| | | |
| | | $.ajax({ |
| | | url: baseUrl + "/menu/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | method: 'POST', |
| | | // async: false, |
| | | success: function (res) { |
| | | // 关闭加载动画 |
| | | $('.layuimini-loader').fadeOut(); |
| | | if (res.code === 200) { |
| | | var tpl = $('#menuTpl').html(); |
| | |
| | | } |
| | | }); |
| | | |
| | | // 默认加载主页 |
| | | form.on('submit(saveLicense)', function (data) { |
| | | $.ajax({ |
| | | url: baseUrl+"/system/license/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: data.field, |
| | | method: 'POST', |
| | | success: function (res) { |
| | | if (res.code === 200) { |
| | | alert("授权成功"); |
| | | window.location.reload(); |
| | | } else if (res.code === 403) { |
| | | top.location.href = baseUrl+"/login"; |
| | | } else { |
| | | layer.msg(res.msg, {icon: 2}) |
| | | } |
| | | } |
| | | }); |
| | | return false; |
| | | }) |
| | | |
| | | index.loadHome({ |
| | | menuPath: baseUrl+'/views/home/navigation.html', |
| | | menuName: '<i class="layui-icon layui-icon-home"></i>' |
| | |
| | | admin.closeAllTabs(); |
| | | }); |
| | | |
| | | // 替换退出按钮变量 |
| | | var logout = document.getElementById('logout'); |
| | | var url = logout.getAttribute('href'); |
| | | logout.setAttribute('href', baseUrl + "/login"); |
| | |
| | | </li> |
| | | {{/each}} |
| | | </script> |
| | | <script type="text/html" id="license-box"> |
| | | <form class="layui-form" style="padding-right: 10px"> |
| | | <div class="layui-form-item" style="padding: 20px 25px"> |
| | | <textarea name="license" placeholder="请输入激活码" class="layui-textarea" autocomplete="off" |
| | | lay-verType="tips" lay-verify="required" required></textarea> |
| | | </div> |
| | | <div class="layui-form-item text-right"> |
| | | <button class="layui-btn layui-btn-normal" lay-filter="saveLicense" lay-submit="">确定</button> |
| | | <button class="layui-btn layui-btn-primary" type="button" ew-event="closeDialog">取消</button> |
| | | </div> |
| | | </form> |
| | | </script> |
| | | </body> |
| | | </html> |
| | | |