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

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

Loading…
Cancel
Save