diff --git a/src/api/sitesettings.js b/src/api/sitesettings.js
index 7dddbac..2544ac3 100644
--- a/src/api/sitesettings.js
+++ b/src/api/sitesettings.js
@@ -100,4 +100,30 @@ export function saveCompanyInfos(data) {
method: "post",
data: data,
});
+}
+
+/**
+ * 获取企业SEO
+ * @param {number} tid 租户ID
+ * @returns {Promise}
+ */
+export function getCompanySeo(tid) {
+ return request({
+ url: "/admin/companySeo",
+ method: "get",
+ params: { tid }
+ });
+}
+
+/**
+ * 保存企业SEO
+ * @param {Object} data 要保存的数据
+ * @returns {Promise}
+ */
+export function saveCompanySeo(data) {
+ return request({
+ url: "/admin/saveCompanySeo",
+ method: "post",
+ data: data,
+ });
}
\ No newline at end of file
diff --git a/src/views/basicSettings/siteSettings/components/seoSettings.vue b/src/views/basicSettings/siteSettings/components/seoSettings.vue
index b8dacc3..d2388b6 100644
--- a/src/views/basicSettings/siteSettings/components/seoSettings.vue
+++ b/src/views/basicSettings/siteSettings/components/seoSettings.vue
@@ -7,10 +7,7 @@
style="max-width: 600px"
>
-
+
diff --git a/src/views/basicSettings/siteSettings/index.vue b/src/views/basicSettings/siteSettings/index.vue
index cd7d82c..e494be8 100644
--- a/src/views/basicSettings/siteSettings/index.vue
+++ b/src/views/basicSettings/siteSettings/index.vue
@@ -26,7 +26,7 @@
/>
-
+
import { ref, onMounted } from "vue";
-import { ElMessage } from "element-plus";
import normalSettings from "./components/normalSettings.vue";
import seoSettings from "./components/seoSettings.vue";
import contactSettings from "./components/contactSettings.vue";
import otherSettings from "./components/otherSettings.vue";
import legalNoticeSettings from "./components/legalNotice.vue";
import loginVerificationSettings from "./components/loginVerification.vue";
+import { useAuthStore } from '@/stores/auth';
+const authStore = useAuthStore();
+const groupId = (authStore.userInfo as any)?.group_id;
const activeTab = ref("basic");
-
-const normalSettingsRef = ref();
-const seoSettingsRef = ref();
-const contactSettingsRef = ref();
-const otherSettingsRef = ref();
-const legalNoticeSettingsRef = ref();
-const loginVerificationSettingsRef = ref();
-
-// 初始化各标签页数据
-const initSettings = async () => {
- // TODO: 从后端获取各设置数据并赋值给对应组件
- if (normalSettingsRef.value) {
- // normalSettingsRef.value.normalinfos = ...
- }
- if (seoSettingsRef.value) {
- // seoSettingsRef.value.seoForm = ...
- }
- if (contactSettingsRef.value) {
- // contactSettingsRef.value.contactForm = ...
- }
- if (otherSettingsRef.value) {
- // otherSettingsRef.value.otherForm = ...
- }
- if (legalNoticeSettingsRef.value) {
- // legalNoticeSettingsRef.value.legalNoticeForm = ...
- }
- if (loginVerificationSettingsRef.value) {
- // loginVerificationSettingsRef.value.loginVerificationForm = ...
- }
-};
-
-onMounted(() => {
- initSettings();
-});