前端---调用后端http接口自动获取域名和端口号
这个是和别人联调的时候遇到的,蜗记录一下var host = location.host;Lvm.$http.post('http://' + host + '/xxxxx-server/xxxx/xxxxxx/xxxxxxx',{}).then(function (res) {.......}).catch(function () {......});
·
这个是和别人联调的时候遇到的,蜗记录一下
var host = location.host;
Lvm.$http.post('http://' + host + '/xxxxx/......',
{}
).then(function (res) {
.......
}).catch(function () {
......
});
更多推荐
已为社区贡献1条内容
所有评论(0)