On this page
判断是否是移动端
扩展:app/extend/context.js
js
ismobile(ctx){
let userAgent = this.request.header['user-agent'].toLowerCase();
let pat_phone = /ipad|iphone os|midp|rv:1.2.3.4|ucweb|android|windows ce|windows mobile/;
return pat_phone.test(userAgent);
}