-
+
-
@@ -295,6 +295,10 @@ const props = defineProps({
});
const model_value_upload = defineModel({ type: Array as PropType
, default: [] });
+// 分类权限控制
+const attachment_category_operate = computed(() => common_store.common.config.attachment_category_operate);
+// 附件管理权限
+const attachment_operate = computed(() => common_store.common.config.attachment_operate);
const view_list_value = ref([]);
// 弹窗显示
diff --git a/src/components/footer-nav/footer-nav-content.vue b/src/components/footer-nav/footer-nav-content.vue
index 0580a90a..ff8de3ba 100644
--- a/src/components/footer-nav/footer-nav-content.vue
+++ b/src/components/footer-nav/footer-nav-content.vue
@@ -132,7 +132,7 @@ const sync_sys_event = () => {
config: clone_form,
};
app?.appContext.config.globalProperties.$common.message_box('将数据同步到系统底部菜单,确定继续吗?', 'warning').then(() => {
- CommonAPI.getDynamicApi(common_store.common.app_tabbar_save_url, new_data).then((res: any) => {
+ CommonAPI.getDynamicApi(common_store.common.config.app_tabbar_save_url, new_data).then((res: any) => {
ElMessage.success('同步成功');
});
});
diff --git a/src/store/modules/common.ts b/src/store/modules/common.ts
index f5077253..e6b32486 100644
--- a/src/store/modules/common.ts
+++ b/src/store/modules/common.ts
@@ -8,14 +8,6 @@ export const commonStore = defineStore('common', () => {
const is_tabs_0_up = ref(false);
const header_height = ref(0);
const common = ref({
- app_tabbar_data_url: '' as string, //获取tabbar列表
- app_tabbar_save_url: '' as string, //保存tabbar
- diy_detail_url: '' as string, //获取diy详情
- diy_download_url: '' as string, //diy导出
- diy_install_url: '' as string, //diy导入 -- 安装
- diy_market_url: '' as string, //diy导入--获取列表
- diy_save_url: '' as string, //diy导入--保存
- diy_upload_url: '' as string, //diy导入
article_category: [] as any[], //---- 文章分类
blog_category: [] as any[], //---- 文章分类
attachment_category: [] as any[], //---- 附件分类
@@ -44,6 +36,16 @@ export const commonStore = defineStore('common', () => {
site_logo_wap: '',
site_logo: '',
site_name: '',
+ app_tabbar_data_url: '' as string, //获取tabbar列表
+ app_tabbar_save_url: '' as string, //保存tabbar
+ diy_detail_url: '' as string, //获取diy详情
+ diy_download_url: '' as string, //diy导出
+ diy_install_url: '' as string, //diy导入 -- 安装
+ diy_market_url: '' as string, //diy导入--获取列表
+ diy_save_url: '' as string, //diy导入--保存
+ diy_upload_url: '' as string, //diy导入
+ attachment_category_operate: {} as any, // 附件分类权限
+ attachment_operate: {} as any, // 附件权限
} as any, // 基础数据配置参数
preview_url: '',
});
diff --git a/src/utils/api-request.ts b/src/utils/api-request.ts
index 8fe8b3fa..52cf9e1b 100644
--- a/src/utils/api-request.ts
+++ b/src/utils/api-request.ts
@@ -1,7 +1,7 @@
import axios, { InternalAxiosRequestConfig, AxiosResponse } from 'axios';
import { ElMessage, ElMessageBox, type MessageHandler } from 'element-plus';
import { get_cookie } from './index';
-import { get_type } from './common';
+import { get_id, get_type } from './common';
// 提示拦截
@@ -51,6 +51,8 @@ service.interceptors.request.use(
config.url = config.url + '&token=' + (JSON.parse(cookie) !== 'null' ? JSON.parse(cookie)?.token : '');
}
}
+ // 添加diy_id和diy_type参数
+ config.url = `${config.url}&diy_id=${ get_id() }&diy_type=${ get_type() }`;
// 判断是否是包含不需要认证的接口
const release_list = release_url.filter(item => config.url?.includes(item));
if (release_list.length === 0) {
diff --git a/src/utils/index-request.ts b/src/utils/index-request.ts
index bb122da7..6be869ff 100644
--- a/src/utils/index-request.ts
+++ b/src/utils/index-request.ts
@@ -1,7 +1,7 @@
import axios, { InternalAxiosRequestConfig, AxiosResponse } from 'axios';
import { ElMessage, ElMessageBox, type MessageHandler } from 'element-plus';
import { get_cookie } from './index';
-import { get_type } from './common';
+import { get_id, get_type } from './common';
// 提示拦截
@@ -51,6 +51,8 @@ service.interceptors.request.use(
config.url = config.url + '&token=' + (JSON.parse(cookie) !== 'null' ? JSON.parse(cookie)?.token : '');
}
}
+ // 添加diy_id和diy_type参数
+ config.url = `${config.url}&diy_id=${ get_id() }&diy_type=${ get_type() }`;
// 判断是否是包含不需要认证的接口
const release_list = release_url.filter(item => config.url?.includes(item));
if (release_list.length === 0) {
diff --git a/src/utils/request.ts b/src/utils/request.ts
index 0c413854..20ddc216 100644
--- a/src/utils/request.ts
+++ b/src/utils/request.ts
@@ -1,7 +1,7 @@
import axios, { InternalAxiosRequestConfig, AxiosResponse } from 'axios';
import { ElMessage, ElMessageBox, type MessageHandler } from 'element-plus';
import { get_cookie } from './index';
-import { get_type } from '@/utils/common';
+import { get_id, get_type } from '@/utils/common';
// 提示拦截
let messageInstance: MessageHandler;
const message_error = (info: string) => {
@@ -46,6 +46,8 @@ service.interceptors.request.use(
config.url = config.url + '&token=' + (JSON.parse(cookie) !== 'null' ? JSON.parse(cookie)?.token : '');
}
}
+ // 添加diy_id和diy_type参数
+ config.url = `${config.url}&diy_id=${ get_id() }&diy_type=${ get_type() }`;
// 判断是否是包含不需要认证的接口
const release_list = release_url.filter(item => config.url?.includes(item));
if (release_list.length === 0) {
diff --git a/src/views/layout/index.vue b/src/views/layout/index.vue
index 9744f785..318a3cda 100644
--- a/src/views/layout/index.vue
+++ b/src/views/layout/index.vue
@@ -18,7 +18,7 @@