feature: 更新项目说明

This commit is contained in:
梁真铭 2025-01-02 15:35:04 +08:00
parent 85e042a0cd
commit ab4dec2d0f

View File

@ -1,39 +1,29 @@
# oauth2-h5
This template should help get you started developing with Vue 3 in Vite.
## 服务端
## Recommended IDE Setup
### 项目h5 https://git.leonmin.com/example/oauth2-h5
[VSCode](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur).
## Type Support for `.vue` Imports in TS
TypeScript cannot handle type information for `.vue` imports by default, so we replace the `tsc` CLI with `vue-tsc` for type checking. In editors, we need [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) to make the TypeScript language service aware of `.vue` types.
## Customize configuration
See [Vite Configuration Reference](https://vite.dev/config/).
## Project Setup
```sh
npm install
```bash
$ npm install
$ npm run dev
```
### Compile and Hot-Reload for Development
### 资源服务器 https://git.leonmin.com/example/oauth2-resource-server
```sh
npm run dev
```bash
$ make run/api # 或者go run ./cmd/api -port=4002
```
### Type-Check, Compile and Minify for Production
### 授权服务器 https://git.leonmin.com/example/oauth2-authorize-server
```sh
npm run build
```bash
$ make run/api # 或者go run ./cmd/api -port=4001
```
### Lint with [ESLint](https://eslint.org/)
### 截图
```sh
npm run lint
```
![首页](https://git.leonmin.com/example/assets/raw/branch/master/images/oauth2/oauth2-home.png)
![登录](https://git.leonmin.com/example/assets/raw/branch/master/images/oauth2/oauth2-login.png)
![同意授权](https://git.leonmin.com/example/assets/raw/branch/master/images/oauth2/oauth2-agree-auth.png)
![授权数据](https://git.leonmin.com/example/assets/raw/branch/master/images/oauth2/oauth2-authorize.png)