业务场景: 网页框跳转街景地图。问题描述: 电脑端访问网页框正常打开街景地图,手机端则显示“前往APP打开”解决思路: 通过js修改UA标识,达到访问目的(夸克游览器修改UA标识为PC,则正常打开了街景链接)JS代码:var customUserAgent = ' Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.71 Safari/537.36'; //修改后的userAgent Object.defineProperty(navigator, 'userAgent', { value: customUserAgent, writable: false }); //打印console.log(navigator.userAgent);//打印注释后也一样提示打开APP参考文档: JS 修改UserAgent:https://blog.csdn.net/fuck_yousb/article/details/90412468?utm_medium=distribute.pc_aggpage_search_result.none-task-blog-2~aggregatepage~first_rank_ecpm_v1~rank_v31_ecpm-1-90412468.pc_agg_new_rank&utm_term=js%E4%BF%AE%E6%94%B9useragent&spm=1000.2123.3001.4430 UA大全:https://cloud.tencent.com/developer/article/1678894图片: