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": "vite --mode debug --open",
"debug:pm": "vite --mode debugpm", "debug:pm": "vite --mode debugpm",
"debug:force": "vite --force --mode debug", "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", "dev-build": "echo 1",
"test:unit": "vitest", "test:unit": "vitest",
"serve": "vite preview", "serve": "vite preview",
@ -57,6 +57,7 @@
"cos-js-sdk-v5": "^1.7.0", "cos-js-sdk-v5": "^1.7.0",
"cron-parser": "^4.9.0", "cron-parser": "^4.9.0",
"cropperjs": "^1.6.1", "cropperjs": "^1.6.1",
"cross-env": "^7.0.3",
"cssnano": "^7.0.6", "cssnano": "^7.0.6",
"dayjs": "^1.11.7", "dayjs": "^1.11.7",
"defu": "^6.1.4", "defu": "^6.1.4",

View File

@ -41,7 +41,7 @@
import { env } from "/@/utils/util.env"; import { env } from "/@/utils/util.env";
import { computed, ref, Ref } from "vue"; import { computed, ref, Ref } from "vue";
import { useSettingStore } from "/@/store/settings"; 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 envRef = ref(env);
const settingStore = useSettingStore(); const settingStore = useSettingStore();

View File

@ -6,7 +6,7 @@ import { LocalStorage } from "/src/utils/util.storage";
import * as UserApi from "./api.user"; import * as UserApi from "./api.user";
import { RegisterReq, SmsLoginReq } from "./api.user"; import { RegisterReq, SmsLoginReq } from "./api.user";
// @ts-ignore // @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 { message, Modal, notification } from "ant-design-vue";
import { useI18n } from "vue-i18n"; import { useI18n } from "vue-i18n";

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -9,6 +9,6 @@ typeorm:
port: 3309 port: 3309
username: root username: root
password: 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 `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 `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`, MODIFY COLUMN `metadata` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL AFTER `sys_setting`,

View File

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