feat: 文案内容

This commit is contained in:
Archer
2023-03-09 21:23:58 +08:00
parent 17364e9da3
commit e132c622a6
4 changed files with 12 additions and 5 deletions

View File

@@ -356,7 +356,7 @@
line-height: 1.6;
letter-spacing: 0.5px;
text-align: justify;
word-break: break-all;
pre {
display: block;
width: 100%;

View File

@@ -6,6 +6,8 @@ export enum EmailTypeEnum {
export const introPage = `
## 欢迎使用 Doc GPT
[Git 仓库](https://github.com/c121914yu/DocGPT)
时间比较赶,介绍没来得及完善,先直接上怎么使用:
1. 使用邮箱注册账号。
2. 进入账号页面,添加关联账号,目前只有 openai 的账号可以添加,直接去 openai 官网,把 API Key 粘贴过来。

View File

@@ -20,10 +20,13 @@ export const jsonRes = (
let msg = message;
if ((code < 200 || code >= 400) && !message) {
msg =
typeof error === 'string'
? error
: openaiError[error?.response?.data?.message] || error?.message || '请求错误';
msg = error?.message || '请求错误';
if (typeof error === 'string') {
msg = error;
} else if (error?.response?.data?.message in openaiError) {
msg = openaiError[error?.response?.data?.message];
}
console.error(error);
console.error(msg);
}