FEAT => 本次更新项目为:
This commit is contained in:
2
Cunkebao/dist/.vite/manifest.json
vendored
2
Cunkebao/dist/.vite/manifest.json
vendored
@@ -32,7 +32,7 @@
|
||||
"name": "vendor"
|
||||
},
|
||||
"index.html": {
|
||||
"file": "assets/index-D1UOlQE0.js",
|
||||
"file": "assets/index-CeSKt0aC.js",
|
||||
"name": "index",
|
||||
"src": "index.html",
|
||||
"isEntry": true,
|
||||
|
||||
2
Cunkebao/dist/index.html
vendored
2
Cunkebao/dist/index.html
vendored
@@ -11,7 +11,7 @@
|
||||
</style>
|
||||
<!-- 引入 uni-app web-view SDK(必须) -->
|
||||
<script type="text/javascript" src="./websdk.js"></script>
|
||||
<script type="module" crossorigin src="/assets/index-D1UOlQE0.js"></script>
|
||||
<script type="module" crossorigin src="/assets/index-CeSKt0aC.js"></script>
|
||||
<link rel="modulepreload" crossorigin href="/assets/vendor-2vc8h_ct.js">
|
||||
<link rel="modulepreload" crossorigin href="/assets/ui-DE3rfvO3.js">
|
||||
<link rel="modulepreload" crossorigin href="/assets/utils-BEiZ4iZ8.js">
|
||||
|
||||
@@ -127,7 +127,7 @@ export default function NewPlan() {
|
||||
};
|
||||
|
||||
// 处理保存
|
||||
const handleSave = async () => {
|
||||
const handleSave2 = async () => {
|
||||
if (isEdit && planId) {
|
||||
// 编辑:拼接后端需要的完整参数
|
||||
const editData = {
|
||||
@@ -144,7 +144,7 @@ export default function NewPlan() {
|
||||
}
|
||||
};
|
||||
// 处理保存
|
||||
const handleSave2 = async () => {
|
||||
const handleSave = async () => {
|
||||
try {
|
||||
if (isEdit && planId) {
|
||||
// 编辑:拼接后端需要的完整参数
|
||||
|
||||
@@ -24,7 +24,7 @@ interface Material {
|
||||
id: string;
|
||||
name: string;
|
||||
type: string;
|
||||
preview: string;
|
||||
url: string;
|
||||
}
|
||||
|
||||
const generatePosterMaterials = (): Material[] => {
|
||||
@@ -32,7 +32,7 @@ const generatePosterMaterials = (): Material[] => {
|
||||
id: template.id,
|
||||
name: template.name,
|
||||
type: "poster",
|
||||
preview: template.preview,
|
||||
url: template.url,
|
||||
}));
|
||||
};
|
||||
|
||||
@@ -46,7 +46,7 @@ const BasicSettings: React.FC<BasicSettingsProps> = ({
|
||||
const [isPreviewOpen, setIsPreviewOpen] = useState(false);
|
||||
const [materials] = useState<Material[]>(generatePosterMaterials());
|
||||
const [selectedMaterials, setSelectedMaterials] = useState<Material[]>(
|
||||
formData.materials?.length > 0 ? formData.materials : [],
|
||||
formData.posters?.length > 0 ? formData.posters : [],
|
||||
);
|
||||
|
||||
// 自定义标签相关状态
|
||||
@@ -141,7 +141,7 @@ const BasicSettings: React.FC<BasicSettingsProps> = ({
|
||||
// 如果选中则取消选中
|
||||
if (selectedMaterials.some(m => m.id === id)) {
|
||||
setSelectedMaterials([]);
|
||||
onChange({ ...formData, materials: [] });
|
||||
onChange({ ...formData, posters: [] });
|
||||
}
|
||||
};
|
||||
|
||||
@@ -150,10 +150,10 @@ const BasicSettings: React.FC<BasicSettingsProps> = ({
|
||||
const isSelected = selectedMaterials.some(m => m.id === material.id);
|
||||
if (isSelected) {
|
||||
setSelectedMaterials([]);
|
||||
onChange({ ...formData, materials: [] });
|
||||
onChange({ ...formData, posters: [] });
|
||||
} else {
|
||||
setSelectedMaterials([material]);
|
||||
onChange({ ...formData, materials: [material] });
|
||||
onChange({ ...formData, posters: [material] });
|
||||
}
|
||||
};
|
||||
|
||||
@@ -314,7 +314,7 @@ const BasicSettings: React.FC<BasicSettingsProps> = ({
|
||||
className={styles["basic-material-preview"]}
|
||||
onClick={e => {
|
||||
e.stopPropagation();
|
||||
handlePreviewImage(material.preview);
|
||||
handlePreviewImage(material.url);
|
||||
}}
|
||||
>
|
||||
<EyeOutlined
|
||||
@@ -350,7 +350,7 @@ const BasicSettings: React.FC<BasicSettingsProps> = ({
|
||||
</Button>
|
||||
)}
|
||||
<img
|
||||
src={material.preview}
|
||||
src={material.url}
|
||||
alt={material.name}
|
||||
className={styles["basic-material-img"]}
|
||||
/>
|
||||
@@ -384,7 +384,7 @@ const BasicSettings: React.FC<BasicSettingsProps> = ({
|
||||
id: `custom-${Date.now()}`,
|
||||
name: "自定义海报",
|
||||
type: "poster",
|
||||
preview: url,
|
||||
url: url,
|
||||
};
|
||||
setCustomPosters(prev => [...prev, newPoster]);
|
||||
} catch (err) {
|
||||
@@ -512,8 +512,8 @@ const BasicSettings: React.FC<BasicSettingsProps> = ({
|
||||
<div className={styles["basic-footer-switch"]}>
|
||||
<span>是否启用</span>
|
||||
<Switch
|
||||
checked={formData.enabled}
|
||||
onChange={value => onChange({ ...formData, enabled: value })}
|
||||
checked={formData.status === 1}
|
||||
onChange={value => onChange({ ...formData, status: value ? 1 : 0 })}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -2,37 +2,31 @@ export const posterTemplates = [
|
||||
{
|
||||
id: "poster-1",
|
||||
name: "点击领取",
|
||||
preview:
|
||||
"https://hebbkx1anhila5yf.public.blob.vercel-storage.com/%E7%82%B9%E5%87%BB%E9%A2%86%E5%8F%961-tipd1HI7da6qooY5NkhxQnXBnT5LGU.gif",
|
||||
url: "https://hebbkx1anhila5yf.public.blob.vercel-storage.com/%E7%82%B9%E5%87%BB%E9%A2%86%E5%8F%961-tipd1HI7da6qooY5NkhxQnXBnT5LGU.gif",
|
||||
},
|
||||
{
|
||||
id: "poster-2",
|
||||
name: "点击合作",
|
||||
preview:
|
||||
"https://hebbkx1anhila5yf.public.blob.vercel-storage.com/%E7%82%B9%E5%87%BB%E5%90%88%E4%BD%9C-LPlMdgxtvhqCSr4IM1bZFEFDBF3ztI.gif",
|
||||
url: "https://hebbkx1anhila5yf.public.blob.vercel-storage.com/%E7%82%B9%E5%87%BB%E5%90%88%E4%BD%9C-LPlMdgxtvhqCSr4IM1bZFEFDBF3ztI.gif",
|
||||
},
|
||||
{
|
||||
id: "poster-3",
|
||||
name: "点击咨询",
|
||||
preview:
|
||||
"https://hebbkx1anhila5yf.public.blob.vercel-storage.com/%E7%82%B9%E5%87%BB%E5%92%A8%E8%AF%A2-FTiyAMAPop2g9LvjLOLDz0VwPg3KVu.gif",
|
||||
url: "https://hebbkx1anhila5yf.public.blob.vercel-storage.com/%E7%82%B9%E5%87%BB%E5%92%A8%E8%AF%A2-FTiyAMAPop2g9LvjLOLDz0VwPg3KVu.gif",
|
||||
},
|
||||
{
|
||||
id: "poster-4",
|
||||
name: "点击签到",
|
||||
preview:
|
||||
"https://hebbkx1anhila5yf.public.blob.vercel-storage.com/%E7%82%B9%E5%87%BB%E7%AD%BE%E5%88%B0-94TZIkjLldb4P2jTVlI6MkSDg0NbXi.gif",
|
||||
url: "https://hebbkx1anhila5yf.public.blob.vercel-storage.com/%E7%82%B9%E5%87%BB%E7%AD%BE%E5%88%B0-94TZIkjLldb4P2jTVlI6MkSDg0NbXi.gif",
|
||||
},
|
||||
{
|
||||
id: "poster-5",
|
||||
name: "点击了解",
|
||||
preview:
|
||||
"https://hebbkx1anhila5yf.public.blob.vercel-storage.com/%E7%82%B9%E5%87%BB%E4%BA%86%E8%A7%A3-6GCl7mQVdO4WIiykJyweSubLsTwj71.gif",
|
||||
url: "https://hebbkx1anhila5yf.public.blob.vercel-storage.com/%E7%82%B9%E5%87%BB%E4%BA%86%E8%A7%A3-6GCl7mQVdO4WIiykJyweSubLsTwj71.gif",
|
||||
},
|
||||
{
|
||||
id: "poster-6",
|
||||
name: "点击报名",
|
||||
preview:
|
||||
"https://hebbkx1anhila5yf.public.blob.vercel-storage.com/%E7%82%B9%E5%87%BB%E6%8A%A5%E5%90%8D-Mj0nnva0BiASeDAIhNNaRRAbjPgjEj.gif",
|
||||
url: "https://hebbkx1anhila5yf.public.blob.vercel-storage.com/%E7%82%B9%E5%87%BB%E6%8A%A5%E5%90%8D-Mj0nnva0BiASeDAIhNNaRRAbjPgjEj.gif",
|
||||
},
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user