fix: 🧩 修复bug
This commit is contained in:
@@ -195,6 +195,7 @@ const setImgOrVideo = () => {
|
||||
} else {
|
||||
dataStore.editFormData = EDIT_FORM_DATA1;
|
||||
}
|
||||
getBannerClassEditList();
|
||||
};
|
||||
// 详情
|
||||
const getBannerRead = async (id: any) => {
|
||||
@@ -204,6 +205,7 @@ const getBannerRead = async (id: any) => {
|
||||
if (result?.code === 0) {
|
||||
dataStore.editRuleForm = result?.data;
|
||||
setImgOrVideo();
|
||||
|
||||
if (dataStore.editRuleForm.link && dataStore.editRuleForm.link_to) {
|
||||
let { id, name, link } = dataStore.editRuleForm.link_echo_data;
|
||||
let obj: any = {
|
||||
@@ -252,7 +254,7 @@ const getBannerUp = async () => {
|
||||
|
||||
// 分类
|
||||
const getBannerClassList = async () => {
|
||||
const result = await getBannerClassListApi({ is_show: 0 });
|
||||
const result = await getBannerClassListApi();
|
||||
if (result?.code === 0) {
|
||||
let arr: any = [];
|
||||
result?.data?.forEach((item: any) => {
|
||||
@@ -265,16 +267,16 @@ const getBannerClassList = async () => {
|
||||
getBannerClassList();
|
||||
//详情里的分类
|
||||
const getBannerClassEditList = async () => {
|
||||
const result = await getBannerClassListApi({ is_show: 1 });
|
||||
const result = await getBannerClassListApi();
|
||||
if (result?.code === 0) {
|
||||
let arr: any = [];
|
||||
result?.data?.forEach((item: any) => {
|
||||
arr.push({ value: item.id, label: item.name });
|
||||
});
|
||||
dataStore.editFormData[4].options = arr;
|
||||
dataStore.editFormData[5].options = arr;
|
||||
}
|
||||
};
|
||||
getBannerClassEditList();
|
||||
|
||||
// 新增 getBannerListSave
|
||||
const getBannerListSave = async () => {
|
||||
const result = await getBannerListSaveApi(dataStore.editRuleForm);
|
||||
@@ -329,6 +331,7 @@ const handleResetClick = () => {
|
||||
const handleAdd = () => {
|
||||
dataStore.title = "添加Banner";
|
||||
dataStore.visible = true;
|
||||
getBannerClassEditList();
|
||||
};
|
||||
// 抽屉关闭前的钩子
|
||||
const handleBeforeClone = () => {
|
||||
|
||||
Reference in New Issue
Block a user