├── .editorconfig ├── .eslintignore ├── .eslintrc.js ├── .gitignore ├── .prettierignore ├── .prettierrc.js ├── LICENSE ├── README.md ├── config ├── config.ts ├── defaultSettings.ts ├── oneapi.json ├── proxy.ts └── routes.ts ├── jsconfig.json ├── package.json ├── pnpm-lock.yaml ├── public ├── assets │ ├── Alipay.png │ ├── Gift.png │ ├── KunCoin.png │ ├── LightColor.png │ ├── WeChat.jpg │ └── notLogin.png ├── favicon.ico ├── logo.gif └── scripts │ └── loading.js ├── src ├── access.ts ├── app.tsx ├── components │ ├── CodeHighlighting │ │ └── index.tsx │ ├── EmailModal │ │ └── index.tsx │ ├── Footer │ │ └── index.tsx │ ├── Gift │ │ ├── GetGift.tsx │ │ └── SendGift.tsx │ ├── HeaderDropdown │ │ └── index.tsx │ ├── Icon │ │ ├── Alipay.tsx │ │ ├── IconShare.tsx │ │ ├── KunCoin.tsx │ │ ├── LightColor.tsx │ │ ├── NotAvatar.tsx │ │ └── WxPay.tsx │ ├── ParamsTable │ │ ├── components │ │ │ └── type.ts │ │ └── index.tsx │ ├── RightContent │ │ ├── AvatarDropdown.tsx │ │ └── index.tsx │ └── UploadModal │ │ └── index.tsx ├── enum │ ├── ErrorCodeEnum.ts │ └── commonEnum.tsx ├── global.less ├── global.tsx ├── manifest.json ├── pages │ ├── 404.tsx │ ├── Admin.tsx │ ├── Admin │ │ ├── Columns │ │ │ ├── InterfaceInfoColumns.tsx │ │ │ ├── ProductInfoColumns.tsx │ │ │ └── UserColumns.tsx │ │ ├── Components │ │ │ └── ModalForm.tsx │ │ ├── InterfaceInfoList │ │ │ └── index.tsx │ │ ├── ProductInfoList │ │ │ └── index.tsx │ │ └── UserList │ │ │ └── index.tsx │ ├── InterfaceInfo │ │ ├── components │ │ │ ├── ApiTab │ │ │ │ └── index.tsx │ │ │ ├── CodeTemplate.tsx │ │ │ └── ToolsTab │ │ │ │ └── index.tsx │ │ ├── index.less │ │ └── index.tsx │ ├── InterfaceSquare │ │ └── index.tsx │ ├── Order │ │ ├── Columns │ │ │ └── OrderColumns.tsx │ │ ├── OrderInfo │ │ │ └── index.tsx │ │ ├── OrderList │ │ │ └── index.tsx │ │ └── PayOrder │ │ │ └── index.tsx │ ├── Recharge │ │ └── index.tsx │ ├── User │ │ ├── Login │ │ │ └── index.tsx │ │ ├── Register │ │ │ └── index.tsx │ │ └── UserInfo │ │ │ └── index.tsx │ └── Welcome.tsx ├── requestConfig.ts ├── service-worker.js ├── services │ ├── ant-design-pro │ │ ├── api.ts │ │ ├── index.ts │ │ ├── login.ts │ │ ├── rule.ts │ │ └── typings.d.ts │ └── qiApi-backend │ │ ├── dailyCheckInController.ts │ │ ├── fileController.ts │ │ ├── index.ts │ │ ├── interfaceInfoController.ts │ │ ├── orderController.ts │ │ ├── productInfoController.ts │ │ ├── typings.d.ts │ │ └── userController.ts └── typings.d.ts ├── tailwind.config.js ├── tailwind.css └── tsconfig.json /.editorconfig: -------------------------------------------------------------------------------- 1 | # http://editorconfig.org 2 | root = true 3 | 4 | [*] 5 | indent_style = space 6 | indent_size = 2 7 | end_of_line = lf 8 | charset = utf-8 9 | trim_trailing_whitespace = true 10 | insert_final_newline = true 11 | 12 | [*.md] 13 | trim_trailing_whitespace = false 14 | 15 | [Makefile] 16 | indent_style = tab 17 | -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | /lambda/ 2 | /scripts 3 | /config 4 | .history 5 | public 6 | dist 7 | .umi 8 | mock -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | extends: [require.resolve('@umijs/lint/dist/config/eslint')], 3 | globals: { 4 | page: true, 5 | REACT_APP_ENV: true, 6 | }, 7 | }; 8 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | **/node_modules 5 | # roadhog-api-doc ignore 6 | /src/utils/request-temp.js 7 | _roadhog-api-doc 8 | 9 | # production 10 | /dist 11 | 12 | # misc 13 | .DS_Store 14 | npm-debug.log* 15 | yarn-error.log 16 | 17 | /coverage 18 | .idea 19 | yarn.lock 20 | package-lock.json 21 | *bak 22 | .vscode 23 | 24 | # visual studio code 25 | .history 26 | *.log 27 | functions/* 28 | .temp/** 29 | 30 | # umi 31 | .umi 32 | .umi-production 33 | .umi-test 34 | 35 | # screenshot 36 | screenshot 37 | .firebase 38 | .eslintcache 39 | 40 | build 41 | .temp 42 | .cache 43 | 44 | # vuepress 45 | docs/.vuepress/dist 46 | 47 | # 百度链接推送 48 | urls.txt 49 | 50 | 51 | -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | **/*.svg 2 | .umi 3 | .umi-production 4 | /dist 5 | .dockerignore 6 | .DS_Store 7 | .eslintignore 8 | *.png 9 | *.toml 10 | docker 11 | .editorconfig 12 | Dockerfile* 13 | .gitignore 14 | .prettierignore 15 | LICENSE 16 | .eslintcache 17 | *.lock 18 | yarn-error.log 19 | .history 20 | CNAME 21 | /build 22 | /public 23 | -------------------------------------------------------------------------------- /.prettierrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | singleQuote: true, 3 | trailingComma: 'all', 4 | printWidth: 100, 5 | proseWrap: 'never', 6 | endOfLine: 'lf', 7 | overrides: [ 8 | { 9 | files: '.prettierrc', 10 | options: { 11 | parser: 'json', 12 | }, 13 | }, 14 | { 15 | files: 'document.ejs', 16 | options: { 17 | parser: 'html', 18 | }, 19 | }, 20 | ], 21 | }; 22 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019-present gaoyi(Evan) Xu 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |
2 |
3 |
Qi-API 接口开放平台是一个为用户和开发者提供全面API接口调用服务的平台 🛠
6 | 24 | 25 | ## 项目介绍 🙋 26 | 27 | 28 | 29 | **😀 作为用户您可以通过注册登录账户,获取接口调用权限,并根据自己的需求浏览和选择适合的接口。您可以在线进行接口调试,快速验证接口的功能和效果。** 30 | 31 | **💻 作为开发者 我们提供了[客户端SDK: Qi-API-SDK](https://github.com/qimu666/qi-api-sdk), 通过[开发者凭证](https://api.qimuu.icu/account/center)即可将轻松集成接口到您的项目中,实现更高效的开发和调用。** 32 | 33 | **🤝 您可以将自己的接口接入到Qi-API 接口开放平台平台上,并发布给其他用户使用。 您可以管理和各个接口,以便更好地分析和优化接口性能。** 34 | 35 | **👌 我们还提供了[开发者在线文档](https://doc.qimuu.icu/)和技术支持,帮助您快速接入和发布接口。** 36 | 37 | **🏁 无论您是用户还是开发者,Qi-API 接口开放平台都致力于提供稳定、安全、高效的接口调用服务,帮助您实现更快速、便捷的开发和调用体验。** 38 | 39 | ## 网站导航 🧭 40 | 41 | - [**Qi-API 后端 🏘️**](https://github.com/qimu666/qi-api) 42 | - [**Qi-API 前端 🏘**️](https://github.com/qimu666/qi-api-frontend) 43 | 44 | - **[Qi-API-SDK](https://github.com/qimu666/qi-api-sdk)** 🛠 45 | 46 | - **[Qi-API 接口开放平台 🔗](https://api.qimuu.icu/)** 47 | 48 | - **[Qi-API-DOC 开发者文档 📖](https://doc.qimuu.icu/)** 49 | - **[Qi-API-SDK-demo ✔️](https://github.com/qimu666/qi-api-sdk-demo/blob/master/src/main/java/icu/qimuu/qiapisdkdemo/controller/InvokeController.java)** 50 | 51 | 52 | ## 目录结构 📑 53 | 54 | 55 | | 目录 | 描述 | 56 | |--------------------------------------------------------| ------------------ | 57 | | **🏘️ [qi-api-backend](./qi-api-backend)** | Qi-API后端服务模块 | 58 | | **🏘️ [qi-api-common](./qi-api-common)** | 公共服务模块 | 59 | | **🕸️ [qi-api-gateway](./qi-api-gateway)** | 网关模块 | 60 | | **🔗 [qi-api-interface](./qi-api-interface)** | 接口模块 | 61 | | **🛠 [qi-qpi-sdk](https://github.com/qimu666/qi-api-sdk)** | 开发者调用sdk | 62 | | **📘 [qi-api-doc](https://doc.qimuu.icu/)** | 接口在线文档 | 63 | | **✔️ [Qi-API-SDK-Demo](https://github.com/qimu666/qi-api-sdk-demo/blob/master/src/main/java/icu/qimuu/qiapisdkdemo/controller/InvokeController.java)** | sdk调用Demo | 64 | 65 | ## 项目流程 🗺️ 66 | 67 |  68 | 69 | ## 快速启动 🚀 70 | 71 | ### 前端 72 | 73 | 环境要求:Node.js >= 16 74 | 75 | 安装依赖: 76 | 77 | ```bash 78 | yarn or npm install 79 | ``` 80 | 81 | 启动: 82 | 83 | ```bash 84 | yarn run dev or npm run start:dev 85 | ``` 86 | 87 | 部署: 88 | 89 | ```bash 90 | yarn build or npm run build 91 | ``` 92 | 93 | ### 后端 94 | 95 | 管理员初始账号密码:admin/12345678 96 | 97 | 1. docker-compose容器编排一键启动 98 | 99 | - 修改配置文件,修改配置部分已标记todo标签。无需特殊情况只需关注两个配置文件(已配置好不修改也可以直接运行) 100 | 101 | 1. backend配置文件 102 | 103 |  104 | 105 | 2.gateway网关配置文件 106 | 107 |  108 | 109 | - 本地maven构建jar包(跳过测试) 110 | 111 |  112 | 113 | - 启动项目 114 | 115 | 1. 运行docker-compose.env.yml文件启动mysql、redis、nacos环境依赖 116 | 2. 运行docker-compose.service.yml文件启动后端服务 117 | 118 | 2. 普通方式:执行sql目录下ddl.sql 119 | 120 | ## 项目选型 🎯 121 | 122 | ### **后端** 123 | 124 | - Spring Boot 2.7.0 125 | - Spring MVC 126 | - MySQL 数据库 127 | - 腾讯云COS存储 128 | - Dubbo 分布式(RPC、Nacos) 129 | - Spring Cloud Gateway 微服务网关 130 | - API 签名认证(Http 调用) 131 | - IJPay-AliPay 支付宝支付 132 | - WeiXin-Java-Pay 微信支付 133 | - Swagger + Knife4j 接口文档 134 | - Spring Boot Starter(SDK 开发) 135 | - Jakarta.Mail 邮箱通知、验证码 136 | - Spring Session Redis 分布式登录 137 | - Apache Commons Lang3 工具类 138 | - MyBatis-Plus 及 MyBatis X 自动生成 139 | - Hutool、Apache Common Utils、Gson 等工具库 140 | 141 | ### 前端 142 | 143 | - React 18 144 | 145 | - Ant Design Pro 5.x 脚手架 146 | 147 | - Ant Design & Procomponents 组件库 148 | 149 | - Umi 4 前端框架 150 | 151 | - OpenAPI 前端代码生成 152 | 153 | 154 | 155 | ## 功能介绍 📋 156 | 157 | `坤币`即积分,用于平台接口调用。 158 | 159 | | **功能** | 游客 | **普通用户** | **管理员** | 160 | | ----------------------------------------------------- |--------------|-----|-----| 161 | | **[开发者API在线文档](http://doc.qimuu.icu)** | ✅ | ✅ | ✅ | 162 | | 接口大厅搜索接口、浏览接口 | ✅ | ✅ | ✅ | 163 | | 邮箱验证码登录注册 | ✅ | ✅ | ✅ | 164 | | [**Qi-API-SDK**](https://github.com/qimu666/qi-api-sdk)使用 | ❌ | ✅ | ✅ | 165 | | 邀请好友注册得坤币 | ❌ | ✅ | ✅ | 166 | | 微信支付宝付款 | ❌ | ✅ | ✅ | 167 | | 在线调试接口 | ❌ | ✅ | ✅ | 168 | | 每日签到得坤币 | ❌ | ✅ | ✅ | 169 | | 钱包充值 | ❌ | ✅ | ✅ | 170 | | 支付成功邮箱通知(需要绑定邮箱) | ❌ | ✅ | ✅ | 171 | | 更新头像 | ❌ | ✅ | ✅ | 172 | | 绑定、换绑、解绑邮箱 | ❌ | ✅ | ✅ | 173 | | 取消订单、删除订单 | ❌ | ✅ | ✅ | 174 | | 商品管理、上线、下架 | ❌ | ❌ |✅| 175 | | 用户管理、封号解封等 | ❌ | ❌ | ✅ | 176 | | 接口管理、接口发布审核、下架 | ❌ | ❌ | ✅ | 177 | | 退款 | ❌ | ❌| ❌ | 178 | 179 | ## 新接口动态发布示例(只需两步即可发布) 180 | 181 | 1. 在接口服务(interface)项目中开发新接口 (**接口服务可以是独立的项目,但需要在网关中配置路由**) 182 | 183 | 在接口服务开发一个测试接口: 184 | 185 | ```java 186 | @GetMapping("/test") 187 | public String test(String text) { 188 | return text; 189 | } 190 | ``` 191 | 192 |  193 | 194 | 2. 开发完成后重启接口项目后,在管理员后台发布接口,就可以在线调用了!! 195 | 196 |  197 | 198 | 3. 在接口大厅找到并请求接口 199 | 200 |  201 | 202 | 4. 恭喜发布成功!! 203 | 204 | ## 功能展示 ✨ 205 | 206 | ### 首页 207 | 208 |  209 | 210 | ### 接口广场 211 | 212 |  213 | 214 | ### 开发者在线文档 215 | 216 |  217 | 218 |  219 | 220 | ### 接口描述 221 | 222 | #### **在线API** 223 | 224 |  225 | 226 | #### 在线调试工具 227 | 228 | #### **错误码参考** 229 | 230 | #### **接口调用代码示例** 231 | 232 | ### 管理页 233 | 234 | #### 用户管理 235 | 236 |  237 | 238 | #### 商品管理 239 | 240 | #### 接口管理 241 | 242 | #### 动态更新请求响应参数 243 | 244 | 245 | ### 积分商城 246 | 247 |  248 | 249 | ### 订单支付 250 | 251 | ### 个人信息 252 | 253 | #### 信息展示 254 | 255 |  256 | 257 | #### 每日签到 258 | 259 | ##### 签到成功 260 | 261 | ##### 签到失败 262 | 263 | ### 好友邀请 264 | 265 | #### **发送邀请** 266 | 267 | #### **接收邀请** 268 | 269 | ### 登录/注册 270 | 271 |  272 | 273 | ### 订单管理 274 | 275 | - **我的订单** 276 | 277 | - **详细订单** 278 | -------------------------------------------------------------------------------- /config/config.ts: -------------------------------------------------------------------------------- 1 | // https://umijs.org/config/ 2 | import { defineConfig } from "@umijs/max"; 3 | import defaultSettings from "./defaultSettings"; 4 | import proxy from "./proxy"; 5 | import routes from "./routes"; 6 | 7 | const { REACT_APP_ENV = "dev" } = process.env; 8 | export default defineConfig({ 9 | /** 10 | * @name 开启 hash 模式 11 | * @description 让 build 之后的产物包含 hash 后缀。通常用于增量发布和避免浏览器加载缓存。 12 | * @doc https://umijs.org/docs/api/config#hash 13 | */ 14 | hash: true, 15 | /** 16 | * @name 兼容性设置 17 | * @description 设置 ie11 不一定完美兼容,需要检查自己使用的所有依赖 18 | * @doc https://umijs.org/docs/api/config#targets 19 | */ 20 | // targets: { 21 | // ie: 11, 22 | // }, 23 | /** 24 | * @name 路由的配置,不在路由中引入的文件不会编译 25 | * @description 只支持 path,component,routes,redirect,wrappers,title 的配置 26 | * @doc https://umijs.org/docs/guides/routes 27 | */ 28 | // umi routes: https://umijs.org/docs/routing 29 | routes, 30 | /** 31 | * @name 主题的配置 32 | * @description 虽然叫主题,但是其实只是 less 的变量设置 33 | * @doc antd的主题设置 https://ant.design/docs/react/customize-theme-cn 34 | * @doc umi 的theme 配置 https://umijs.org/docs/api/config#theme 35 | */ 36 | theme: { 37 | // 如果不想要 configProvide 动态设置主题需要把这个设置为 default 38 | // 只有设置为 variable, 才能使用 configProvide 动态设置主色调 39 | "root-entry-name": "variable", 40 | }, 41 | /** 42 | * @name moment 的国际化配置 43 | * @description 如果对国际化没有要求,打开之后能减少js的包大小 44 | * @doc https://umijs.org/docs/api/config#ignoremomentlocale 45 | */ 46 | ignoreMomentLocale: true, 47 | /** 48 | * @name 代理配置 49 | * @description 可以让你的本地服务器代理到你的服务器上,这样你就可以访问服务器的数据了 50 | * @see 要注意以下 代理只能在本地开发时使用,build 之后就无法使用了。 51 | * @doc 代理介绍 https://umijs.org/docs/guides/proxy 52 | * @doc 代理配置 https://umijs.org/docs/api/config#proxy 53 | */ 54 | proxy: proxy[REACT_APP_ENV as keyof typeof proxy], 55 | /** 56 | * @name 快速热更新配置 57 | * @description 一个不错的热更新组件,更新时可以保留 state 58 | */ 59 | fastRefresh: true, 60 | //============== 以下都是max的插件配置 =============== 61 | /** 62 | * @name 数据流插件 63 | * @@doc https://umijs.org/docs/max/data-flow 64 | */ 65 | model: {}, 66 | /** 67 | * 一个全局的初始数据流,可以用它在插件之间共享数据 68 | * @description 可以用来存放一些全局的数据,比如用户信息,或者一些全局的状态,全局初始状态在整个 Umi 项目的最开始创建。 69 | * @doc https://umijs.org/docs/max/data-flow#%E5%85%A8%E5%B1%80%E5%88%9D%E5%A7%8B%E7%8A%B6%E6%80%81 70 | */ 71 | initialState: {}, 72 | /** 73 | * @name layout 插件 74 | * @doc https://umijs.org/docs/max/layout-menu 75 | */ 76 | title: "Qi-API 接口开放平台", 77 | layout: { 78 | locale: true, 79 | ...defaultSettings, 80 | }, 81 | /** 82 | * @name moment2dayjs 插件 83 | * @description 将项目中的 moment 替换为 dayjs 84 | * @doc https://umijs.org/docs/max/moment2dayjs 85 | */ 86 | moment2dayjs: { 87 | preset: "antd", 88 | plugins: ["duration"], 89 | }, 90 | /** 91 | * @name 国际化插件 92 | * @doc https://umijs.org/docs/max/i18n 93 | */ /** 94 | * @name antd 插件 95 | * @description 内置了 babel import 插件 96 | * @doc https://umijs.org/docs/max/antd#antd 97 | */ 98 | antd: {}, 99 | /** 100 | * @name 网络请求配置 101 | * @description 它基于 axios 和 ahooks 的 useRequest 提供了一套统一的网络请求和错误处理方案。 102 | * @doc https://umijs.org/docs/max/request 103 | */ 104 | request: {}, 105 | /** 106 | * @name 权限插件 107 | * @description 基于 initialState 的权限插件,必须先打开 initialState 108 | * @doc https://umijs.org/docs/max/access 109 | */ 110 | access: {}, 111 | /** 112 | * @name 中额外的 script 113 | * @description 配置 中额外的 script 114 | */ 115 | headScripts: [ 116 | // 解决首次加载时白屏的问题 117 | { 118 | src: "/scripts/loading.js", 119 | async: true, 120 | }, 121 | ], 122 | 123 | //================ pro 插件配置 ================= 124 | presets: ["umi-presets-pro"], 125 | /** 126 | * @name openAPI 插件的配置 127 | * @description 基于 openapi 的规范生成serve 和mock,能减少很多样板代码 128 | * @doc https://pro.ant.design/zh-cn/docs/openapi/ 129 | */ 130 | openAPI: [ 131 | { 132 | requestLibPath: "import { request } from '@umijs/max'", 133 | schemaPath: "http://localhost:7529/api/v3/api-docs", 134 | projectName: "qiApi-backend", 135 | }, 136 | ], 137 | 138 | mfsu: { 139 | strategy: "normal", 140 | }, 141 | requestRecord: {}, 142 | tailwindcss: {}, 143 | }); 144 | -------------------------------------------------------------------------------- /config/defaultSettings.ts: -------------------------------------------------------------------------------- 1 | import {ProLayoutProps} from '@ant-design/pro-components'; 2 | 3 | const Settings: ProLayoutProps & { 4 | pwa?: boolean; 5 | logo?: string; 6 | navTheme?: string 7 | } = { 8 | navTheme: 'light', 9 | colorPrimary: "#1677FF", 10 | layout: 'top', 11 | contentWidth: 'Fluid', 12 | fixedHeader: true, 13 | fixSiderbar: true, 14 | colorWeak: false, 15 | splitMenus: false, 16 | title: 'Qi-API 接口开放平台', 17 | pwa: false, 18 | // logo: 'https://img.qimuu.icu/typory/logo.gif', 19 | iconfontUrl: 'https://img.qimuu.icu/typory/logo.gif', 20 | }; 21 | export default Settings; 22 | -------------------------------------------------------------------------------- /config/proxy.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @name 代理的配置 3 | * @see 在生产环境 代理是无法生效的,所以这里没有生产环境的配置 4 | * ------------------------------- 5 | * The agent cannot take effect in the production environment 6 | * so there is no configuration of the production environment 7 | * For details, please see 8 | * https://pro.ant.design/docs/deploy 9 | * 10 | * @doc https://umijs.org/docs/guides/proxy 11 | */ 12 | export default { 13 | // 如果需要自定义本地开发服务器 请取消注释按需调整 14 | // dev: { 15 | // // localhost:8000/api/** -> https://preview.pro.ant.design/api/** 16 | // '/api/': { 17 | // // 要代理的地址 18 | // target: 'http://localhost:8080/', 19 | // // 配置了这个可以从 http 代理到 https 20 | // // 依赖 origin 的功能可能需要这个,比如 cookie 21 | // changeOrigin: true, 22 | // }, 23 | // }, 24 | 25 | /** 26 | * @name 详细的代理配置 27 | * @doc https://github.com/chimurai/http-proxy-middleware 28 | */ 29 | test: { 30 | // localhost:8000/api/** -> https://preview.pro.ant.design/api/** 31 | '/api/': { 32 | target: 'https://proapi.azurewebsites.net', 33 | changeOrigin: true, 34 | pathRewrite: {'^': ''}, 35 | }, 36 | }, 37 | pre: { 38 | '/api/': { 39 | target: 'your pre url', 40 | changeOrigin: true, 41 | pathRewrite: {'^': ''}, 42 | }, 43 | }, 44 | }; 45 | -------------------------------------------------------------------------------- /config/routes.ts: -------------------------------------------------------------------------------- 1 | export default [ 2 | { 3 | path: '/user', 4 | layout: false, 5 | routes: [ 6 | { name: '登录', path: '/user/login', component: './User/Login' }, 7 | { 8 | name: '注册账号', 9 | path: '/user/register', 10 | component: './User/Register', 11 | }, 12 | { 13 | name: '注册账号', 14 | path: '/user/register/:id', 15 | component: './User/Register', 16 | hideInMenu: true, 17 | }, 18 | ], 19 | }, 20 | { path: '/', name: '欢迎', icon: 'smile', component: './Welcome' }, 21 | { 22 | path: '/interface/list', 23 | name: '接口广场', 24 | icon: 'RedditOutlined', 25 | component: './InterfaceSquare', 26 | }, 27 | { path: '/recharge/list', icon: 'PayCircleOutlined', name: '积分商城', component: './Recharge' }, 28 | 29 | { 30 | path: '/order/list', 31 | name: '我的订单', 32 | icon: 'ProfileOutlined', 33 | component: './Order/OrderList', 34 | }, 35 | { 36 | path: '/admin', 37 | name: '管理页', 38 | icon: 'crown', 39 | access: 'canAdmin', 40 | routes: [ 41 | { 42 | path: '/admin', 43 | redirect: '/admin/interface/list', 44 | }, 45 | { 46 | name: '接口管理', 47 | icon: 'ApiOutlined', 48 | path: '/admin/interface/list', 49 | component: './Admin/InterfaceInfoList', 50 | }, 51 | { 52 | name: '商品管理', 53 | icon: 'table', 54 | path: '/admin/productInfo/list', 55 | component: './Admin/ProductInfoList', 56 | }, 57 | { 58 | name: '用户管理', 59 | icon: 'TeamOutlined', 60 | path: '/admin/user/list', 61 | component: './Admin/UserList', 62 | }, 63 | ], 64 | }, 65 | { path: '/:id', name: '欢迎', icon: 'smile', component: './Welcome', hideInMenu: true }, 66 | { 67 | path: '/order/pay/:id', 68 | icon: 'PayCircleOutlined', 69 | name: '订单支付', 70 | component: './Order/PayOrder', 71 | hideInMenu: true, 72 | }, 73 | { 74 | path: '/order/info/:id', 75 | icon: 'ProfileOutlined', 76 | name: '订单详情', 77 | component: './Order/OrderInfo', 78 | hideInMenu: true, 79 | }, 80 | { 81 | path: '/account/center', 82 | name: '个人中心', 83 | icon: 'UserOutlined', 84 | component: './User/UserInfo', 85 | hideInMenu: true, 86 | }, 87 | { 88 | path: '/interface_info/:id', 89 | name: '接口详情', 90 | component: './InterfaceInfo', 91 | hideInMenu: true, 92 | }, 93 | { path: '*', layout: false, component: './404' }, 94 | ]; 95 | -------------------------------------------------------------------------------- /jsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "jsx": "react-jsx", 4 | "emitDecoratorMetadata": true, 5 | "experimentalDecorators": true, 6 | "baseUrl": ".", 7 | "paths": { 8 | "@/*": [ 9 | "./src/*" 10 | ] 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ant-design-pro", 3 | "version": "6.0.0", 4 | "private": true, 5 | "description": "An out-of-box UI solution for enterprise applications", 6 | "scripts": { 7 | "analyze": "cross-env ANALYZE=1 max build", 8 | "build": "max build", 9 | "deploy": "npm run build && npm run gh-pages", 10 | "dev": "npm run start:dev", 11 | "gh-pages": "gh-pages -d dist", 12 | "postinstall": "max setup", 13 | "jest": "jest", 14 | "lint": "npm run lint:js && npm run lint:prettier && npm run tsc", 15 | "lint-staged": "lint-staged", 16 | "lint-staged:js": "eslint --ext .js,.jsx,.ts,.tsx ", 17 | "lint:fix": "eslint --fix --cache --ext .js,.jsx,.ts,.tsx --format=pretty ./src ", 18 | "lint:js": "eslint --cache --ext .js,.jsx,.ts,.tsx --format=pretty ./src", 19 | "lint:prettier": "prettier -c --write \"**/**.{js,jsx,tsx,ts,less,md,json}\" --end-of-line auto", 20 | "openapi": "max openapi", 21 | "prettier": "prettier -c --write \"**/**.{js,jsx,tsx,ts,less,md,json}\"", 22 | "preview": "npm run build && max preview --port 8000", 23 | "record": "cross-env NODE_ENV=development REACT_APP_ENV=test max record --scene=login", 24 | "serve": "umi-serve", 25 | "start": "cross-env UMI_ENV=dev max dev", 26 | "start:dev": "cross-env REACT_APP_ENV=dev MOCK=none UMI_ENV=dev max dev umi", 27 | "start:no-mock": "cross-env MOCK=none UMI_ENV=dev max dev", 28 | "start:pre": "cross-env REACT_APP_ENV=pre UMI_ENV=dev max dev", 29 | "tsc": "tsc --noEmit" 30 | }, 31 | "lint-staged": { 32 | "**/*.{js,jsx,ts,tsx}": "npm run lint-staged:js", 33 | "**/*.{js,jsx,tsx,ts,less,md,json}": [ 34 | "prettier --write" 35 | ] 36 | }, 37 | "browserslist": [ 38 | "> 1%", 39 | "last 2 versions", 40 | "not ie <= 10" 41 | ], 42 | "dependencies": { 43 | "@ant-design/icons": "^4.8.0", 44 | "@ant-design/pro-components": "^2.3.57", 45 | "@ant-design/use-emotion-css": "1.0.4", 46 | "@umijs/route-utils": "^2.2.2", 47 | "antd": "^5.2.2", 48 | "antd-img-crop": "^4.12.2", 49 | "classnames": "^2.3.2", 50 | "lodash": "^4.17.21", 51 | "moment": "^2.29.4", 52 | "omit.js": "^2.0.2", 53 | "rc-menu": "^9.8.2", 54 | "rc-util": "^5.27.2", 55 | "react": "^18.2.0", 56 | "react-copy-to-clipboard": "^5.1.0", 57 | "react-dev-inspector": "^1.8.4", 58 | "react-dom": "^18.2.0", 59 | "react-helmet-async": "^1.3.0", 60 | "react-jsoneditor-wrapper": "^1.1.0", 61 | "react-syntax-highlighter": "^15.5.0" 62 | }, 63 | "devDependencies": { 64 | "@ant-design/pro-cli": "^2.1.5", 65 | "@testing-library/react": "^13.4.0", 66 | "@types/classnames": "^2.3.1", 67 | "@types/express": "^4.17.17", 68 | "@types/history": "^4.7.11", 69 | "@types/jest": "^29.4.0", 70 | "@types/lodash": "^4.14.191", 71 | "@types/react": "^18.0.28", 72 | "@types/react-dom": "^18.0.11", 73 | "@types/react-helmet": "^6.1.6", 74 | "@umijs/fabric": "^2.14.1", 75 | "@umijs/lint": "^4.0.52", 76 | "@umijs/max": "^4.0.52", 77 | "@umijs/preset-ui": "^2.2.9", 78 | "cross-env": "^7.0.3", 79 | "eslint": "^8.34.0", 80 | "express": "^4.18.2", 81 | "gh-pages": "^3.2.3", 82 | "jest-environment-jsdom": "^29.4.3", 83 | "lint-staged": "^10.5.4", 84 | "mockjs": "^1.1.0", 85 | "prettier": "^2.8.4", 86 | "swagger-ui-dist": "^4.15.5", 87 | "ts-node": "^10.9.1", 88 | "typescript": "^4.9.5", 89 | "umi-presets-pro": "^2.0.2", 90 | "tailwindcss": "^3" 91 | }, 92 | "engines": { 93 | "node": ">=12.0.0" 94 | } 95 | } -------------------------------------------------------------------------------- /public/assets/Alipay.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qimu666/qi-api-frontend/7f2ecb3e075fe32da6cfbda4eb7d72e78ba1b6e8/public/assets/Alipay.png -------------------------------------------------------------------------------- /public/assets/Gift.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qimu666/qi-api-frontend/7f2ecb3e075fe32da6cfbda4eb7d72e78ba1b6e8/public/assets/Gift.png -------------------------------------------------------------------------------- /public/assets/KunCoin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qimu666/qi-api-frontend/7f2ecb3e075fe32da6cfbda4eb7d72e78ba1b6e8/public/assets/KunCoin.png -------------------------------------------------------------------------------- /public/assets/LightColor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qimu666/qi-api-frontend/7f2ecb3e075fe32da6cfbda4eb7d72e78ba1b6e8/public/assets/LightColor.png -------------------------------------------------------------------------------- /public/assets/WeChat.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qimu666/qi-api-frontend/7f2ecb3e075fe32da6cfbda4eb7d72e78ba1b6e8/public/assets/WeChat.jpg -------------------------------------------------------------------------------- /public/assets/notLogin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qimu666/qi-api-frontend/7f2ecb3e075fe32da6cfbda4eb7d72e78ba1b6e8/public/assets/notLogin.png -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qimu666/qi-api-frontend/7f2ecb3e075fe32da6cfbda4eb7d72e78ba1b6e8/public/favicon.ico -------------------------------------------------------------------------------- /public/logo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qimu666/qi-api-frontend/7f2ecb3e075fe32da6cfbda4eb7d72e78ba1b6e8/public/logo.gif -------------------------------------------------------------------------------- /public/scripts/loading.js: -------------------------------------------------------------------------------- 1 | /** 2 | * loading 占位 3 | * 解决首次加载时白屏的问题 4 | */ 5 | (function () { 6 | const _root = document.querySelector('#root'); 7 | if (_root && _root.innerHTML === '') { 8 | _root.innerHTML = ` 9 | 175 | 176 |请收下我的礼物
38 |100积分
47 |异常刷取积分将永久封禁账号
99 |{valueLength(loginUser?.userName) ? loginUser?.userName : '无名氏'}
; 21 | }; 22 | 23 | export const AvatarDropdown: React.FC36 | Want to add more pages? Please refer to{' '} 37 | 38 | use block 39 | 40 | 。 41 |
42 |请求参数说明:
20 |响应参数说明: errorCodeTab?.()}>错误码参照
43 |请求示例:
*/} 52 | sampleCode?.()}>见示例代码 53 |返回示例:
54 |返回结果:
73 |错误码:
160 |接口详细描述请前往开发者在线文档查看:
220 | 📘 221 | 接口在线文档:{data?.name} 222 |41 | Qi-API 接口开放平台是一个为用户和开发者提供全面API接口调用服务的平台 🛠 42 |
43 |44 | —— 极速响应,让速度为您见证一切! 45 |
46 |