'设置banner图'

gst4base
JayChou 3 weeks ago
parent b0d9ffd4e4
commit 20452ecc0f
  1. 4
      jeecgboot-vue3-master/src/api/sys/setting.ts
  2. 42
      jeecgboot-vue3-master/src/views/setPath/index.vue
  3. 51
      jeecgboot-vue3-master/src/views/system/loginmini/MiniLogin.vue

@ -0,0 +1,4 @@
import { defHttp } from '/@/utils/http/axios';
export const getConfig = () => {
return defHttp.post({ url: '/sysconfiguration/sysConfiguration/findconfig' });
};

@ -1,6 +1,13 @@
<template>
<a-form ref="formRef" name="custom-validation" :model="formState" v-bind="layout" @finish="handleFinish"
@validate="handleValidate" @finishFailed="handleFinishFailed">
<a-form
ref="formRef"
name="custom-validation"
:model="formState"
v-bind="layout"
@finish="handleFinish"
@validate="handleValidate"
@finishFailed="handleFinishFailed"
>
<a-form-item label="名称" name="name">
<a-input v-model:value="formState.name" />
</a-form-item>
@ -17,15 +24,16 @@
<a-form-item has-feedback label="LOGO" name="logo">
<j-image-upload v-model:value="formState.logo" />
</a-form-item>
<a-form-item has-feedback label="banner" name="banner">
<j-image-upload v-model:value="formState.banner" />
</a-form-item>
<a-form-item class="h-item" has-feedback label="作品上传路径" name="composition">
<a-input v-model:value="formState.composition" type="text" autocomplete="off" />
<a-button :icon="h(FolderOpenOutlined)"
@click="openModal(true, { path: 'sadsad', target: 'composition' })">浏览</a-button>
<a-button :icon="h(FolderOpenOutlined)" @click="openModal(true, { path: 'sadsad', target: 'composition' })">浏览</a-button>
</a-form-item>
<a-form-item class="h-item" has-feedback label="比赛证书上传路径" name="certificate">
<a-input v-model:value="formState.certificate" type="text" autocomplete="off" />
<a-button :icon="h(FolderOpenOutlined)"
@click="openModal(true, { path: 'sadsad', target: 'certificate' })">浏览</a-button>
<a-button :icon="h(FolderOpenOutlined)" @click="openModal(true, { path: 'sadsad', target: 'certificate' })">浏览</a-button>
</a-form-item>
<a-form-item :wrapper-col="{ span: 14, offset: 4 }">
<a-button type="primary" html-type="submit" @click="submit">保存</a-button>
@ -47,9 +55,9 @@ import { reactive, ref, h } from 'vue';
import type { Rule } from 'ant-design-vue/es/form';
import type { FormInstance } from 'ant-design-vue';
import { getDataListApi, updPathApi } from '/@/api/sys/user';
getDataListApi().then(res => {
getDataListApi().then((res) => {
Object.assign(formState, res.records[0]);
})
});
const fileList = ref<UploadProps['fileList']>([]);
@ -72,7 +80,7 @@ function getBase64(file: File) {
const reader = new FileReader();
reader.readAsDataURL(file);
reader.onload = () => resolve(reader.result);
reader.onerror = error => reject(error);
reader.onerror = (error) => reject(error);
});
}
@ -80,10 +88,6 @@ const previewVisible = ref(false);
const previewImage = ref('');
const previewTitle = ref('');
interface FormState {
name: string;
logo: any;
@ -92,6 +96,7 @@ interface FormState {
copyright: string;
certificate: string;
composition: string;
banner: string;
}
const formRef = ref<FormInstance>();
const formState = reactive<FormState>({
@ -102,6 +107,7 @@ const formState = reactive<FormState>({
copyright: '',
certificate: '',
composition: '',
banner: '',
});
const checkAge = async (_rule: Rule, value: number) => {
if (!value) {
@ -119,9 +125,11 @@ const checkAge = async (_rule: Rule, value: number) => {
};
function submit() {
updPathApi(formState).then(res => {
console.log(formState);
// return
updPathApi(formState).then((res) => {
console.log(res, 'res');
})
});
}
const validatePass = async (_rule: Rule, value: string) => {
if (value === '') {
@ -150,7 +158,7 @@ const layout = {
const handleFinish = (values: FormState) => {
console.log(values, formState);
};
const handleFinishFailed = errors => {
const handleFinishFailed = (errors) => {
console.log(errors);
};
const resetForm = () => {
@ -160,8 +168,6 @@ const handleValidate = (...args) => {
console.log(args);
};
//
const [register, { openModal }] = useModal();
function hanConPat(currentlySelecte, target) {

@ -1,8 +1,5 @@
<template>
<div :class="prefixCls" class="login-background-img">
<AppLocalePicker class="absolute top-4 right-4 enter-x xl:text-gray-600" :showText="false" />
<AppDarkModeToggle class="absolute top-3 right-7 enter-x" />
<div class="aui-logo" v-if="!getIsMobile">
@ -19,7 +16,6 @@
<div class="aui-content">
<div class="aui-container">
<div class="aui-form">
<div class="aui-formBox">
<div class="aui-formWell">
<div class="login-title">{{ t('sys.login.signInFormTitle') }}</div>
@ -28,21 +24,18 @@
<a-form ref="loginRef" :model="formData" v-if="activeIndex === 'accountLogin'" @keyup.enter.native="loginHandleClick">
<div class="aui-account">
<div class="aui-inputClear">
<a-form-item>
<div>账号</div>
<a-input class="fix-auto-fill" :placeholder="t('sys.login.userName')" v-model:value="formData.username" />
</a-form-item>
</div>
<div class="aui-inputClear">
<a-form-item>
<div>密码</div>
<a-input class="fix-auto-fill" type="password" :placeholder="t('sys.login.password')" v-model:value="formData.password" />
</a-form-item>
</div>
<div class="aui-inputClear">
<a-form-item>
<div>验证码</div>
<a-input class="fix-auto-fill" type="text" :placeholder="t('sys.login.inputCode')" v-model:value="formData.inputCode" />
@ -85,7 +78,8 @@
<div class="aui-formButton">
<div class="aui-flex">
<a-button :loading="loginLoading" class="aui-link-login aui-flex-box" type="primary" @click="loginHandleClick">
{{ t('sys.login.loginButton') }}</a-button>
{{ t('sys.login.loginButton') }}</a-button
>
</div>
<!-- <div class="aui-flex">
<a class="aui-linek-code aui-flex-box" @click="codeHandleClick">{{ t('sys.login.qrSignInFormTitle') }}</a>
@ -117,19 +111,19 @@
<a title="钉钉" @click="onThirdLogin('dingtalk')"><DingtalkCircleFilled /></a>
</div>
</div>-->
<div class="aui-flex-box" style="display: flex; align-items: center;justify-content: center;">
<div class="aui-third-login" style="margin: 0;margin-right: 40px;">
<div class="aui-flex-box" style="display: flex; align-items: center; justify-content: center">
<div class="aui-third-login" style="margin: 0; margin-right: 40px">
<!-- <a title="微信" @click="onThirdLogin('wechat_open')"><WechatFilled /></a> -->
<SvgIcon name="phone" :size="28" />
</div>
<div class="aui-third-login" style="margin: 0;margin-left: 40px;">
<div class="aui-third-login" style="margin: 0; margin-left: 40px">
<SvgIcon name="weiChart" :size="28" />
<!-- <a title="微信" @click="onThirdLogin('wechat_open')"><WechatFilled /></a> -->
</div>
</div>
</div>
<div style="display: flex;justify-content: center;margin-top: 20px;">
还没账号?&nbsp;&nbsp;<span style="color: #02DDDD;cursor: pointer;" @click="registerHandleClick">点击注册</span>
<div style="display: flex; justify-content: center; margin-top: 20px">
还没账号?&nbsp;&nbsp;<span style="color: #02dddd; cursor: pointer" @click="registerHandleClick">点击注册</span>
</div>
</a-form>
</div>
@ -164,15 +158,22 @@
import MiniRegister from './MiniRegister.vue';
import MiniCodelogin from './MiniCodelogin.vue';
// import logoImg from '/@/assets/loginmini/icon/jeecg_logo.png';
import logoImg from '/public/resource/img/comp/comp_logo.png';
// import logoImg from '/public/resource/img/comp/comp_logo.png';
import SvgIcon from '/@/components/Icon/src/SvgIcon.vue';
// import adTextImg from '/@/assets/loginmini/icon/jeecg_ad_text.png';
import { AppLocalePicker, AppDarkModeToggle } from '/@/components/Application';
import { useLocaleStore } from '/@/store/modules/locale';
import { useDesign } from "/@/hooks/web/useDesign";
import { useAppInject } from "/@/hooks/web/useAppInject";
import { useDesign } from '/@/hooks/web/useDesign';
import { useAppInject } from '/@/hooks/web/useAppInject';
import { GithubFilled, WechatFilled, DingtalkCircleFilled, createFromIconfontCN } from '@ant-design/icons-vue';
import { getConfig } from '/@/api/sys/setting';
const logoImg = ref('');
const getConfigEvent = async () => {
const res = await getConfig();
console.log(res, 'res');
logoImg.value = `${import.meta.env.VITE_GLOB_DOMAIN_URL}/${res.logo}`;
};
getConfigEvent();
const IconFont = createFromIconfontCN({
scriptUrl: '//at.alicdn.com/t/font_2316098_umqusozousr.js',
});
@ -393,7 +394,7 @@
*/
function handleSuccess(value) {
Object.assign(formData, value);
Object.assign(phoneFormData, { mobile: "", smscode: "" });
Object.assign(phoneFormData, { mobile: '', smscode: '' });
type.value = 'login';
activeIndex.value = 'accountLogin';
handleChangeCheckCode();
@ -437,7 +438,6 @@
right: 0px;
z-index: 9;
.card {
width: 100px;
height: 100px;
@ -463,13 +463,12 @@
font-family: Microsoft YaHei, Microsoft YaHei;
font-weight: 400;
font-size: 13px;
color: #FFFFFF;
color: #ffffff;
line-height: 17px;
text-align: center;
font-style: normal;
text-transform: none;
}
}
.bas {
@ -479,12 +478,11 @@
}
.bot {
background: #A7B2C6;
background: #a7b2c6;
border-bottom-left-radius: 20px;
}
}
:deep(.ant-input:focus) {
box-shadow: none;
}
@ -567,7 +565,9 @@ html[data-theme='dark'] {
.app-iconify {
color: #fff !important;
}
.aui-inputClear input,.aui-input-line input,.aui-choice{
.aui-inputClear input,
.aui-input-line input,
.aui-choice {
color: #c9d1d9 !important;
}
@ -588,7 +588,8 @@ html[data-theme='dark'] {
.aui-code-line {
border-left: none !important;
}
.ant-checkbox-inner,.aui-success h3{
.ant-checkbox-inner,
.aui-success h3 {
border-color: #c9d1d9;
}
}

Loading…
Cancel
Save