怎么配置vue访问后端的地址
zhoyou opened this issue · comments
demo中有 访问远程api的示例。
比如用axios 客户端
const cfg = {
baseURL: 后端基础URL,
method: 'get',
url: '/hello',
timeout: 60000,
}
axios(cfg).then(res => {
console.log('res:', res);
const data = res.data || null;
this.$message.info(`go服务返回: ${data}`, );
})