1/** 2 * 转æ¢ä¸ºurlåæ°ï¼ &æ¼æ¥ 3 * @param param 4 * @param key 5 * @returns {string} 6 */ 7function parseUrlParam(param, key) { 8 let paramStr = ""; 9 if (param instanceof String || param instanceof Number || param instanceof Boolean) { 10 paramStr += "&" + key + "=" + encodeURIComponent(param); 11 } else { 12 $.each(param, function (i) { 13 let k = key == null ? i : key + (param instanceof Array ? "[" + i + "]" : "." + i); 14 paramStr += '&' + parseUrlParam(this, k); 15 }); 16 } 17 return paramStr.substr(1); 18}; 19 20/** 21 * é¢è®¾æ¨¡å¼æ¯å¦å·²æ¹å 22 * @param formDomId:string è¡¨æ ¼domId 23 * @param excludeKeyReg:reg æé¤å±æ§çæ£åè¡¨è¾¾å¼ 24 * @param presetMode:obj éªè¯å¯¹è±¡ 25 * @returns {boolean} 26 */ 27function presetModeIsChange(formDomId, excludeKeyReg, presetMode) { 28 // TODO 该æ¹å¼æ æ³åå¾formä¸input[type=check]ï¼å¹¶ä¸æªéä¸çå¼ï¼åç»èèä¼å 29 let serializeArray = $(`#${formDomId}`).serializeArray(); 30 // console.log(serializeArray) 31 if (!serializeArray || !presetMode) { 32 return false; 33 } 34 for (let o of serializeArray) { 35 if (!excludeKeyReg || !excludeKeyReg.test(o.name)) { 36 // console.log('check', o.name) 37 if ((!!presetMode[o.name] && o.value != presetMode[o.name]) || (!presetMode[o.name] && o.value)) { 38 // console.log('check failed', o, presetMode[o.name]) 39 return true; 40 } 41 } 42 } 43 return false; 44}
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.