var id = $('#mid').attr('data-mid');
if (!id) {
    id = $('#mid').attr('data-default');
}
var codeObj = { android: id, ios: id };
var osType = phoneSystem();
var client = fBrowser();


//判断是ios还是安卓
function phoneSystem() {
    var sUserAgent = navigator.userAgent.toLowerCase();
    if ((sUserAgent.match(/(iphone|ipod|ios|ipad)/i))) {
        return "ios";
    } else {
        return "android";
    }
}

//判断是pc还是移动
function fBrowser() {
    var sUserAgent = navigator.userAgent.toLowerCase();
    if ((sUserAgent.match(/(iphone|ipod|android|ios|ipad|backerry|webos|symbian|windows phone|phone|mobile|webos|incognito|webmate|bada|nokia|lg|ucweb|skyfire)/i))) {
        //手机访问
        return "mobile";
    } else {
        //电脑访问
        return "pc";
    }
}