1route.base('/news/') 2route('/*.html..', function(nid) { 3 const date = new Date(); 4 const strDt = date.toISOString().replace(/[^0-9]/g, '').slice(0, -3); 5 var self = this; 6 self.detail; 7 axios.get("/json/" + nid + ".json?build=" + strDt).then(function(response) { 8 // ã¢ã¯ã»ã¹å¶éãªãã®å ´åã¯ãã®ã¾ã¾è¡¨ç¤ºãããã®å ´åã¯ããä¸åº¦Jsonãåãã«è¡ã 9 if((typeof response.data.cms_news_access_restrict_id === 'undefined')||(response.data.cms_news_access_restrict_id == "0")){ 10 // ã¢ã¯ã»ã¹å¶éãªãã®å ´åããã®ã¾ã¾è¡¨ç¤ºãã 11 self.detail = response.data; 12 document.title = response.data.title + " | æ¸ æ³å¥³å大å¦"; 13 riot.mount('#news-detail', 'news-detail', self.detail); 14 }else{ 15 // ã¢ã¯ã»ã¹å¶éããã®å ´åãå¶éãã£ã¬ã¯ããªä¸ã®è¨äºJsonãåå¾ãã¦è¡¨ç¤ºãã 16 axios.get("/news/" + response.data.cms_news_access_restrict_id + "/" + nid + ".json?build=" + strDt).then(function(privateResponse) { 17 self.detail = privateResponse.data; 18 document.title = privateResponse.data.title + " | æ¸ æ³å¥³å大å¦"; 19 riot.mount('#news-detail', 'news-detail', self.detail); 20 }).catch(function(error){ 21 // èªè¨¼ãã¦ããªãã¦ã¼ã¶ã¼ã¯ããã«ããã 22 if (error.response) { 23 if (error.response.status === 401) { 24 location.href="/401.html"; 25 } else if (error.response.status === 403) { 26 location.href="/403.html"; 27 } else if (error.response.status === 404) { 28 location.href="/404.html"; 29 } else { 30 console.log('response.status: ' + error.response.status); 31 } 32 console.error(error.name + ': ' + error.message); 33 } else if (error.request) { 34 // ãªã¯ã¨ã¹ããè¡ãªããããå¿çãç¡ãã£ã 35 console.error(error.name + ': ' + error.message); 36 var ua = window.navigator.userAgent.toLowerCase(); 37 var em = error.message.toLowerCase(); 38 if ((ua.indexOf("safari") !== -1) && (em.indexOf("network error") !== -1)) { 39 location.href="/401.html"; 40 } 41 } else { 42 console.error(error.name + ': ' + error.message); 43 } 44 }); 45 } 46 }).catch(function (error) { 47 if (error.response) { 48 if (error.response.status === 404) { 49 location.href="/404.html"; 50 } else { 51 console.log('response.status: ' + error.response.status); 52 } 53 console.error(error.name + ': ' + error.message); 54 } else { 55 console.error(error.name + ': ' + error.message); 56 } 57 }); 58}) 59route('/..', function() { 60 location.href="/404.html"; 61}) 62route('/', function() { 63 location.href="/404.html"; 64})
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.