dromara / electron-egg

A simple, cross platform, enterprise desktop software development framework

Home Page:https://www.kaka996.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

怎么配置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}`, );
      })