let userAgent; let isSafari = false; let browserName; window.onload = function(){ userAgent = navigator.userAgent; detectBrowser(userAgent); detectDirection (); let result; let matchData; $.ajax({ method: "GET", url: "./json/realtime.json", dataType: "json", }).done(function (msg) { result = [...msg]; }); $.ajax({ method: "GET", url: "./json/match.json", dataType: "json", }).done(function (msg) { matchData = [...msg]; renderMatch(matchData); renderMatchMb(matchData); }); } function renderMatch(matchData){ let str = ''; for(let i = 0; i < matchData.length; i++){ str += `
${matchData[i].Name} 設計師
${matchData[i].CompanyName}
擅長風格 ${matchData[i].CompanyName}
接案坪數 ${matchData[i].Square}
接案地區 ${matchData[i].Area}
${matchData[i].Consulting} 人正在諮詢
${matchData[i].Consulting} 人正在諮詢
${matchData[i].Name} 設計師
${matchData[i].CompanyName}
擅長風格 ${matchData[i].Style}
接案坪數 ${matchData[i].Square}
接案地區 ${matchData[i].Area}
${matchData[i].Consulting} 人正在諮詢