Merge pull request !12 from ktianc/master
This commit is contained in:
ktianc 2024-03-02 12:02:24 +00:00 committed by Gitee
commit 64f221fb3f
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
9 changed files with 34 additions and 42 deletions

View File

@ -49,13 +49,14 @@ Kinit 是一套全部开源的快速开发平台,毫无保留给个人及企
<div align="center">
<p align="center">
<img src="https://ktianc.oss-cn-beijing.aliyuncs.com/resource/images/1708790400/1708851116W4zGcP9N.jpg" height="500" alt="logo"/>
<img src="https://ktianc.oss-cn-beijing.aliyuncs.com/kinit/public/images/0eb1de8eabf2f18bfa1c0d6c0151589.jpg" height="500" alt="logo"/>
</p>
</div>
## 在线体验
PC端演示地址https://kinit.ktianc.top

View File

@ -5,3 +5,5 @@ dist-ssr
*-lock.*
pnpm-debug
stats.html
dist-pro
.vscode

View File

@ -1,3 +0,0 @@
{
"recommendations": ["vue.volar", "lokalise.i18n-ally"]
}

View File

@ -1,19 +0,0 @@
{
"typescript.tsdk": "node_modules/typescript/lib",
"prettier.enable": false,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
"[vue]": {
"editor.defaultFormatter": "rvest.vs-code-prettier-eslint"
},
"i18n-ally.localesPaths": ["src/locales"],
"i18n-ally.keystyle": "nested",
"i18n-ally.sortKeys": true,
"i18n-ally.namespace": false,
"i18n-ally.enabledParsers": ["ts"],
"i18n-ally.sourceLanguage": "zh-CN",
"i18n-ally.displayLanguage": "zh-CN",
"i18n-ally.enabledFrameworks": ["vue", "react"],
"god.tsconfig": "./tsconfig.json"
}

View File

@ -9,7 +9,7 @@ const prefixCls = getPrefixCls('footer')
const appStore = useAppStore()
const title = computed(() => appStore.getTitle)
const footerContent = computed(() => appStore.getFooterContent)
</script>
<template>
@ -17,6 +17,6 @@ const title = computed(() => appStore.getTitle)
:class="prefixCls"
class="shrink-0 text-center text-[var(--el-text-color-placeholder)] bg-[var(--app-content-bg-color)] h-[var(--app-footer-height)] leading-[var(--app-footer-height)] dark:bg-[var(--el-bg-color)]"
>
Copyright ©2021-present {{ title }}
{{ footerContent }}
</div>
</template>

View File

@ -9,6 +9,7 @@ import { useDesign } from '@/hooks/web/useDesign'
import { ref } from 'vue'
import { ElScrollbar } from 'element-plus'
import { computed } from 'vue'
import { ElButton } from 'element-plus'
const { getPrefixCls } = useDesign()
@ -28,6 +29,11 @@ const toTelephoneLogin = () => {
const toPasswordLogin = () => {
isPasswordLogin.value = true
}
const icpNumber = computed(() => appStore.getIcpNumber)
const toICO = () => {
window.open('https://beian.miit.gov.cn/#/Integrated/index')
}
</script>
<template>
@ -88,6 +94,9 @@ const toPasswordLogin = () => {
/>
</div>
</Transition>
<div class="text-14px text-white font-normal absolute bottom-5 right-10">
<ElButton type="info" link @click="toICO">{{ icpNumber }}</ElButton>
</div>
</div>
</div>
</ElScrollbar>

View File

@ -149,7 +149,7 @@ const formSchema = reactive<FormSchema[]>([
show-file-list={false}
before-upload={beforeImageUpload}
on-success={handleUploadSuccess}
accept="image/jpeg,image/gif,image/png"
accept="image/x-icon"
name="file"
headers={{ Authorization: token }}
>
@ -259,10 +259,10 @@ const save = async () => {
try {
const res = await putSystemSettingsApi(formData)
if (res) {
appStore.setTitle(res.data.web_title || import.meta.env.VITE_APP_TITLE)
appStore.setLogoImage(res.data.web_logo || '/static/system/logo.png')
appStore.setFooterContent(res.data.web_copyright || 'Copyright ©2022-present K')
appStore.setIcpNumber(res.data.web_icp_number || '')
appStore.setTitle(formData.web_title || import.meta.env.VITE_APP_TITLE)
appStore.setLogoImage(formData.web_logo || '/media/system/logo.png')
appStore.setFooterContent(formData.web_copyright || 'Copyright ©2022-present K')
appStore.setIcpNumber(formData.web_icp_number || '')
return ElMessage.success('更新成功')
}
} finally {

View File

@ -11,13 +11,13 @@ from fastapi.security import OAuth2PasswordBearer
"""
系统版本
"""
VERSION = "3.7.0"
VERSION = "3.7.1"
"""安全警告: 不要在生产中打开调试运行!"""
DEBUG = False
"""是否开启演示功能取消所有POST,DELETE,PUT操作权限"""
DEMO = False
DEMO = True
"""演示功能白名单"""
DEMO_WHITE_LIST_PATH = [
"/auth/login",

View File

@ -63,19 +63,21 @@ class FileManage(FileBase):
async def async_save_local(self) -> dict:
"""
保存文件到本地
:return:
:return: 示例
{
'local_path': 'D:\\project\\kinit_dev\\kinit-api\\static\\system\\20240301\\1709303205HuYB3mrC.png',
'remote_path': '/media/system/20240301/1709303205HuYB3mrC.png'
}
"""
path = self.path
path = AsyncPath(self.path)
if sys.platform == "win32":
path = self.path.replace("/", "\\")
save_path = AsyncPath(STATIC_ROOT) / path
if not await save_path.parent.exists():
await save_path.parent.mkdir(parents=True, exist_ok=True)
await save_path.write_bytes(await self.file.read())
remote_path = path.replace(STATIC_ROOT, '').replace("\\", '/')
path = AsyncPath(self.path.replace("/", "\\"))
if not await path.parent.exists():
await path.parent.mkdir(parents=True, exist_ok=True)
await path.write_bytes(await self.file.read())
return {
"local_path": path,
"remote_path": f"{STATIC_URL}/{remote_path}"
"local_path": str(path),
"remote_path": STATIC_URL + str(path).replace(STATIC_ROOT, '').replace("\\", '/')
}
@classmethod