feat: 🚀 站点切换
This commit is contained in:
@@ -152,15 +152,24 @@ const buildTree = (data: any, outerLinkTo: any = "") => {
|
||||
};
|
||||
// let isFirstRequest = true;
|
||||
const handleRadioGroupEmits = (value: any) => {
|
||||
// if (value !== "video" || value !== "image") {
|
||||
// return;
|
||||
// }
|
||||
if (value === "video") {
|
||||
dataStore.editFormData = EDIT_FORM_DATA1;
|
||||
dataStore.rules = RULES1;
|
||||
getBannerClassEditList();
|
||||
}
|
||||
// getBannerClassList();
|
||||
if (value === "image") {
|
||||
dataStore.isFirstRequest = true;
|
||||
dataStore.editFormData = EDIT_FORM_DATA;
|
||||
dataStore.rules = RULES;
|
||||
} else {
|
||||
dataStore.editFormData = EDIT_FORM_DATA1;
|
||||
dataStore.rules = RULES1;
|
||||
getBannerClassEditList();
|
||||
}
|
||||
|
||||
// console.log(value, "==========value==========");
|
||||
// getBannerClassEditList();
|
||||
};
|
||||
|
||||
const getSystemUrls = async (node: any, resolve: any) => {
|
||||
@@ -205,7 +214,6 @@ 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 = {
|
||||
@@ -277,7 +285,7 @@ const getBannerClassEditList = async () => {
|
||||
}
|
||||
};
|
||||
|
||||
// 新增 getBannerListSave
|
||||
// 新增
|
||||
const getBannerListSave = async () => {
|
||||
const result = await getBannerListSaveApi(dataStore.editRuleForm);
|
||||
if (result?.code === 0) {
|
||||
@@ -370,21 +378,6 @@ const handleBlur = (row: any) => {
|
||||
const handleInput = (row: any) => {
|
||||
row.sort = integerRexg(row.sort);
|
||||
};
|
||||
// watch(
|
||||
// () => dataStore.editRuleForm.type,
|
||||
// newVal => {
|
||||
// console.log(dataStore.editRuleForm.type);
|
||||
// if (newVal === "video") {
|
||||
// dataStore.editFormData = EDIT_FORM_DATA1;
|
||||
// } else {
|
||||
// dataStore.editFormData = EDIT_FORM_DATA;
|
||||
// }
|
||||
// },
|
||||
// {
|
||||
// immediate: true,
|
||||
// deep: true
|
||||
// }
|
||||
// );
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
||||
Reference in New Issue
Block a user