GithubHelp home page GithubHelp logo

hhy5277 / vue-axios-1 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from heuulzp/vue-axios

0.0 1.0 0.0 26 KB

封装axios

Home Page: http://www.jianshu.com/p/3ab216fa185c

License: MIT License

JavaScript 94.88% HTML 0.74% Vue 4.38%

vue-axios-1's Introduction

vue-axios

用法

克隆仓库到本地

git clone https://github.com/heuuLZP/axios_demo.git

进入仓库根目录,安装依赖

npm install

启动项目

npm run dev

查看效果

自行修改src/components/Hello.vue文件中第24行中的如下所示代码。

  • 正常请求
    http.get(api.right, params)
    
  • 地址不存在
    http.get(api.error, params)
    
  • 参数不正确
    http.get(api.backEnd, params)
    

项目结构

src
├── App.vue
├── assets
│   └── logo.png
├── components
│   └── Hello.vue
├── main.js
├── router
│   └── index.js
└── utils         ## 工具
    └── api.js    ## 封装api
    └── http.js   ## 封装axios

vue-axios-1's People

Contributors

heuulzp avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.