1.下载mock接口
pnpm i vite-plugin-mock
2.配置vite.config.ts
import { defineConfig } from vite
import vue from vitejs/plugin-vue
import path from "path";
//引入svg需要用到的插件
import { createSvgIconsPlugin } from vite-plugin-svg-icons
//mock插…
Access to image at ‘http://127.0.0.1:3000/api/getImg?url/uploads/file/20240421/file-1713715007811-logo.png’ from origin ‘http://ggbol.gnway.cc’ has been blocked by CORS policy: The request client is not a secure context and the resource is in more-pri…