Skip to content

Commit

Permalink
!12 3.7.1
Browse files Browse the repository at this point in the history
Merge pull request !12 from ktianc/master
  • Loading branch information
ktianc authored and gitee-org committed Mar 2, 2024
2 parents 20a425e + 0189fa8 commit 64f221f
Show file tree
Hide file tree
Showing 9 changed files with 34 additions and 42 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions kinit-admin/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@ dist-ssr
*-lock.*
pnpm-debug
stats.html
dist-pro
.vscode
3 changes: 0 additions & 3 deletions kinit-admin/.vscode/extensions.json

This file was deleted.

19 changes: 0 additions & 19 deletions kinit-admin/.vscode/settings.json

This file was deleted.

4 changes: 2 additions & 2 deletions kinit-admin/src/components/Footer/src/Footer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ const prefixCls = getPrefixCls('footer')
const appStore = useAppStore()
const title = computed(() => appStore.getTitle)
const footerContent = computed(() => appStore.getFooterContent)
</script>

<template>
<div
: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>
9 changes: 9 additions & 0 deletions kinit-admin/src/views/Login/Login.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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>
Expand Down Expand Up @@ -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>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
>
Expand Down Expand Up @@ -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 {
Expand Down
4 changes: 2 additions & 2 deletions kinit-api/application/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@
"""
系统版本
"""
VERSION = "3.7.0"
VERSION = "3.7.1"

"""安全警告: 不要在生产中打开调试运行!"""
DEBUG = False

"""是否开启演示功能:取消所有POST,DELETE,PUT操作权限"""
DEMO = False
DEMO = True
"""演示功能白名单"""
DEMO_WHITE_LIST_PATH = [
"/auth/login",
Expand Down
22 changes: 12 additions & 10 deletions kinit-api/utils/file/file_manage.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,19 +63,21 @@ async def save_video_local(self, accept: list = None) -> dict:
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
Expand Down

0 comments on commit 64f221f

Please sign in to comment.