通常在utils文件夹下的api.js文件中编写接口,并确定接口环境
var href=window.location.href //两者都是当前运行URL链接//var host=window.location.host let _ IPCC _ CST; const _ sys server=(/(credit card.ecitic.com)/I.test ) location.origin )? ' https://credit card.ecitic.com ' : ' https://e.test.bank.ecitic.com '; if(href.indexof ) ' citiccard '!=-1 ()//生产环境) elseif(href.indexof ) ' UAT )!=-1 ) (/UAT ) elseif ) href.indexof ) ' sit '!=-1|||href.indexof('test '!=-1 () /测试环境(else (/localhost _ IPCC _ CST=' 335928.105.147.5533608080/ipss-CST-service ' } constat ent )
importapifrom './API ' importhttpfrom './http ' const common={ install { vue } { this.$ SPI=API this.$ http=new hhis
importcfrom ' u utils/common ' vue.use (c ) )。