let version = __wxConfig.envVersion;

// #ifdef MP-WEIXIN
if (__wxConfig.envVersion === 'release') {
    //生产环境
    ENV_CONFIG = require('.env.trial.js');
}  else {
    //开发环境
    ENV_CONFIG = require('.env.trial.js');
}
//#endif
// #ifndef MP-WEIXIN
if (version === 'develop') {
    ENV_CONFIG.isCanvas2d = false
    //开发环境
    // ENV_CONFIG = require('.env.dev.js');
    ENV_CONFIG = require('.env.trial.js');
    // ENV_CONFIG = require('.env.prod.js');
}else if(version === 'trial'){
    ENV_CONFIG.isCanvas2d = true
    //体验环境
    ENV_CONFIG = require('.env.trial.js');
} else{
    ENV_CONFIG.isCanvas2d = true
    //生产环境
    ENV_CONFIG = require('.env.prod.js');
}
//#endif

//给环境变量process.uniEnv赋值
if (ENV_CONFIG !== null) {
    process.uniEnv = {};
    for (let key in ENV_CONFIG) {
        process.uniEnv[key] = ENV_CONFIG[key];
    }
    // #ifdef H5
    if (nodeEnv !== 'development') {
        process.uniEnv.baseUrl = window.location.hostname;
    }
    //#endif
}
