feat: 🚀 站点切换
This commit is contained in:
@@ -61,7 +61,7 @@ export const EDIT_FORM_DATA: FormItem[] = [
|
||||
},
|
||||
{
|
||||
label: "否",
|
||||
value: 0
|
||||
value: -1
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
@@ -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">
|
||||
|
||||
@@ -14,10 +14,10 @@
|
||||
|
||||
<script setup lang="ts" name="feedbackProductIndex">
|
||||
import ProTable from "@/components/ProTable/index.vue";
|
||||
|
||||
// const $router = useRouter();
|
||||
//列表接口
|
||||
import { getProductListApi } from "@/api/modules/product";
|
||||
// import { getCountryListApi } from "@/api/modules/global";
|
||||
|
||||
// import { useUserStore } from "@/stores/modules/user";
|
||||
// const userStore: any = useUserStore();
|
||||
//深拷贝方法
|
||||
@@ -32,36 +32,15 @@ const dataStore = reactive<any>({
|
||||
initParam: cloneDeep(RULE_FORM), // 初始化搜索条件|重置搜索条件
|
||||
ruleForm: cloneDeep(RULE_FORM), // 搜索參數
|
||||
formData: FORM_DATA //搜索配置项
|
||||
// ZH: [],
|
||||
// EN: []
|
||||
});
|
||||
|
||||
// const getCountryList = async () => {
|
||||
// const result = await getCountryListApi();
|
||||
|
||||
// if (result?.code === 0) {
|
||||
// dataStore.ZH = [];
|
||||
// dataStore.EN = [];
|
||||
// result?.data.forEach((item: any) => {
|
||||
// dataStore.ZH.push({
|
||||
// label: item.name,
|
||||
// value: item.id
|
||||
// });
|
||||
// dataStore.EN.push({
|
||||
// label: item.name,
|
||||
// value: item.id
|
||||
// });
|
||||
// });
|
||||
// dataStore.formData[1].options = userStore.languageType === 1 ? dataStore.ZH : dataStore.EN;
|
||||
// }
|
||||
// };
|
||||
// getCountryList();
|
||||
// watch(
|
||||
// () => userStore.languageType,
|
||||
// (newVal: any) => {
|
||||
// dataStore.formData[1].options = newVal === 1 ? dataStore.ZH : dataStore.EN;
|
||||
// },
|
||||
// { deep: true, immediate: true }
|
||||
// console.log(newVal, "=======newVal=======");
|
||||
// // window.location.reload();
|
||||
// $router.go(0);
|
||||
// }
|
||||
// );
|
||||
</script>
|
||||
|
||||
|
||||
@@ -19,6 +19,8 @@
|
||||
<script setup lang="ts" name="feedbackContactIndex">
|
||||
import ProTable from "@/components/ProTable/index.vue";
|
||||
import { useExport } from "@/hooks/useExport";
|
||||
// import { useUserStore } from "@/stores/modules/user";
|
||||
// const userStore: any = useUserStore();
|
||||
//列表接口
|
||||
import { getBPListExportApi, getBPListApi, getBPInterestedListApi } from "@/api/modules/purchase";
|
||||
//深拷贝方法
|
||||
@@ -58,10 +60,18 @@ const getBPInterestedList = async () => {
|
||||
});
|
||||
});
|
||||
dataStore.formData[1].options = arr;
|
||||
console.log(result?.data, "=======data========");
|
||||
}
|
||||
};
|
||||
getBPInterestedList();
|
||||
// watch(
|
||||
// () => userStore.languageType,
|
||||
// (newVal: any) => {
|
||||
// console.log(newVal);
|
||||
|
||||
// getBPInterestedList();
|
||||
// },
|
||||
// { deep: true, immediate: true }
|
||||
// );
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
||||
|
||||
@@ -109,22 +109,22 @@ export const BASIC_INFO_FORM_DATA: FormItem[] = [
|
||||
]
|
||||
},
|
||||
|
||||
{
|
||||
prop: "is_show1",
|
||||
placeholder: "",
|
||||
type: "radio",
|
||||
label: "是否启用: ",
|
||||
options: [
|
||||
{
|
||||
label: "是",
|
||||
value: 1
|
||||
},
|
||||
{
|
||||
label: "否",
|
||||
value: 0
|
||||
}
|
||||
]
|
||||
},
|
||||
// {
|
||||
// prop: "is_show1",
|
||||
// placeholder: "",
|
||||
// type: "radio",
|
||||
// label: "是否启用: ",
|
||||
// options: [
|
||||
// {
|
||||
// label: "是",
|
||||
// value: 1
|
||||
// },
|
||||
// {
|
||||
// label: "否",
|
||||
// value: -1
|
||||
// }
|
||||
// ]
|
||||
// },
|
||||
|
||||
{
|
||||
prop: "seo_title",
|
||||
|
||||
Reference in New Issue
Block a user