1$(function () { 2 // $(document).ready(function () { 3 // getAccount() 4 // // console.log(window.GLOBAL_MOMENT_LANGUAGE) 5 6 // }) 7 var fuc={ 8 getAccount:function(){ 9 $.ajax({ 10 type: 'get', 11 url: '/v2/common/client-families', 12 data: { 13 sp: false 14 }, 15 async: true, 16 dataType: 'json', 17 success: function (obj) { 18 // console.log(obj) 19 var tpl = '' 20 $('.account-dropdown-menu').html('') 21 if (obj.code == "OK" && obj.data && obj.data.length > 1) { 22 $('#hideAccont').removeClass('isHide') 23 switch (window.GLOBAL_MOMENT_LANGUAGE) { 24 case 'en': 25 for (var i = 0; i < obj.data.length; i++) { 26 // if (obj.data[i].self) { 27 // $('#dropdownMenuButton').text(obj.data[i].name + '(personal)') 28 // } 29 if (obj.data[i].master && obj.data[i].self) { 30 $('#dropdownMenuButton').text(obj.data[i].name + '(main account)') 31 tpl += '<a class="dropdown-item" href="javascript:;" data-accountid=' + obj.data[i].id + '>' + obj.data[i].name + '(main account)</a>' 32 }else if(obj.data[i].master){ 33 tpl += '<a class="dropdown-item" href="javascript:;" data-accountid=' + obj.data[i].id + '>' + obj.data[i].name + '(main account)</a>' 34 } 35 else if (obj.data[i].self) { 36 $('#dropdownMenuButton').text(obj.data[i].name + '(personal)') 37 tpl += '<a class="dropdown-item" href="javascript:;" data-accountid=' + obj.data[i].id + '>' + obj.data[i].name + '(personal)</a>' 38 39 }else { 40 tpl += '<a class="dropdown-item" href="javascript:;" data-accountid=' + obj.data[i].id + '>' + obj.data[i].name + '</a>' 41 } 42 43 44 } 45 break; 46 case 'jp': 47 for (var i = 0; i < obj.data.length; i++) { 48 if (obj.data[i].master && obj.data[i].self) { 49 $('#dropdownMenuButton').text(obj.data[i].name + '(主ã¢ã«ã¦ã³ã)') 50 tpl += '<a class="dropdown-item" href="javascript:;" data-accountid=' + obj.data[i].id + '>' + obj.data[i].name + '(主ã¢ã«ã¦ã³ã)</a>' 51 }else if(obj.data[i].master){ 52 tpl += '<a class="dropdown-item" href="javascript:;" data-accountid=' + obj.data[i].id + '>' + obj.data[i].name + '(主ã¢ã«ã¦ã³ã)</a>' 53 } 54 else if (obj.data[i].self) { 55 $('#dropdownMenuButton').text(obj.data[i].name + '(èªå)') 56 tpl += '<a class="dropdown-item" href="javascript:;" data-accountid=' + obj.data[i].id + '>' + obj.data[i].name + '(èªå)</a>' 57 58 }else { 59 tpl += '<a class="dropdown-item" href="javascript:;" data-accountid=' + obj.data[i].id + '>' + obj.data[i].name + '</a>' 60 } 61 } 62 break; 63 default: 64 for (var i = 0; i < obj.data.length; i++) { 65 if (obj.data[i].master && obj.data[i].self) { 66 $('#dropdownMenuButton').text(obj.data[i].name + '(主账å·)') 67 tpl += '<a class="dropdown-item" href="javascript:;" data-accountid=' + obj.data[i].id + '>' + obj.data[i].name + '(主账å·)</a>' 68 }else if(obj.data[i].master){ 69 tpl += '<a class="dropdown-item" href="javascript:;" data-accountid=' + obj.data[i].id + '>' + obj.data[i].name + '(主账å·)</a>' 70 } 71 else if (obj.data[i].self) { 72 $('#dropdownMenuButton').text(obj.data[i].name + '(æ)') 73 tpl += '<a class="dropdown-item" href="javascript:;" data-accountid=' + obj.data[i].id + '>' + obj.data[i].name + '(æ)</a>' 74 75 }else { 76 tpl += '<a class="dropdown-item" href="javascript:;" data-accountid=' + obj.data[i].id + '>' + obj.data[i].name + '</a>' 77 } 78 79 } 80 } 81 82 $('.account-dropdown-menu').append(tpl) 83 // console.log(sessionStorage.getItem('acName')) 84 // if (sessionStorage.getItem('acName')) { 85 // $('#dropdownMenuButton').text(sessionStorage.getItem('acName')) 86 // } 87 88 } else { 89 $('#dropdown-account-filter').hide(); 90 $('#hideAccont').addClass('isHide') 91 } 92 }, 93 error: function () {} 94 }); 95 } 96 } 97 98 99 window.getAccount=fuc; 100 // window.getAccount.getAccount() 101 // $('#dropdownMenuButton').onclick(function(){ 102 // console.log(111); 103 // $('.dropdown-menu').toggle() 104 // }) 105 106 107 // $('.dropdown-menu').on('click', '.dropdown-item', function (e) { 108 109 // $('#dropdownMenuButton').text($(this).text()) 110 // $('.dropdown-menu').hide() 111 // var page = 1; 112 // var id=$(this).attr('data-accountid'); 113 // loadQueryHistoryLogs(page,id) 114 115 // }) 116 117 118 119})
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.