├── .commitlintrc.json ├── .dockerignore ├── .editorconfig ├── .env ├── .eslintignore ├── .eslintrc.cjs ├── .gitattributes ├── .gitignore ├── .husky ├── commit-msg └── pre-commit ├── .npmrc ├── LICENSE ├── README.md ├── config ├── index.ts └── proxy.ts ├── docs ├── CONTRIBUTING.en.md ├── CONTRIBUTING.md ├── config1.png ├── config2.png ├── config3.png ├── mobile-ask.png ├── pandaai-login.png └── pc-ask.png ├── index.html ├── package.json ├── pnpm-lock.yaml ├── postcss.config.js ├── public ├── favicon.ico ├── favicon.svg ├── pwa-192x192.png └── pwa-512x512.png ├── src ├── App.vue ├── api │ └── index.ts ├── assets │ ├── avatar.jpg │ ├── icons │ │ ├── login.svg │ │ └── logo.svg │ ├── images │ │ ├── account-logo.png │ │ └── login.svg │ ├── recommend.json │ └── xaAvatar.png ├── components │ ├── common │ │ ├── HoverButton │ │ │ ├── Button.vue │ │ │ └── index.vue │ │ ├── NaiveProvider │ │ │ └── index.vue │ │ ├── PromptStore │ │ │ └── index.vue │ │ ├── Setting │ │ │ ├── About.vue │ │ │ ├── Account.vue │ │ │ ├── Advanced.vue │ │ │ ├── Config.vue │ │ │ ├── General.vue │ │ │ └── index.vue │ │ ├── SvgIcon │ │ │ └── index.vue │ │ ├── UserAvatar │ │ │ └── index.vue │ │ └── index.ts │ └── custom │ │ ├── GithubSite.vue │ │ └── index.ts ├── config │ └── website.config.ts ├── enums │ ├── breakpointEnum.ts │ ├── cacheEnum.ts │ ├── httpEnum.ts │ ├── pageEnum.ts │ ├── permissionsEnum.ts │ └── roleEnum.ts ├── hooks │ ├── useBasicLayout.ts │ ├── useIconRender.ts │ ├── useLanguage.ts │ └── useTheme.ts ├── icons │ ├── 403.vue │ ├── 404.svg │ └── 500.vue ├── locales │ ├── en-US.ts │ ├── index.ts │ ├── zh-CN.ts │ └── zh-TW.ts ├── main.ts ├── plugins │ ├── assets.ts │ ├── index.ts │ └── scrollbarStyle.ts ├── router │ ├── index.ts │ └── permission.ts ├── store │ ├── index.ts │ ├── modules │ │ ├── app │ │ │ ├── helper.ts │ │ │ └── index.ts │ │ ├── auth │ │ │ ├── helper.ts │ │ │ └── index.ts │ │ ├── chat │ │ │ ├── helper.ts │ │ │ └── index.ts │ │ ├── index.ts │ │ ├── prompt │ │ │ ├── helper.ts │ │ │ └── index.ts │ │ ├── settings │ │ │ ├── helper.ts │ │ │ └── index.ts │ │ └── user │ │ │ ├── helper.ts │ │ │ └── index.ts │ └── userToken.ts ├── styles │ ├── global.less │ └── lib │ │ ├── github-markdown.less │ │ ├── highlight.less │ │ └── tailwind.css ├── typings │ ├── chat.d.ts │ ├── env.d.ts │ └── global.d.ts ├── utils │ ├── crypto │ │ └── index.ts │ ├── format │ │ └── index.ts │ ├── functions │ │ ├── debounce.ts │ │ └── index.ts │ ├── is │ │ └── index.ts │ ├── request │ │ ├── axios.ts │ │ └── index.ts │ └── storage │ │ ├── index.ts │ │ └── local.ts └── views │ ├── chat │ ├── components │ │ ├── Header │ │ │ └── index.vue │ │ ├── Message │ │ │ ├── Avatar.vue │ │ │ ├── Text.vue │ │ │ ├── index.vue │ │ │ └── style.less │ │ └── index.ts │ ├── hooks │ │ ├── useChat.ts │ │ ├── useCopyCode.ts │ │ ├── useScroll.ts │ │ └── useUsingContext.ts │ ├── index.vue │ └── layout │ │ ├── Layout.vue │ │ ├── Permission.vue │ │ ├── index.ts │ │ └── sider │ │ ├── Footer.vue │ │ ├── List.vue │ │ └── index.vue │ └── exception │ ├── 404 │ └── index.vue │ ├── 500 │ └── index.vue │ └── login │ └── login.vue ├── start.cmd ├── start.sh ├── tailwind.config.js ├── tsconfig.json └── vite.config.ts /.commitlintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": ["@commitlint/config-conventional"] 3 | } 4 | -------------------------------------------------------------------------------- /.dockerignore: -------------------------------------------------------------------------------- 1 | **/node_modules 2 | */node_modules 3 | node_modules 4 | Dockerfile 5 | .* 6 | */.* 7 | !.env 8 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # Editor configuration, see http://editorconfig.org 2 | 3 | root = true 4 | 5 | [*] 6 | charset = utf-8 7 | indent_style = tab 8 | indent_size = 2 9 | end_of_line = lf 10 | trim_trailing_whitespace = true 11 | insert_final_newline = true 12 | -------------------------------------------------------------------------------- /.env: -------------------------------------------------------------------------------- 1 | # 部署环境 2 | NODE_ENV=production 3 | 4 | # Nginx prefix 5 | VITE_APP_WEB_BASE_URL=/v2/chat 6 | 7 | # Glob API URL 8 | VITE_GLOB_API_URL=/api 9 | 10 | VITE_APP_API_BASE_URL=http://localhost:8080/ 11 | 12 | # Whether long replies are supported, which may result in higher API fees 13 | VITE_GLOB_OPEN_LONG_REPLY=false 14 | 15 | # When you want to use PWA 16 | VITE_GLOB_APP_PWA=false 17 | -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | docker-compose 2 | kubernetes 3 | -------------------------------------------------------------------------------- /.eslintrc.cjs: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | extends: ['@antfu'], 4 | } 5 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | .DS_Store 3 | -------------------------------------------------------------------------------- /.husky/commit-msg: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | . "$(dirname -- "$0")/_/husky.sh" 3 | 4 | npx --no -- commitlint --edit 5 | -------------------------------------------------------------------------------- /.husky/pre-commit: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | . "$(dirname -- "$0")/_/husky.sh" 3 | 4 | npx lint-staged 5 | -------------------------------------------------------------------------------- /.npmrc: -------------------------------------------------------------------------------- 1 | strict-peer-dependencies=false 2 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 solanacaea 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 | # ChatGPT Web 2 | 3 | > 声明:此项目只发布于 Github,基于 MIT 协议,免费且作为开源学习使用。并且不会有任何形式的卖号、付费服务,谨防受骗。 4 | 5 | ## 一、介绍 6 | > 项目前端采用Express+vue3, 后端采用Java+Mysql。 7 | ### 1.界面 8 | 登录页:登录移动端:移动端 9 | 10 | 电脑端:电脑端 11 | 12 | 配置项:config1 13 | config2 14 | config3 15 | 16 | ### 2.服务端 17 | 18 | 后端代码在这里: 19 | https://github.com/solanacaea/chatgpt/tree/main/server 20 | 21 | 待整理,comming soon.... 22 | 23 | ## 二、部署方法 24 | ### 1.前端 25 | 26 | #### Node 27 | 28 | `node` 需要14以上版本: ```node -v, npm -v``` 29 | 30 | #### PNPM 31 | 如果你没有安装过 `pnpm`: ```npm install pnpm -g``` 32 | 33 | 安装node的版本管理工具:```npm i -g n``` 34 | 35 | 安装稳定版:```n stable``` 36 | 37 | 升级到最新版本:```npm i -g npm``` 38 | 39 | ### 2.后端 40 | #### SQL Scripts 41 | 待整理,comming soon.... 42 | 43 | #### Maven 44 | 待整理,comming soon.... 45 | 46 | ## 三、待实现路线 47 | [✓] 账号密码登录 48 | 49 | [✓] 账号信息修改 50 | 51 | [✗] 微信授权登录 52 | 53 | [✗] Email注册、登录、修改密码 54 | 55 | [✗] 手机验证码注册、登录、修改密码 56 | 57 | [✗] 用量计费优化 58 | 59 | [✗] 流式处理问答结果 60 | 61 | [✗] 问答优化 62 | 63 | ## 有bug欢迎朋友们指出,互相学习。 64 | 一起探讨ChatGPT和其它大模型、项目产品开发交流。 65 | 66 | 联系方式:jx3_xiaopang@126.com 67 | 68 | 69 | ## 参与贡献 70 | 71 | 贡献之前请先阅读 [贡献指南](./CONTRIBUTING.md) 72 | 73 | 感谢所有做过贡献的人! 74 | 75 | ## 感谢 76 | [ChenZhaoYu](https://github.com/Chanzhaoyu/chatgpt-web) 77 | 78 | https://github.com/Grt1228/chatgpt-java 79 | 80 | OpenAI:https://openai.com/ 81 | 82 | ## License 83 | MIT © [Solanacaea](./license) 84 | -------------------------------------------------------------------------------- /config/index.ts: -------------------------------------------------------------------------------- 1 | export * from './proxy' 2 | -------------------------------------------------------------------------------- /config/proxy.ts: -------------------------------------------------------------------------------- 1 | import type { ProxyOptions } from 'vite' 2 | 3 | export function createViteProxy(isOpenProxy: boolean, viteEnv: ImportMetaEnv) { 4 | if (!isOpenProxy) 5 | return 6 | 7 | const proxy: Record = { 8 | '/api': { 9 | target: viteEnv.VITE_APP_API_BASE_URL, 10 | changeOrigin: true, 11 | rewrite: path => path.replace('/api/', '/'), 12 | }, 13 | } 14 | 15 | return proxy 16 | } 17 | -------------------------------------------------------------------------------- /docs/CONTRIBUTING.en.md: -------------------------------------------------------------------------------- 1 | # Contribution Guide 2 | Thank you for your valuable time. Your contributions will make this project better! Before submitting a contribution, please take some time to read the getting started guide below. 3 | 4 | ## Semantic Versioning 5 | This project follows semantic versioning. We release patch versions for important bug fixes, minor versions for new features or non-important changes, and major versions for significant and incompatible changes. 6 | 7 | Each major change will be recorded in the `changelog`. 8 | 9 | ## Submitting Pull Request 10 | 1. Fork [this repository](https://github.com/Chanzhaoyu/chatgpt-web) and create a branch from `main`. For new feature implementations, submit a pull request to the `feature` branch. For other changes, submit to the `main` branch. 11 | 2. Install the `pnpm` tool using `npm install pnpm -g`. 12 | 3. Install the `Eslint` plugin for `VSCode`, or enable `eslint` functionality for other editors such as `WebStorm`. 13 | 4. Execute `pnpm bootstrap` in the root directory. 14 | 5. Execute `pnpm install` in the `/service/` directory. 15 | 6. Make changes to the codebase. If applicable, ensure that appropriate testing has been done. 16 | 7. Execute `pnpm lint:fix` in the root directory to perform a code formatting check. 17 | 8. Execute `pnpm type-check` in the root directory to perform a type check. 18 | 9. Submit a git commit, following the [Commit Guidelines](#commit-guidelines). 19 | 10. Submit a `pull request`. If there is a corresponding `issue`, please link it using the [linking-a-pull-request-to-an-issue keyword](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword). 20 | 21 | ## Commit Guidelines 22 | 23 | Commit messages should follow the [conventional-changelog standard](https://www.conventionalcommits.org/en/v1.0.0/): 24 | 25 | ```bash 26 | [optional scope]: 27 | 28 | [optional body] 29 | 30 | [optional footer] 31 | ``` 32 | 33 | ### Commit Types 34 | 35 | The following is a list of commit types: 36 | 37 | - feat: New feature or functionality 38 | - fix: Bug fix 39 | - docs: Documentation update 40 | - style: Code style or component style update 41 | - refactor: Code refactoring, no new features or bug fixes introduced 42 | - perf: Performance optimization 43 | - test: Unit test 44 | - chore: Other commits that do not modify src or test files 45 | 46 | 47 | ## License 48 | 49 | [MIT](./license) -------------------------------------------------------------------------------- /docs/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # 贡献指南 2 | 感谢你的宝贵时间。你的贡献将使这个项目变得更好!在提交贡献之前,请务必花点时间阅读下面的入门指南。 3 | 4 | ## 语义化版本 5 | 该项目遵循语义化版本。我们对重要的漏洞修复发布修订号,对新特性或不重要的变更发布次版本号,对重大且不兼容的变更发布主版本号。 6 | 7 | 每个重大更改都将记录在 `changelog` 中。 8 | 9 | ## 提交 Pull Request 10 | 1. Fork [此仓库](https://github.com/Chanzhaoyu/chatgpt-web),从 `main` 创建分支。新功能实现请发 pull request 到 `feature` 分支。其他更改发到 `main` 分支。 11 | 2. 使用 `npm install pnpm -g` 安装 `pnpm` 工具。 12 | 3. `vscode` 安装了 `Eslint` 插件,其它编辑器如 `webStorm` 打开了 `eslint` 功能。 13 | 4. 根目录下执行 `pnpm bootstrap`。 14 | 5. `/service/` 目录下执行 `pnpm install`。 15 | 6. 对代码库进行更改。如果适用的话,请确保进行了相应的测试。 16 | 7. 请在根目录下执行 `pnpm lint:fix` 进行代码格式检查。 17 | 8. 请在根目录下执行 `pnpm type-check` 进行类型检查。 18 | 9. 提交 git commit, 请同时遵守 [Commit 规范](#commit-指南) 19 | 10. 提交 `pull request`, 如果有对应的 `issue`,请进行[关联](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword)。 20 | 21 | ## Commit 指南 22 | 23 | Commit messages 请遵循[conventional-changelog 标准](https://www.conventionalcommits.org/en/v1.0.0/): 24 | 25 | ```bash 26 | <类型>[可选 范围]: <描述> 27 | 28 | [可选 正文] 29 | 30 | [可选 脚注] 31 | ``` 32 | 33 | ### Commit 类型 34 | 35 | 以下是 commit 类型列表: 36 | 37 | - feat: 新特性或功能 38 | - fix: 缺陷修复 39 | - docs: 文档更新 40 | - style: 代码风格或者组件样式更新 41 | - refactor: 代码重构,不引入新功能和缺陷修复 42 | - perf: 性能优化 43 | - test: 单元测试 44 | - chore: 其他不修改 src 或测试文件的提交 45 | 46 | 47 | ## License 48 | 49 | [MIT](./license) 50 | -------------------------------------------------------------------------------- /docs/config1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solanacaea/chatgpt-web/df67e94c21b696cce2fc4df7837180fe6925031c/docs/config1.png -------------------------------------------------------------------------------- /docs/config2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solanacaea/chatgpt-web/df67e94c21b696cce2fc4df7837180fe6925031c/docs/config2.png -------------------------------------------------------------------------------- /docs/config3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solanacaea/chatgpt-web/df67e94c21b696cce2fc4df7837180fe6925031c/docs/config3.png -------------------------------------------------------------------------------- /docs/mobile-ask.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solanacaea/chatgpt-web/df67e94c21b696cce2fc4df7837180fe6925031c/docs/mobile-ask.png -------------------------------------------------------------------------------- /docs/pandaai-login.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solanacaea/chatgpt-web/df67e94c21b696cce2fc4df7837180fe6925031c/docs/pandaai-login.png -------------------------------------------------------------------------------- /docs/pc-ask.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solanacaea/chatgpt-web/df67e94c21b696cce2fc4df7837180fe6925031c/docs/pc-ask.png -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 10 | ChatGPT Web 11 | 12 | 13 | 14 |
15 | 72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 | 81 | 82 | 83 | 84 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "chatgpt-web", 3 | "version": "0.0.1", 4 | "private": false, 5 | "description": "ChatGPT Web", 6 | "author": "SB", 7 | "keywords": [ 8 | "chatgpt-web", 9 | "chatgpt", 10 | "chatbot", 11 | "vue" 12 | ], 13 | "scripts": { 14 | "dev": "vite", 15 | "build": "vite build", 16 | "preview": "vite preview", 17 | "build-only": "vite build", 18 | "type-check": "vue-tsc --noEmit", 19 | "lint": "eslint .", 20 | "lint:fix": "eslint . --fix", 21 | "bootstrap": "pnpm install && pnpm run common:prepare", 22 | "common:cleanup": "rimraf node_modules && rimraf pnpm-lock.yaml", 23 | "common:prepare": "husky install" 24 | }, 25 | "dependencies": { 26 | "@traptitech/markdown-it-katex": "^3.6.0", 27 | "@vicons/ionicons5": "^0.12.0", 28 | "@vueuse/core": "^9.13.0", 29 | "highlight.js": "^11.7.0", 30 | "html2canvas": "^1.4.1", 31 | "katex": "^0.16.4", 32 | "markdown-it": "^13.0.1", 33 | "naive-ui": "^2.34.3", 34 | "nprogress": "^0.2.0", 35 | "pinia": "^2.0.33", 36 | "store": "^2.0.12", 37 | "vicons": "^0.0.1", 38 | "vue": "^3.2.47", 39 | "vue-i18n": "^9.2.2", 40 | "vue-router": "^4.1.6" 41 | }, 42 | "devDependencies": { 43 | "@antfu/eslint-config": "^0.35.3", 44 | "@commitlint/cli": "^17.4.4", 45 | "@commitlint/config-conventional": "^17.4.4", 46 | "@iconify/vue": "^4.1.0", 47 | "@types/crypto-js": "^4.1.1", 48 | "@types/katex": "^0.16.0", 49 | "@types/markdown-it": "^12.2.3", 50 | "@types/markdown-it-link-attributes": "^3.0.1", 51 | "@types/node": "^18.14.6", 52 | "@vitejs/plugin-vue": "^4.0.0", 53 | "autoprefixer": "^10.4.13", 54 | "axios": "^1.3.4", 55 | "crypto-js": "^4.1.1", 56 | "eslint": "^8.35.0", 57 | "husky": "^8.0.3", 58 | "less": "^4.1.3", 59 | "lint-staged": "^13.1.2", 60 | "markdown-it-link-attributes": "^4.0.1", 61 | "npm-run-all": "^4.1.5", 62 | "postcss": "^8.4.21", 63 | "rimraf": "^4.2.0", 64 | "tailwindcss": "^3.2.7", 65 | "typescript": "~4.9.5", 66 | "vite": "^4.2.0", 67 | "vite-plugin-pwa": "^0.14.4", 68 | "vue-tsc": "^1.2.0" 69 | }, 70 | "lint-staged": { 71 | "*.{ts,tsx,vue}": [ 72 | "pnpm lint:fix" 73 | ] 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /postcss.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {}, 5 | }, 6 | } 7 | -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solanacaea/chatgpt-web/df67e94c21b696cce2fc4df7837180fe6925031c/public/favicon.ico -------------------------------------------------------------------------------- /public/favicon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/pwa-192x192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solanacaea/chatgpt-web/df67e94c21b696cce2fc4df7837180fe6925031c/public/pwa-192x192.png -------------------------------------------------------------------------------- /public/pwa-512x512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solanacaea/chatgpt-web/df67e94c21b696cce2fc4df7837180fe6925031c/public/pwa-512x512.png -------------------------------------------------------------------------------- /src/App.vue: -------------------------------------------------------------------------------- 1 | 10 | 11 | 23 | -------------------------------------------------------------------------------- /src/api/index.ts: -------------------------------------------------------------------------------- 1 | import type { AxiosProgressEvent, GenericAbortSignal } from 'axios' 2 | import { get, post } from '@/utils/request' 3 | 4 | export function fetchChatAPI( 5 | prompt: string, 6 | options?: { conversationId?: string; parentMessageId?: string }, 7 | signal?: GenericAbortSignal, 8 | ) { 9 | return post({ 10 | url: '/chat', 11 | data: { prompt, options }, 12 | signal, 13 | }) 14 | } 15 | 16 | export function fetchChatConfig() { 17 | return post({ 18 | url: '/config', 19 | }) 20 | } 21 | 22 | export function fetchChatAPIProcess( 23 | params: { 24 | prompt: string 25 | options: Chat.ConversationRequest 26 | signal?: GenericAbortSignal 27 | onDownloadProgress?: (progressEvent: AxiosProgressEvent) => void }, 28 | ) { 29 | return post({ 30 | url: '/ask', 31 | data: { 32 | question: params.prompt, 33 | conversationId: params.options.conversationId, 34 | msgId: params.options.msgId, 35 | stream: params.options.stream, 36 | context: params.options.context, 37 | questionType: params.options.questionType, 38 | }, 39 | signal: params.signal, 40 | onDownloadProgress: params.onDownloadProgress, 41 | }) 42 | } 43 | 44 | export function fetchSession() { 45 | return post({ 46 | url: '/session', 47 | }) 48 | } 49 | 50 | export function fetchVerify(token: string) { 51 | return post({ 52 | url: '/verify', 53 | data: { token }, 54 | }) 55 | } 56 | 57 | export function validteMe() { 58 | return post({ 59 | url: '/auth/validate', 60 | }) 61 | } 62 | 63 | export function signin(params: any) { 64 | return post({ 65 | url: '/auth/signin', 66 | data: params, 67 | }) 68 | } 69 | 70 | export function meInfo() { 71 | return get({ 72 | url: '/user/me', 73 | }) 74 | } 75 | 76 | export function updateMe(name: string) { 77 | return post({ 78 | url: '/user/update/name', 79 | data: { name }, 80 | }) 81 | } 82 | 83 | export function updatePwd(params: any) { 84 | return post({ 85 | url: '/auth/change', 86 | data: params, 87 | }) 88 | } 89 | -------------------------------------------------------------------------------- /src/assets/avatar.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solanacaea/chatgpt-web/df67e94c21b696cce2fc4df7837180fe6925031c/src/assets/avatar.jpg -------------------------------------------------------------------------------- /src/assets/icons/login.svg: -------------------------------------------------------------------------------- 1 | 3 | 4 | Group 21 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 12 | 14 | 16 | 19 | 21 | 24 | 27 | 30 | 32 | 36 | 37 | 38 | 40 | 42 | 44 | 46 | 48 | 51 | 53 | 55 | 59 | 60 | 62 | 64 | 66 | 68 | 69 | 71 | 73 | 74 | 76 | 79 | 80 | 82 | 84 | 86 | 88 | 89 | 91 | 94 | 95 | 99 | 100 | 101 | 103 | 105 | 107 | 109 | 111 | 113 | 114 | 115 | 117 | 119 | 120 | 121 | 122 | 123 | 124 |