/*内外网配置*/
if (localStorage.getItem("__network__") == 'true') {//true外网
    var __network__ = true;//true代表外网,false代表内网2021.6.28
    //华为云obs配置
    var ak = "9RKWDCLM1AMBIZUDF70S"
    var sk = "U5iCIxBVwrIkgax7nI7R2WTzS9aYaUsjpEgYHll8"
    var urlserver = "obs.cn-north-1.myhuaweicloud.com"
    var BucketName = "bcxin-v5-prod"

    //外网才走高德地图cdn与obs，内网不走cdn，优化性能
    document.write("<script type='text/javascript' src='https://webapi.amap.com/maps?v=1.4.14&key=360a7c1bb4e9290577f6061ce18b4be8'><\/script>");
    document.write("<script type='text/javascript' src='./js/esdk-obs-browserjs.min.js'><\/script>");
} else {
    var __network__ = false;//true代表外网,false代表内网2021.6.28
    //华为云obs配置
    var ak = "9RKWDCLM1AMBIZUDF70S"
    var sk = "U5iCIxBVwrIkgax7nI7R2WTzS9aYaUsjpEgYHll8"
    var urlserver = "obs.cn-north-1.myhuaweicloud.com"
    var BucketName = "wqj-test"
}

var convertCdnPath = function (path) {
    try {
        var newPath = path.replace("bcxin-v5-prod.obs.cn-north-1.myhuaweicloud.com", "download.baibaodun.cn");
        console.log("转换的路径：" + path + " 为新路径:" + newPath);
        return newPath;
    } catch (e) {
        console.log("转换的路径为：" + path + ";发生异常" + e);
    }

    return path;
}