var source_platform = '' , pf_source = 2; //系統平臺 //區別是不是 微信瀏覽器 , source_platform 系統平臺 2018.12.6新增 var ua = navigator.userAgent, source_platform = ''; if (ua.match(/MicroMessenger/i) == 'MicroMessenger'){ //微信瀏覽器 source_platform = 'weixin'; pf_source = 3; }else { source_platform = 'H5'; pf_source = 2; }