| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.*; |
| | |
| | | return R.ok(resources); |
| | | } |
| | | |
| | | @PostMapping(value = "/system/secret/auth") |
| | | @ManagerAuth(memo = "更新秘钥") |
| | | public R systemSecret(@RequestParam(value = "secret") String secret) { |
| | | return R.ok(secret); |
| | | } |
| | | |
| | | } |
| | |
| | | }); |
| | | } |
| | | |
| | | //便签 |
| | | //秘钥 |
| | | ,note: function(othis){ |
| | | var mobile = admin.screen() < 2 |
| | | ,note = layui.data(setter.tableName).note; |
| | | |
| | | events.note.index = admin.popup({ |
| | | title: '便签' |
| | | title: 'WMS 秘钥' |
| | | // title: 'license' |
| | | ,shade: 0 |
| | | ,offset: [ |
| | | '41px' |
| | |
| | | ,skin: 'layadmin-note layui-anim layui-anim-upbit' |
| | | ,content: '<textarea placeholder="内容"></textarea>' |
| | | ,resize: false |
| | | ,btn: ['添加', '取消'] |
| | | ,success: function(layero, index){ |
| | | var textarea = layero.find('textarea') |
| | | ,value = note === undefined ? '便签中的内容会存储在本地,这样即便你关掉了浏览器,在下次打开时,依然会读取到上一次的记录。是个非常小巧实用的本地备忘录' : note; |
| | | ,value = note === undefined ? '' : note; |
| | | |
| | | textarea.val(value).focus().on('keyup', function(){ |
| | | layui.data(setter.tableName, { |
| | | key: 'note' |
| | | ,value: this.value |
| | | }); |
| | | // textarea.val(value).focus().on('keyup', function(){ |
| | | // layui.data(setter.tableName, { |
| | | // key: 'note' |
| | | // ,value: this.value |
| | | // }); |
| | | // }); |
| | | } |
| | | ,yes: function(index, layero){ |
| | | $.ajax({ |
| | | url: baseUrl+"/system/secret/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: "secret="+note, |
| | | dataType:'json', |
| | | method: 'POST', |
| | | success: function (res) { |
| | | console.log(note) |
| | | if (res.code === 200) { |
| | | layer.msg(res.msg) |
| | | } else if (res.code === 403) { |
| | | top.location.href = baseUrl+"/login"; |
| | | } else { |
| | | layer.msg(res.msg) |
| | | } |
| | | } |
| | | }); |
| | | layer.close(index); |
| | | } |
| | | ,btn2: function(index, layero){ |
| | | layer.close(index); |
| | | } |
| | | }) |
| | | } |
| | |
| | | </a> |
| | | </li> |
| | | <li class="layui-nav-item layui-hide-xs" lay-unselect> |
| | | <a href="javascript:;" layadmin-event="note"> |
| | | <i class="layui-icon layui-icon-note"></i> |
| | | </a> |
| | | </li> |
| | | <li class="layui-nav-item layui-hide-xs" lay-unselect> |
| | | <a href="javascript:;" layadmin-event="fullscreen"> |
| | | <i class="layui-icon layui-icon-screen-full"></i> |
| | | </a> |