chore: 修复一些小问题

pull/373/head
xiaojunnuo 2025-04-13 00:45:01 +08:00
parent a5af3ba0cb
commit 18a32ffb0b
14 changed files with 62 additions and 48 deletions

View File

@ -9,7 +9,7 @@
"debug": "vite --mode debug --open",
"debug:pm": "vite --mode debugpm",
"debug:force": "vite --force --mode debug",
"build": "vite build ",
"build": "cross-env NODE_OPTIONS=--max-old-space-size=32768 vite build ",
"dev-build": "echo 1",
"test:unit": "vitest",
"serve": "vite preview",
@ -57,6 +57,7 @@
"cos-js-sdk-v5": "^1.7.0",
"cron-parser": "^4.9.0",
"cropperjs": "^1.6.1",
"cross-env": "^7.0.3",
"cssnano": "^7.0.6",
"dayjs": "^1.11.7",
"defu": "^6.1.4",

View File

@ -41,7 +41,7 @@
import { env } from "/@/utils/util.env";
import { computed, ref, Ref } from "vue";
import { useSettingStore } from "/@/store/settings";
import { SiteInfo, SysPublicSetting } from "/@/api/modules/api.basic";
import { SiteInfo, SysPublicSetting } from "/@/store/settings/api.basic";
const envRef = ref(env);
const settingStore = useSettingStore();

View File

@ -6,7 +6,7 @@ import { LocalStorage } from "/src/utils/util.storage";
import * as UserApi from "./api.user";
import { RegisterReq, SmsLoginReq } from "./api.user";
// @ts-ignore
import { LoginReq, UserInfoRes } from "/@/api/modules/api.user";
import { LoginReq, UserInfoRes } from "/@/store/user/api.user";
import { message, Modal, notification } from "ant-design-vue";
import { useI18n } from "vue-i18n";

View File

