befly-admin 3.3.4 → 3.3.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "befly-admin",
3
- "version": "3.3.4",
3
+ "version": "3.3.6",
4
4
  "description": "Befly Admin - 基于 Vue3 + OpenTiny Vue 的后台管理系统",
5
5
  "type": "module",
6
6
  "private": false,
@@ -17,7 +17,7 @@
17
17
  "dependencies": {
18
18
  "@opentiny/vue": "3.26.0",
19
19
  "axios": "1.12.2",
20
- "befly-auto-routes": "^1.0.2",
20
+ "befly-auto-routes": "^1.0.3",
21
21
  "lucide-vue-next": "0.546.0",
22
22
  "pinia": "3.0.3",
23
23
  "vue": "3.5.22",
@@ -39,5 +39,5 @@
39
39
  "node": ">=22.0.0",
40
40
  "pnpm": ">=9.0.0"
41
41
  },
42
- "gitHead": "f7fad19e6c07b776a4a3c1aa83d09497ababb719"
42
+ "gitHead": "131c2482f3668346adbbd153e14d5b74cd19e725"
43
43
  }
package/src/layouts/0.vue CHANGED
@@ -53,7 +53,7 @@ const $Method = {
53
53
  // 获取用户菜单权限
54
54
  async fetchUserMenus() {
55
55
  try {
56
- const { data } = await $Http('/core/menu/all');
56
+ const { data } = await $Http('/addon/admin/menu/all');
57
57
  // 将一维数组转换为树形结构(最多2级)
58
58
  $Data.userMenus = arrayToTree(data);
59
59
  $Method.setActiveMenu();
@@ -58,7 +58,7 @@ const $Method = {
58
58
  // 加载角色列表
59
59
  async apiRoleList() {
60
60
  try {
61
- const res = await $Http('/core/role/list', {
61
+ const res = await $Http('/addon/admin/role/list', {
62
62
  page: 1,
63
63
  limit: 1000
64
64
  });
@@ -80,7 +80,7 @@ const $Method = {
80
80
  if (!$Prop.rowData.id) return;
81
81
 
82
82
  try {
83
- const res = await $Http('/core/roleDetail', {
83
+ const res = await $Http('/addon/admin/roleDetail', {
84
84
  adminId: $Prop.rowData.id
85
85
  });
86
86
  $Data.checkedRoleCode = res.data.roleCode || '';
@@ -97,7 +97,7 @@ const $Method = {
97
97
  }
98
98
 
99
99
  try {
100
- const res = await $Http('/core/roleSave', {
100
+ const res = await $Http('/addon/admin/roleSave', {
101
101
  adminId: $Prop.rowData.id,
102
102
  roleCode: $Data.checkedRoleCode
103
103
  });
@@ -99,7 +99,7 @@ const $Method = {
99
99
  // 加载管理员列表
100
100
  async apiAdminList() {
101
101
  try {
102
- const res = await $Http('/core/list', {
102
+ const res = await $Http('/addon/admin/list', {
103
103
  page: $Data.pagerConfig.currentPage,
104
104
  limit: $Data.pagerConfig.pageSize
105
105
  });
@@ -122,7 +122,7 @@ const $Method = {
122
122
  status: 'warning'
123
123
  }).then(async () => {
124
124
  try {
125
- const res = await $Http('/core/del', { id: row.id });
125
+ const res = await $Http('/addon/admin/del', { id: row.id });
126
126
  if (res.code === 0) {
127
127
  Modal.message({ message: '删除成功', status: 'success' });
128
128
  $Method.apiAdminList();
@@ -91,7 +91,7 @@ const $Method = {
91
91
  // 加载字典列表
92
92
  async apiDictList() {
93
93
  try {
94
- const res = await $Http('/core/dict/list', {
94
+ const res = await $Http('/addon/admin/dict/list', {
95
95
  page: $Data.pagerConfig.currentPage,
96
96
  limit: $Data.pagerConfig.pageSize
97
97
  });
@@ -114,7 +114,7 @@ const $Method = {
114
114
  status: 'warning'
115
115
  }).then(async () => {
116
116
  try {
117
- const res = await $Http('/core/dict/del', { id: row.id });
117
+ const res = await $Http('/addon/admin/dict/del', { id: row.id });
118
118
  if (res.code === 0) {
119
119
  Modal.message({ message: '删除成功', status: 'success' });
120
120
  $Method.apiDictList();
@@ -31,7 +31,7 @@ const addonList = $ref([]);
31
31
  // 获取数据
32
32
  const fetchData = async () => {
33
33
  try {
34
- const { data } = await $Http('/core/dashboard/addonList');
34
+ const { data } = await $Http('/addon/admin/dashboard/addonList');
35
35
  addonList.splice(0, addonList.length, ...data);
36
36
  } catch (error) {
37
37
  console.error('获取插件列表失败:', error);
@@ -49,7 +49,7 @@ const environmentInfo = $ref({
49
49
  // 获取数据
50
50
  const fetchData = async () => {
51
51
  try {
52
- const { data } = await $Http('/core/dashboard/environmentInfo');
52
+ const { data } = await $Http('/addon/admin/dashboard/environmentInfo');
53
53
  Object.assign(environmentInfo, data);
54
54
  } catch (error) {
55
55
  console.error('获取运行环境信息失败:', error);
@@ -65,7 +65,7 @@ const performanceMetrics = $ref({
65
65
  // 获取数据
66
66
  const fetchData = async () => {
67
67
  try {
68
- const { data } = await $Http('/core/dashboard/performanceMetrics');
68
+ const { data } = await $Http('/addon/admin/dashboard/performanceMetrics');
69
69
  Object.assign(performanceMetrics, data);
70
70
  } catch (error) {
71
71
  console.error('获取性能指标失败:', error);
@@ -33,7 +33,7 @@ const services = $ref([]);
33
33
  // 获取数据
34
34
  const fetchData = async () => {
35
35
  try {
36
- const { data } = await $Http('/core/dashboard/serviceStatus');
36
+ const { data } = await $Http('/addon/admin/dashboard/serviceStatus');
37
37
  services.splice(0, services.length, ...data.services);
38
38
  } catch (error) {
39
39
  console.error('获取服务状态失败:', error);
@@ -49,7 +49,7 @@ const permissionStats = $ref({
49
49
  // 获取数据
50
50
  const fetchData = async () => {
51
51
  try {
52
- const { data } = await $Http('/core/dashboard/systemOverview');
52
+ const { data } = await $Http('/addon/admin/dashboard/systemOverview');
53
53
  Object.assign(permissionStats, data);
54
54
  } catch (error) {
55
55
  console.error('获取系统概览失败:', error);
@@ -49,7 +49,7 @@ const systemResources = $ref({
49
49
  // 获取数据
50
50
  const fetchData = async () => {
51
51
  try {
52
- const { data } = await $Http('/core/dashboard/systemResources');
52
+ const { data } = await $Http('/addon/admin/dashboard/systemResources');
53
53
  Object.assign(systemResources, data);
54
54
  } catch (error) {
55
55
  console.error('获取系统资源失败:', error);
@@ -33,7 +33,7 @@ const userInfo = $ref({});
33
33
  // 获取数据
34
34
  const fetchData = async () => {
35
35
  try {
36
- const { data } = await $Http('/core/admin/info');
36
+ const { data } = await $Http('/addon/admin/admin/info');
37
37
  Object.assign(userInfo, data);
38
38
  } catch (error) {
39
39
  console.error('获取用户信息失败:', error);
@@ -56,7 +56,7 @@ const $Method = {
56
56
 
57
57
  $Data.loading = true;
58
58
 
59
- const res = await $Http('/core/auth/login', {
59
+ const res = await $Http('/addon/admin/auth/login', {
60
60
  account: $Data.formData.account,
61
61
  password: $Data.formData.password
62
62
  });
@@ -82,7 +82,7 @@ const $Method = {
82
82
  $Data.loading = true;
83
83
 
84
84
  try {
85
- await $Http('/core/register', $Data.formData);
85
+ await $Http('/addon/admin/register', $Data.formData);
86
86
  MessagePlugin.success('注册成功,请登录');
87
87
 
88
88
  // 清空表单
@@ -100,7 +100,7 @@ const $Method = {
100
100
  // 加载菜单列表
101
101
  async apiMenuList() {
102
102
  try {
103
- const res = await $Http('/core/menu/list', {
103
+ const res = await $Http('/addon/admin/menu/list', {
104
104
  page: $Data.pagerConfig.currentPage,
105
105
  limit: $Data.pagerConfig.pageSize
106
106
  });
@@ -123,7 +123,7 @@ const $Method = {
123
123
  status: 'warning'
124
124
  }).then(async () => {
125
125
  try {
126
- const res = await $Http('/core/menu/del', { id: row.id });
126
+ const res = await $Http('/addon/admin/menu/del', { id: row.id });
127
127
  if (res.code === 0) {
128
128
  Modal.message({ message: '删除成功', status: 'success' });
129
129
  $Method.apiMenuList();
@@ -78,7 +78,7 @@ const $Method = {
78
78
  // 加载所有接口
79
79
  async apiApiAll() {
80
80
  try {
81
- const res = await $Http('/core/api/all');
81
+ const res = await $Http('/addon/admin/api/all');
82
82
 
83
83
  // 将接口列表按 addonTitle 分组
84
84
  const apiMap = new Map();
@@ -114,7 +114,7 @@ const $Method = {
114
114
  if (!$Prop.rowData.id) return;
115
115
 
116
116
  try {
117
- const res = await $Http('/core/role/apiDetail', {
117
+ const res = await $Http('/addon/admin/role/apiDetail', {
118
118
  roleId: $Prop.rowData.id
119
119
  });
120
120
 
@@ -159,7 +159,7 @@ const $Method = {
159
159
  // 提交表单
160
160
  async onSubmit() {
161
161
  try {
162
- const res = await $Http('/core/role/apiSave', {
162
+ const res = await $Http('/addon/admin/role/apiSave', {
163
163
  roleId: $Prop.rowData.id,
164
164
  apiIds: $Data.checkedApiIds
165
165
  });
@@ -60,7 +60,7 @@ const $Method = {
60
60
  // 加载菜单树(用于配置权限)
61
61
  async apiMenuAll() {
62
62
  try {
63
- const res = await $Http('/core/menu/all');
63
+ const res = await $Http('/addon/admin/menu/all');
64
64
  // menuAll 返回的 data 直接就是菜单数组
65
65
  const menuList = Array.isArray(res.data) ? res.data : [];
66
66
  $Data.menuTreeData = arrayToTree(menuList);
@@ -75,7 +75,7 @@ const $Method = {
75
75
  if (!$Prop.rowData.id) return;
76
76
 
77
77
  try {
78
- const res = await $Http('/core/role/menuDetail', {
78
+ const res = await $Http('/addon/admin/role/menuDetail', {
79
79
  roleId: $Prop.rowData.id
80
80
  });
81
81
 
@@ -106,7 +106,7 @@ const $Method = {
106
106
  const halfCheckedKeys = $From.tree.getHalfCheckedKeys();
107
107
  const menuIds = [...checkedKeys, ...halfCheckedKeys];
108
108
 
109
- const res = await $Http('/core/role/menuSave', {
109
+ const res = await $Http('/addon/admin/role/menuSave', {
110
110
  roleId: $Prop.rowData.id,
111
111
  menuIds
112
112
  });
@@ -106,7 +106,7 @@ const $Method = {
106
106
  // 加载角色列表
107
107
  async apiRoleList() {
108
108
  try {
109
- const res = await $Http('/core/role/list', {
109
+ const res = await $Http('/addon/admin/role/list', {
110
110
  page: $Data.pagerConfig.currentPage,
111
111
  limit: $Data.pagerConfig.limit
112
112
  });
@@ -129,7 +129,7 @@ const $Method = {
129
129
  status: 'warning'
130
130
  }).then(async () => {
131
131
  try {
132
- const res = await $Http('/core/role/del', { id: row.id });
132
+ const res = await $Http('/addon/admin/role/del', { id: row.id });
133
133
  if (res.code === 0) {
134
134
  Modal.message({ message: '删除成功', status: 'success' });
135
135
  $Method.apiRoleList();
@@ -111,7 +111,7 @@ const $Method = {
111
111
  async loadUserList() {
112
112
  $Data.loading = true;
113
113
  try {
114
- const res = await $Http('/core/list', {
114
+ const res = await $Http('/addon/admin/list', {
115
115
  page: $Data.pagination.current,
116
116
  limit: $Data.pagination.pageSize
117
117
  });
@@ -180,7 +180,7 @@ const $Method = {
180
180
  // 加载角色列表
181
181
  async loadRoleList() {
182
182
  try {
183
- const res = await $Http('/core/role/list', {});
183
+ const res = await $Http('/addon/admin/role/list', {});
184
184
  if (res.code === 0 && res.data) {
185
185
  // getList 返回分页对象
186
186
  const roleList = res.data.list || res.data || [];
@@ -207,7 +207,7 @@ const $Method = {
207
207
 
208
208
  // 加载该用户已有的角色
209
209
  try {
210
- const res = await $Http('/core/roleDetail', { adminId: row.id });
210
+ const res = await $Http('/addon/admin/roleDetail', { adminId: row.id });
211
211
  if (res.code === 0 && res.data) {
212
212
  $Data.checkedRoleCode = res.data.roleCode || '';
213
213
  }
@@ -225,7 +225,7 @@ const $Method = {
225
225
  }
226
226
 
227
227
  try {
228
- const res = await $Http('/core/roleSave', {
228
+ const res = await $Http('/addon/admin/roleSave', {
229
229
  adminId: $Data.currentUser.id,
230
230
  roleCode: $Data.checkedRoleCode
231
231
  });