common.js 567 B

1234567891011121314151617181920212223242526272829
  1. ;
  2. layui.use('jquery', function() {
  3. $ = layui.jquery;
  4. $(function() {
  5. layui.data('auth', null);
  6. console.log('wo',location.searchObj().menuId)
  7. if(location.searchObj().menuId){
  8. console.log(2)
  9. $.ajax({
  10. url: 'getMenuBtn',
  11. type: 'get',
  12. data: {
  13. menuId: location.searchObj().menuId || '0'
  14. },
  15. success: function(res) {
  16. if (res.code == 0) {
  17. let auth = res.data[0];
  18. layui.data('auth', {
  19. key: 'data',
  20. value: auth
  21. })
  22. console.log('ee', layui.data('auth').data);
  23. }
  24. }
  25. });
  26. }
  27. });
  28. });