mirror of
https://github.com/yangjian102621/geekai.git
synced 2025-09-17 16:56:38 +08:00
enable set custom index background image
This commit is contained in:
parent
88e510d07a
commit
3fdcc895ed
@ -3,6 +3,11 @@
|
|||||||
* bug修复:修复移动端修改聊天标题不生效的问题
|
* bug修复:修复移动端修改聊天标题不生效的问题
|
||||||
* Bug修复:修复用户注册不显示用户名的问题
|
* Bug修复:修复用户注册不显示用户名的问题
|
||||||
* Bug修复:修复管理后台拖动排序不生效的问题
|
* Bug修复:修复管理后台拖动排序不生效的问题
|
||||||
|
* 功能优化:允许用户设置自定义首页背景图片
|
||||||
|
* 功能新增:**支持AI解读 PDF, Word, Excel等文件**
|
||||||
|
* 功能优化:优化聊天界面的用户上传文件的列表样式
|
||||||
|
* 功能新增:支持微信等社交媒体登录
|
||||||
|
|
||||||
|
|
||||||
## v4.0.9
|
## v4.0.9
|
||||||
* 环境升级:升级 Golang 到 go1.22.4
|
* 环境升级:升级 Golang 到 go1.22.4
|
||||||
|
@ -226,5 +226,5 @@ type SystemConfig struct {
|
|||||||
|
|
||||||
SdNegPrompt string `json:"sd_neg_prompt"` // SD 默认反向提示词
|
SdNegPrompt string `json:"sd_neg_prompt"` // SD 默认反向提示词
|
||||||
|
|
||||||
RandBg bool `json:"rand_bg"` // 前端首页是否启用随机背景
|
IndexBgURL string `json:"index_bg_url"` // 前端首页背景图片
|
||||||
}
|
}
|
||||||
|
Before Width: | Height: | Size: 388 KiB After Width: | Height: | Size: 388 KiB |
@ -3,14 +3,12 @@
|
|||||||
display flex
|
display flex
|
||||||
width 100%
|
width 100%
|
||||||
|
|
||||||
.el-input {
|
.el-input,.el-select,.el-switch {
|
||||||
width 50%
|
margin-right 10px
|
||||||
}
|
}
|
||||||
|
|
||||||
.info {
|
.info {
|
||||||
margin-left 6px
|
|
||||||
margin-top 2px
|
margin-top 2px
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
Binary file not shown.
Before Width: | Height: | Size: 4.1 MiB |
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="index-page" :style="{height: winHeight+'px'}">
|
<div class="index-page" :style="{height: winHeight+'px'}">
|
||||||
<div :class="bgClass"></div>
|
<div class="index-bg" :style="{backgroundImage: 'url('+bgImgUrl+')'}"></div>
|
||||||
<div class="menu-box">
|
<div class="menu-box">
|
||||||
<el-menu
|
<el-menu
|
||||||
mode="horizontal"
|
mode="horizontal"
|
||||||
@ -65,7 +65,6 @@
|
|||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
|
|
||||||
// import * as THREE from 'three';
|
|
||||||
import {onMounted, ref} from "vue";
|
import {onMounted, ref} from "vue";
|
||||||
import {useRouter} from "vue-router";
|
import {useRouter} from "vue-router";
|
||||||
import FooterBar from "@/components/FooterBar.vue";
|
import FooterBar from "@/components/FooterBar.vue";
|
||||||
@ -84,17 +83,18 @@ const title = ref("Geek-AI 创作系统")
|
|||||||
const logo = ref("/images/logo.png")
|
const logo = ref("/images/logo.png")
|
||||||
const slogan = ref("我辈之人,先干为敬,陪您先把 AI 用起来")
|
const slogan = ref("我辈之人,先干为敬,陪您先把 AI 用起来")
|
||||||
const licenseConfig = ref({})
|
const licenseConfig = ref({})
|
||||||
// const size = Math.max(window.innerWidth * 0.5, window.innerHeight * 0.8)
|
|
||||||
const winHeight = window.innerHeight - 150
|
const winHeight = window.innerHeight - 150
|
||||||
const bgClass = ref('fixed-bg')
|
const bgImgUrl = ref('')
|
||||||
const isLogin = ref(false)
|
const isLogin = ref(false)
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
httpGet("/api/config/get?key=system").then(res => {
|
httpGet("/api/config/get?key=system").then(res => {
|
||||||
title.value = res.data.title
|
title.value = res.data.title
|
||||||
logo.value = res.data.logo
|
logo.value = res.data.logo
|
||||||
if (res.data.rand_bg) {
|
if (res.data.index_bg_url) {
|
||||||
bgClass.value = "rand-bg"
|
bgImgUrl.value = res.data.index_bg_url
|
||||||
|
} else {
|
||||||
|
bgImgUrl.value = "/images/index-bg.jpg"
|
||||||
}
|
}
|
||||||
if (res.data.slogan) {
|
if (res.data.slogan) {
|
||||||
slogan.value = res.data.slogan
|
slogan.value = res.data.slogan
|
||||||
@ -126,24 +126,12 @@ onMounted(() => {
|
|||||||
align-items baseline
|
align-items baseline
|
||||||
padding-top 150px
|
padding-top 150px
|
||||||
|
|
||||||
.fixed-bg {
|
.index-bg {
|
||||||
position absolute
|
position absolute
|
||||||
top 0
|
top 0
|
||||||
left 0
|
left 0
|
||||||
width 100vw
|
width 100vw
|
||||||
height 100vh
|
height 100vh
|
||||||
background-image url("~@/assets/img/ai-bg.jpg")
|
|
||||||
background-size: cover;
|
|
||||||
background-position: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.rand-bg {
|
|
||||||
position absolute
|
|
||||||
top 0
|
|
||||||
left 0
|
|
||||||
width 100vw
|
|
||||||
height 100vh
|
|
||||||
background-image url("https://api.dujin.org/bing/1920.php")
|
|
||||||
filter: blur(8px);
|
filter: blur(8px);
|
||||||
background-size: cover;
|
background-size: cover;
|
||||||
background-position: center;
|
background-position: center;
|
||||||
|
@ -33,32 +33,42 @@
|
|||||||
</el-input>
|
</el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="开放注册" prop="enabled_register">
|
<el-form-item label="首页背景图" prop="logo">
|
||||||
<el-switch v-model="system['enabled_register']"/>
|
<div class="tip-input">
|
||||||
<el-tooltip
|
<el-input v-model="system['index_bg_url']" placeholder="网站首页背景图片">
|
||||||
effect="dark"
|
<template #append>
|
||||||
content="关闭注册之后只能通过管理后台添加用户"
|
<el-upload
|
||||||
raw-content
|
:auto-upload="true"
|
||||||
placement="right"
|
:show-file-list="false"
|
||||||
>
|
@click="beforeUpload('index_bg_url')"
|
||||||
<el-icon>
|
:http-request="uploadImg"
|
||||||
<InfoFilled/>
|
>
|
||||||
</el-icon>
|
<el-icon class="uploader-icon">
|
||||||
</el-tooltip>
|
<UploadFilled/>
|
||||||
|
</el-icon>
|
||||||
|
</el-upload>
|
||||||
|
</template>
|
||||||
|
</el-input>
|
||||||
|
<el-button type="primary" @click="system.index_bg_url = 'https://api.dujin.org/bing/1920.php'">使用动态背景</el-button>
|
||||||
|
</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="动态背景">
|
<el-form-item label="开放注册" prop="enabled_register">
|
||||||
<el-switch v-model="system['rand_bg']"/>
|
<div class="tip-input">
|
||||||
<el-tooltip
|
<el-switch v-model="system['enabled_register']"/>
|
||||||
effect="dark"
|
<div class="info">
|
||||||
content="打开之后前端首页将使用随机壁纸作为背景图"
|
<el-tooltip
|
||||||
raw-content
|
effect="dark"
|
||||||
placement="right"
|
content="关闭注册之后只能通过管理后台添加用户"
|
||||||
>
|
raw-content
|
||||||
<el-icon>
|
placement="right"
|
||||||
<InfoFilled/>
|
>
|
||||||
</el-icon>
|
<el-icon>
|
||||||
</el-tooltip>
|
<InfoFilled/>
|
||||||
|
</el-icon>
|
||||||
|
</el-tooltip>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="注册方式" prop="register_ways">
|
<el-form-item label="注册方式" prop="register_ways">
|
||||||
@ -211,17 +221,21 @@
|
|||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label="众筹支付">
|
<el-tab-pane label="众筹支付">
|
||||||
<el-form-item label="启用众筹功能" prop="enabled_reward">
|
<el-form-item label="启用众筹功能" prop="enabled_reward">
|
||||||
<el-switch v-model="system['enabled_reward']"/>
|
<div class="tip-input">
|
||||||
<el-tooltip
|
<el-switch v-model="system['enabled_reward']"/>
|
||||||
effect="dark"
|
<div class="info">
|
||||||
content="如果关闭次功能将不在用户菜单显示众筹二维码"
|
<el-tooltip
|
||||||
raw-content
|
effect="dark"
|
||||||
placement="right"
|
content="如果关闭次功能将不在用户菜单显示众筹二维码"
|
||||||
>
|
raw-content
|
||||||
<el-icon>
|
placement="right"
|
||||||
<InfoFilled/>
|
>
|
||||||
</el-icon>
|
<el-icon>
|
||||||
</el-tooltip>
|
<InfoFilled/>
|
||||||
|
</el-icon>
|
||||||
|
</el-tooltip>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<div v-if="system['enabled_reward']">
|
<div v-if="system['enabled_reward']">
|
||||||
@ -534,7 +548,6 @@ const onUploadImg = (files, callback) => {
|
|||||||
|
|
||||||
.el-icon {
|
.el-icon {
|
||||||
font-size 16px
|
font-size 16px
|
||||||
margin-left 10px
|
|
||||||
cursor pointer
|
cursor pointer
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user