实现方案是什么?应该不是响应式,不然就没有这个问题了。就当做是不同的两个入口 index.html 和 index_m.html,剩下的问题就是判断设备应该显示那个文件判断 ua可以在 nginx 直接重定向前端代码中判断 ua,然后 location.replace判断屏幕只能在前端代码中获取,然后 location.replace判断特定 api,比如说 touchstart 事件只能在前端代码中获取,然后 location.replace
实现方案是什么?应该不是响应式,不然就没有这个问题了。
就当做是不同的两个入口
index.html
和index_m.html
,剩下的问题就是判断设备应该显示那个文件判断 ua
location.replace
判断屏幕
location.replace
判断特定 api,比如说 touchstart 事件
location.replace