GAS+購物車開發
YT影片:
https://www.youtube.com/watch?v=4j3GYHiAhCc&list=PLNqDmSVNb0mdO9Bn5wzs5kJk1Hxq0MBl6&index=29
報錯 faviconV2:1 GET https://t3.gstatic.com/faviconV2?client=SOCIAL&type=FAVICON&fallback_opts=TYPE,SIZE,URL&url=https://script.google.com/macros/s/AKfycby7z0lsZoZshkW0gvwr9zDzdG9kjhDig9o1ceew4xk/dev&size=32 404 (Not Found) 在 function.gs中 原來 /*====================================== 渲染網頁 Sheet.render(file, argsObject, title=''); ======================================*/ static render(file, argsObject, title=''){ let tmp = HtmlService.createTemplateFromFile(file); for(let i in argsObject){ tmp[i] = argsObject[i]; } if(title){//主樣板 return tmp.evaluate() .setTitle(title) .setXFrameOptionsMode(HtmlService.XFrameOptionsMode.ALLOWALL) .addMetaTag('viewport', 'width=device-width, initial-scale=1') }else{//子樣板 return tmp.evaluate().getContent(); } }修正 /*====================================== 渲染網頁 Sheet.render(file, argsObject, title='', icon=''); ======================================*/ static render(file, argsObject, title='', icon=''){ if(!icon){ icon = 'https://i.imgur.com/RoAIHkT.png'; } let tmp = HtmlService.createTemplateFromFile(file); for(let i in argsObject){ tmp[i] = argsObject[i]; } if(title){//主樣板 return tmp.evaluate() .setTitle(title) .setXFrameOptionsMode(HtmlService.XFrameOptionsMode.ALLOWALL) .addMetaTag('viewport', 'width=device-width, initial-scale=1') .setFaviconUrl(icon); }else{//子樣板 return tmp.evaluate().getContent(); } }