@ -164,7 +164,19 @@ export default function ({ crudExpose, context: { certdFormRef, groupDictRef, se
order: 2,
text: "商用证书托管",
type: "primary",
title: "手动上传自有证书,执行自动部署(证书有更新时,都需要手动上传一次)",
tooltip: {
slots: {
title() {
return (
<ul>
<li></li>
<li></li>
<li></li>
</ul>
);
},
},
},
icon: "ion:cloud-upload-outline",
click() {
openUploadCreateDialog();

View File

@ -1,6 +1,5 @@
// @ts-ignore
import { request } from "/@/api/service";
import { SysPrivateSetting, SysPublicSetting } from "/@/api/modules/api.basic";
const apiPrefix = "/user/settings";
export type UserSettings = {
defaultNotification?: number;
@ -10,7 +9,7 @@ export type UserSettings = {
export async function UserSettingsGet() {
const res = await request({
url: apiPrefix + "/getDefault",
method: "post"
method: "post",
});
if (!res) {
return {};
@ -22,6 +21,6 @@ export async function UserSettingsSave(setting: any) {
return await request({
url: apiPrefix + "/saveDefault",
method: "post",
data: setting
data: setting,
});
}

View File

@ -30,7 +30,7 @@
<script lang="ts" setup>
import { computed, ref, Ref } from "vue";
import { useSettingStore } from "/@/store/settings";
import { SiteInfo } from "/@/api/modules/api.basic";
import { SiteInfo } from "/@/store/settings/api.basic";
const version = ref(import.meta.env.VITE_APP_VERSION);
const settingStore = useSettingStore();

View File

@ -14,9 +14,8 @@
</template>
<script setup lang="ts">
import { computed, ref, useAttrs } from "vue";
import { nanoid } from "nanoid";
import { notification } from "ant-design-vue";
import * as api from "/@/api/modules/api.basic";
import * as api from "/@/store/settings/api.basic";
const props = defineProps<{
value?: string;
@ -58,7 +57,7 @@ async function sendSmsCode() {
phoneCode: props.phoneCode,
mobile: props.mobile,
imgCode: props.imgCode,
randomStr: props.randomStr
randomStr: props.randomStr,
});
} finally {
loading.value = false;

View File

@ -14,9 +14,8 @@
</template>
<script setup lang="ts">
import { computed, ref, useAttrs } from "vue";
import { nanoid } from "nanoid";
import { notification } from "ant-design-vue";
import * as api from "/@/api/modules/api.basic";
import * as api from "/@/store/settings/api.basic";
const props = defineProps<{
value?: string;
@ -53,7 +52,7 @@ async function sendSmsCode() {
await api.sendEmailCode({
email: props.email,
imgCode: props.imgCode,
randomStr: props.randomStr
randomStr: props.randomStr,
});
} finally {
loading.value = false;

View File

@ -267,22 +267,22 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
align: "center",
},
},
"extra.dependLibs": {
title: "第三方依赖",
type: "text",
form: {
helper: "依赖的第三方库,package.dependencies的格式name[:^version]",
component: {
name: "a-select",
mode: "tags",
allowClear: true,
open: false,
},
},
column: {
show: false,
},
},
// "extra.dependLibs": {
// title: "第三方依赖",
// type: "text",
// form: {
// helper: "依赖的第三方库,package.dependencies的格式name[:^version]",
// component: {
// name: "a-select",
// mode: "tags",
// allowClear: true,
// open: false,
// },
// },
// column: {
// show: false,
// },
// },
"extra.dependPlugins": {
title: "插件依赖",
type: "text",

View File

@ -46,6 +46,7 @@ import * as api from "./api";
import { notification } from "ant-design-vue";
import createCrudOptions from "./crud";
import { useColumns } from "@fast-crud/fast-crud";
import { usePluginStore } from "/@/store/plugin";
//@ts-ignore
import yaml from "js-yaml";

View File

@ -1,21 +1,21 @@
// @ts-ignore
import { request } from "/@/api/service";
import { SysPrivateSetting, SysPublicSetting } from "/@/api/modules/api.basic";
import { SysPrivateSetting, SysPublicSetting } from "/@/store/settings/api.basic";
const apiPrefix = "/sys/settings";
export type SysSettings = { public: SysPublicSetting; private: SysPrivateSetting };
export const SettingKeys = {
SysPublic: "sys.public",
SysPrivate: "sys.private",
SysEmail: "sys.email"
SysEmail: "sys.email",
};
export async function SettingsGet(key: string) {
const res = await request({
url: apiPrefix + "/get",
method: "post",
params: {
key
}
key,
},
});
if (!res) {
return {};
@ -29,8 +29,8 @@ export async function SettingsSave(key: string, setting: any) {
method: "post",
data: {
key,
setting: JSON.stringify(setting)
}
setting: JSON.stringify(setting),
},
});
}
@ -38,14 +38,14 @@ export async function HeaderMenusSettingsSave(setting: any) {
return await request({
url: apiPrefix + "/headerMenus/save",
method: "post",
data: setting
data: setting,
});
}
export async function EmailSettingsGet() {
return await request({
url: apiPrefix + "/getEmailSettings",
method: "post"
method: "post",
});
}
@ -53,21 +53,21 @@ export async function EmailSettingsSave(setting: any) {
return await request({
url: apiPrefix + "/saveEmailSettings",
method: "post",
data: setting
data: setting,
});
}
export async function stopOtherUserTimer() {
return await request({
url: apiPrefix + "/stopOtherUserTimer",
method: "post"
method: "post",
});
}
export async function SysSettingsGet(): Promise<SysSettings> {
return await request({
url: apiPrefix + "/getSysSettings",
method: "post"
method: "post",
});
}
@ -75,14 +75,14 @@ export async function SysSettingsSave(data: SysSettings) {
return await request({
url: apiPrefix + "/saveSysSettings",
method: "post",
data: data
data: data,
});
}
export async function TestProxy() {
return await request({
url: apiPrefix + "/testProxy",
method: "post"
method: "post",
});
}
@ -90,7 +90,7 @@ export async function TestSms(data: any) {
return await request({
url: apiPrefix + "/testSms",
method: "post",
data
data,
});
}
@ -99,7 +99,7 @@ export async function GetSmsTypeDefine(type: string) {
url: apiPrefix + "/getSmsTypeDefine",
method: "post",
data: {
type
}
type,
},
});
}

View File

@ -9,6 +9,6 @@ typeorm:
port: 3309
username: root
password: root
database: certd
database: certd2

View File

@ -1,4 +1,4 @@
ALTER TABLE `certd`.`pi_plugin`
ALTER TABLE pi_plugin
MODIFY COLUMN `setting` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL AFTER `author`,
MODIFY COLUMN `sys_setting` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL AFTER `setting`,
MODIFY COLUMN `metadata` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL AFTER `sys_setting`,

View File

@ -1142,6 +1142,9 @@ importers:
cropperjs:
specifier: ^1.6.1
version: 1.6.2
cross-env:
specifier: ^7.0.3
version: 7.0.3
cssnano:
specifier: ^7.0.6
version: 7.0.6(postcss@8.5.3)