😎1、优化验证码显示 2、修复富文本框上传图片 3、升级依赖
This commit is contained in:
parent
30c43a660c
commit
887cc04ad6
@ -46,7 +46,7 @@
|
||||
<PackageReference Include="SSH.NET" Version="2024.2.0" />
|
||||
<PackageReference Include="System.Linq.Dynamic.Core" Version="1.5.0" />
|
||||
<PackageReference Include="System.Net.Http" Version="4.3.4" />
|
||||
<PackageReference Include="TencentCloudSDK.Sms" Version="3.0.1137" />
|
||||
<PackageReference Include="TencentCloudSDK.Sms" Version="3.0.1138" />
|
||||
<PackageReference Include="UAParser" Version="3.1.47" />
|
||||
<PackageReference Include="Yitter.IdGenerator" Version="1.0.14" />
|
||||
</ItemGroup>
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
"name": "admin.net.pro",
|
||||
"type": "module",
|
||||
"version": "2.4.33",
|
||||
"lastBuildTime": "2024.12.08",
|
||||
"lastBuildTime": "2024.12.10",
|
||||
"description": "Admin.NET 站在巨人肩膀上的 .NET 通用权限开发框架",
|
||||
"author": "zuohuaijun",
|
||||
"license": "MIT",
|
||||
@ -47,7 +47,7 @@
|
||||
"lodash-es": "^4.17.21",
|
||||
"md-editor-v3": "^5.0.2",
|
||||
"mitt": "^3.0.1",
|
||||
"monaco-editor": "^0.52.0",
|
||||
"monaco-editor": "^0.52.2",
|
||||
"mqtt": "^5.10.3",
|
||||
"nprogress": "^0.2.0",
|
||||
"ol": "^10.3.1",
|
||||
@ -74,7 +74,7 @@
|
||||
"vue-router": "^4.5.0",
|
||||
"vue-signature-pad": "^3.0.2",
|
||||
"vue3-tree-org": "^4.2.2",
|
||||
"vxe-pc-ui": "^4.3.21",
|
||||
"vxe-pc-ui": "^4.3.23",
|
||||
"vxe-table": "^4.8.10",
|
||||
"vxe-table-plugin-element": "^4.0.4",
|
||||
"vxe-table-plugin-export-xlsx": "^4.0.7",
|
||||
@ -88,8 +88,8 @@
|
||||
"@types/node": "^20.17.9",
|
||||
"@types/nprogress": "^0.2.3",
|
||||
"@types/sortablejs": "^1.15.8",
|
||||
"@typescript-eslint/eslint-plugin": "^8.17.0",
|
||||
"@typescript-eslint/parser": "^8.17.0",
|
||||
"@typescript-eslint/eslint-plugin": "^8.18.0",
|
||||
"@typescript-eslint/parser": "^8.18.0",
|
||||
"@vitejs/plugin-vue": "^5.2.1",
|
||||
"@vitejs/plugin-vue-jsx": "^4.1.1",
|
||||
"@vue/compiler-sfc": "^3.5.13",
|
||||
|
||||
@ -46,6 +46,8 @@ const props = defineProps({
|
||||
|
||||
// 定义子组件向父组件传值/事件
|
||||
const emit = defineEmits(['update:getHtml', 'update:getText']);
|
||||
// 接口服务地址
|
||||
const baseUrl = reactive(window.__env__.VITE_API_URL) + '/';
|
||||
|
||||
// 定义变量内容
|
||||
const editorRef = shallowRef();
|
||||
@ -60,7 +62,7 @@ const state = reactive({
|
||||
const uploadFun = async () => {
|
||||
const rps = await getAPI(SysFileApi).apiSysFileUploadFilesPostForm([file]);
|
||||
if (rps.data.type == 'success' && rps.data.result != null) {
|
||||
insertFn(rps.data.result[0].url, rps.data.result[0].fileName, rps.data.result[0].url);
|
||||
insertFn(baseUrl + rps.data.result[0].url, rps.data.result[0].fileName, baseUrl + rps.data.result[0].url);
|
||||
} else {
|
||||
ElMessage.error('上传失败!');
|
||||
}
|
||||
|
||||
@ -45,7 +45,12 @@
|
||||
<el-col :span="1"></el-col>
|
||||
<el-col :span="8">
|
||||
<div :class="[state.expirySeconds > 0 ? 'login-content-code' : 'login-content-code-expired']" @click="getCaptcha">
|
||||
<img class="login-content-code-img" width="130px" height="38px" :src="state.captchaImage" style="cursor: pointer" />
|
||||
<div style="width: 130px; height: 38px; text-align: center; cursor: pointer" v-if="state.captchaImage == ''">
|
||||
<el-icon class="is-loading">
|
||||
<ele-Loading />
|
||||
</el-icon>
|
||||
</div>
|
||||
<img class="login-content-code-img" width="130px" height="38px" :src="state.captchaImage" style="cursor: pointer" v-else />
|
||||
</div>
|
||||
</el-col>
|
||||
</el-form-item>
|
||||
@ -114,7 +119,7 @@ const state = reactive({
|
||||
account: window.__env__.VITE_DEFAULT_USER,
|
||||
password: window.__env__.VITE_DEFAULT_USER_PASSWORD,
|
||||
code: '',
|
||||
codeId: 0,
|
||||
codeId: 0 as any,
|
||||
},
|
||||
rules: {
|
||||
account: [{ required: true, message: '请输入用户名', trigger: 'blur' }],
|
||||
@ -132,7 +137,7 @@ const state = reactive({
|
||||
captchaEnabled: false,
|
||||
isPassRotate: false,
|
||||
capsLockVisible: false,
|
||||
expirySeconds: 60, // 验证码过期时间
|
||||
expirySeconds: 60 as any, // 验证码过期时间
|
||||
});
|
||||
|
||||
// 验证码过期计时器
|
||||
@ -187,6 +192,9 @@ const getCaptcha = async () => {
|
||||
state.captchaImage = 'data:text/html;base64,' + res?.img;
|
||||
state.expirySeconds = res?.expirySeconds;
|
||||
state.ruleForm.codeId = res?.id;
|
||||
if (state.captchaImage != '' && window.__env__.VITE_SM_PUBLIC_KEY == '') {
|
||||
window.location.reload();
|
||||
}
|
||||
};
|
||||
|
||||
// 获取时间
|
||||
@ -208,7 +216,7 @@ const onSignIn = async () => {
|
||||
const password = sm2.doEncrypt(state.ruleForm.password, publicKey, 1);
|
||||
|
||||
const host = route.query.host ?? location.host;
|
||||
const [err, res] = await feature(getAPI(SysAuthApi).apiSysAuthLoginPost({ ...state.ruleForm, password: password, host: host }));
|
||||
const [err, res] = await feature(getAPI(SysAuthApi).apiSysAuthLoginPost({ ...state.ruleForm, password: password, host: host.toString() }));
|
||||
if (err) {
|
||||
getCaptcha(); // 重新获取验证码
|
||||
return;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user