mirror of
https://github.com/nagisa77/OpenIsle.git
synced 2026-02-20 22:11:01 +08:00
feat: 主页缓存
This commit is contained in:
33
backend/open-isle.env.example
Normal file
33
backend/open-isle.env.example
Normal file
@@ -0,0 +1,33 @@
|
||||
# === Database ===
|
||||
MYSQL_URL=jdbc:mysql://<数据库地址>:<端口>/<数据库名>?useUnicode=yes&characterEncoding=UTF-8&useInformationSchema=true&useSSL=false&serverTimezone=UTC
|
||||
MYSQL_USER=<数据库用户名>
|
||||
MYSQL_PASSWORD=<数据库密码>
|
||||
|
||||
|
||||
# === Resend ===
|
||||
RESEND_API_KEY=<你的resend-api-key>
|
||||
|
||||
# === COS ===
|
||||
# COS_BASE_URL=https://<你的cos>.cos.ap-guangzhou.myqcloud.com
|
||||
COS_BASE_URL=https://<你的cos>.cos.accelerate.myqcloud.com
|
||||
COS_SECRET_ID=<你的cos-secret-id>
|
||||
COS_SECRET_KEY=<你的cos-secret-key>
|
||||
COS_BUCKET_NAME=<你的cos-bucket-name>
|
||||
|
||||
# === OAuth ===
|
||||
GOOGLE_CLIENT_ID=<你的google-client-id>
|
||||
GITHUB_CLIENT_ID=<你的github-client-id>
|
||||
GITHUB_CLIENT_SECRET=<你的github-client-secret>
|
||||
TWITTER_CLIENT_ID=<你的twitter-client-id>
|
||||
TWITTER_CLIENT_SECRET=<你的-twitter-client-secret>
|
||||
DISCORD_CLIENT_ID=<你的discord-client-id>
|
||||
DISCORD_CLIENT_SECRET=<你的discord-client-secret>
|
||||
|
||||
# === OPENAI ===
|
||||
OPENAI_API_KEY=<你的openai-api-key>
|
||||
|
||||
# === Webpush ===
|
||||
WEBPUSH_PUBLIC_KEY=<你的webpush-public-key>
|
||||
WEBPUSH_PRIVATE_KEY=<你的webpush-private-key>
|
||||
|
||||
# LOG_LEVEL=DEBUG
|
||||
@@ -107,7 +107,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { ref, onMounted, watch, onActivated, onDeactivated, nextTick } from 'vue'
|
||||
import { ref, onMounted, watch, onActivated, nextTick } from 'vue'
|
||||
import { useRoute } from 'vue-router'
|
||||
import { stripMarkdown } from '../utils/markdown'
|
||||
import { API_BASE_URL } from '../main'
|
||||
@@ -175,12 +175,6 @@ export default {
|
||||
})
|
||||
})
|
||||
|
||||
onDeactivated(() => {
|
||||
if (homePage.value) {
|
||||
savedScrollTop.value = homePage.value.scrollTop
|
||||
}
|
||||
})
|
||||
|
||||
const countComments = (list) =>
|
||||
list.reduce((sum, c) => sum + 1 + countComments(c.replies || []), 0)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user