| | |
| | | </p> |
| | | <p class="p-sketch-outline__description">wms made with various simple objects.</p> |
| | | </div> |
| | | <canvas class="p-canvas-webgl" id="canvas-webgl"></canvas> |
| | | <!-- <canvas class="p-canvas-webgl" id="canvas-webgl"></canvas>--> |
| | | </div> |
| | | <!-- 侧边栏 --> |
| | | <div id="sidebar"> |
| | | <div class="login-contain"> |
| | | <div class="login-box"> |
| | | <img src="../static/image/logo.png" alt="" style="width: 80%"> |
| | | <span class="login100-form-title p-t-20 p-b-45">中扬立库</span> |
| | | <span class="login100-form-title p-t-20 p-b-45" style="margin: 15px 0;color: #868686;font-size: 24px">WMS</span> |
| | | <!-- <span class="login100-form-title p-t-20 p-b-45">中扬立库</span>--> |
| | | <!-- <span class="login100-form-title p-t-20 p-b-45" style="margin: 15px 0;color: #868686;font-size: 24px">WMS</span>--> |
| | | <div class="wrap-input100 validate-input m-b-10" data-validate="请输入用户名"> |
| | | <input id="username" class="input100" type="text" name="username" placeholder="username" autocomplete="off"> |
| | | <span class="focus-input100"></span> |
| | |
| | | </div> |
| | | <div class="container-login100-form-btn p-t-10"> |
| | | <button class="login100-form-btn login-btn">Login</button> |
| | | </div> |
| | | <div class="container-login100-form-btn p-t-10" style="display: none;margin-top: 50px;" id="updateLicense"> |
| | | <form enctype="multipart/form-data" style="display: none;"> |
| | | <input id="license" type="file" name="file" > |
| | | </form> |
| | | <button class="login100-form-btn" id="submitLicense">更新许可证</button> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | layer.tips(res.msg, '#username', {tips: [4, '#ff0000']}); |
| | | } else if (res.code === 10003) { |
| | | layer.tips(res.msg, '#password', {tips: [4, '#ff0000']}); |
| | | } else if (res.code == 20001) { |
| | | layer.tips(res.msg, '.login-btn', {tips: [3, '#ff0000']}); |
| | | $("#updateLicense").show() |
| | | } else { |
| | | layer.tips(res.msg, '.login-btn', {tips: [3, '#ff0000']}); |
| | | } |
| | |
| | | $(".login-btn").click(); |
| | | } |
| | | }); |
| | | |
| | | |
| | | //更新许可证 |
| | | $("#submitLicense").on("click",() => { |
| | | $("#license").click() |
| | | }) |
| | | |
| | | //上传并更新许可证 |
| | | $("#license").on("change",(evt) => { |
| | | var files = evt.target.files; |
| | | let formData = new FormData(); |
| | | formData.append("file", files[0]) |
| | | $.ajax({ |
| | | url: baseUrl+"/license/updateLicense", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: formData, |
| | | method: 'POST', |
| | | cache: false, |
| | | processData: false, |
| | | contentType: false, |
| | | success: function (res) { |
| | | if (res.code == 200) { |
| | | layer.msg('更新成功', {time: 1000}, () => { |
| | | parent.location.reload() |
| | | }); |
| | | }else{ |
| | | layer.msg(res.msg,{time:2000},() => { |
| | | parent.location.reload() |
| | | }) |
| | | } |
| | | } |
| | | }) |
| | | }) |
| | | </script> |
| | | </body> |
| | | </html> |