Vue3.0 request local JSON file


Personal blog address

Axios request encapsulation


import {get, post} from './http'

export const login = p => get('/json/login.json', p);
export const menus = p => get('/json/menus.json', p);

Create a new JSON in public/ logo.json

  "status": "success",
  "code": 201,
  "data": {
    "token": ""

This work adoptsCC agreementReprint must indicate the author and the link of this article

Seven statements