config.js:

var sit = true;

var uat = false;

var dev = false;

var prod = false;

var domain = "https://xxx";

if(sit) {

domain = "https://xxx";

}

if(uat) {

domain = "https://xxx";

}

if(dev) {

domain = "https://xxx";

}

if(prod) {

domain = "https://xxx";

}

 

interfacesit:{

        testInter: domain + "/xxx/xxx"

    },

 

interface:{

        testInter: domain + "/xxx/xxx"

    },

 

index.vue:

this.inter = location.hostname.indexOf("xxx.com.cn") != -1 ? api.interface : api.interfacesit;