fix:更新设置渐变色
All checks were successful
Build and Push Docker Image / build (push) Successful in 3m40s

This commit is contained in:
Your Name 2026-01-22 17:35:12 +08:00
parent 7d2dc1ea90
commit 8dacc2b6e7

View File

@ -28,7 +28,8 @@ export default function Index({ title = '小程序页面配置' }) {
logo: [],
admin_logo: [],
color: '#1890ff',
pageColor: `linear-gradient(180deg,rgba(255, 255, 255, 0.44) 0%,rgba(255, 255, 255, 0) 100%),linear-gradient(146deg,#d3d7ff 0%,rgba(255, 255, 255, 0) 37%),linear-gradient(194deg,#dffff3 0%,#f8f8f8 30%)`,
// pageColor: `linear-gradient(180deg,rgba(255, 255, 255, 0.44) 0%,rgba(255, 255, 255, 0) 100%),linear-gradient(146deg,#d3d7ff 0%,rgba(255, 255, 255, 0) 37%),linear-gradient(194deg,#dffff3 0%,#f8f8f8 30%)`,
pageColor: `linear-gradient(180deg, rgba(208, 229, 255, 0.44) 0%, #f7f7f7 100%, rgba(255, 255, 255, 0) 100%), linear-gradient(145deg, #D3D7FF 3%, rgba(255, 255, 255, 0) 49%), linear-gradient(222deg, #84FFD8 0%, #F7F7F7 67%)`,
});
const GET_DEFAULT_COLOR = [
{
@ -82,7 +83,11 @@ export default function Index({ title = '小程序页面配置' }) {
let cssEndColor =
res?.data?.config_value?.pageColorValue?.[1] || '#dffff3';
setShowData(res?.data);
let newCss = `linear-gradient(180deg,rgba(255, 255, 255, 0.44) 0%,rgba(255, 255, 255, 0) 100%),linear-gradient(146deg, ${cssStrColor} 0%, rgba(255, 255, 255, 0) 37%),linear-gradient(194deg, ${cssEndColor} 0%, #f8f8f8 30%)`;
// let newCss = `linear-gradient(180deg,rgba(255, 255, 255, 0.44) 0%,rgba(255, 255, 255, 0) 100%),linear-gradient(146deg, ${cssStrColor} 0%, rgba(255, 255, 255, 0) 37%),linear-gradient(194deg, ${cssEndColor} 0%, #f8f8f8 30%)`;
let newCss = `linear-gradient(180deg,rgba(208, 229, 255, 0.44) 0%,#f7f7f7 100%,rgba(255, 255, 255, 0) 100%),linear-gradient(145deg, ${cssStrColor} 3%,rgba(255, 255, 255, 0) 49%),linear-gradient(222deg, ${cssEndColor} 0%,#F7F7F7 67%)`;
// let newCss =
// 'linear-gradient(180deg, rgba(208, 229, 255, 0.44) 0%, #FFFFFF 100%, rgba(255, 255, 255, 0) 100%), linear-gradient(145deg, #D3D7FF 3%, rgba(255, 255, 255, 0) 49%), linear-gradient(222deg, #84FFD8 0%, #F7F7F7 67%);';
setFormValues({
...res?.data?.config_value,
pageColor: newCss,
@ -235,7 +240,8 @@ export default function Index({ title = '小程序页面配置' }) {
let cssEndColor = value?.colors
? value?.colors?.[1]?.color?.metaColor
: value;
let newCss = `linear-gradient(180deg,rgba(255, 255, 255, 0.44) 0%,rgba(255, 255, 255, 0) 100%),linear-gradient(146deg, rgba(${cssStrColor?.r}, ${cssStrColor?.g}, ${cssStrColor?.b},${cssStrColor?.a}) 0%, rgba(255, 255, 255, 0) 37%),linear-gradient(194deg, rgba(${cssEndColor?.r}, ${cssEndColor?.g}, ${cssEndColor?.b},${cssEndColor?.a}) 0%, #f8f8f8 30%)`;
// let newCss = `linear-gradient(180deg,rgba(255, 255, 255, 0.44) 0%,rgba(255, 255, 255, 0) 100%),linear-gradient(146deg, rgba(${cssStrColor?.r}, ${cssStrColor?.g}, ${cssStrColor?.b},${cssStrColor?.a}) 0%, rgba(255, 255, 255, 0) 37%),linear-gradient(194deg, rgba(${cssEndColor?.r}, ${cssEndColor?.g}, ${cssEndColor?.b},${cssEndColor?.a}) 0%, #f8f8f8 30%)`;
let newCss = `linear-gradient(180deg, rgba(208, 229, 255, 0.44) 50%, #f7f7f7 100%, rgba(255, 255, 255, 0) 100%), linear-gradient(145deg, rgba(${cssStrColor?.r}, ${cssStrColor?.g}, ${cssStrColor?.b},${cssStrColor?.a}) 3%, rgba(255, 255, 255, 0) 49%), linear-gradient(222deg, rgba(${cssEndColor?.r}, ${cssEndColor?.g}, ${cssEndColor?.b},${cssEndColor?.a}) 0%, #F7F7F7 67%)`;
setFormValues({
...formValues,
pageColor: newCss,
@ -264,7 +270,10 @@ export default function Index({ title = '小程序页面配置' }) {
{/* 页面内容 */}
<div
className="phone-content"
style={{ background: formValues?.pageColor }}
style={{
background: formValues?.pageColor,
backgroundRepeat: 'no-repeat',
}}
>
<div className="page-title">
{formValues?.logo?.[0] && (