diff --git a/src/assets/SvgIcons/activityManagement.svg b/src/assets/SvgIcons/activityManagement.svg
new file mode 100644
index 0000000..89ec77a
--- /dev/null
+++ b/src/assets/SvgIcons/activityManagement.svg
@@ -0,0 +1,13 @@
+
diff --git a/src/assets/SvgIcons/现金管理.svg b/src/assets/SvgIcons/cashManagement.svg
similarity index 100%
rename from src/assets/SvgIcons/现金管理.svg
rename to src/assets/SvgIcons/cashManagement.svg
diff --git a/src/assets/SvgIcons/channelManagement.svg b/src/assets/SvgIcons/channelManagement.svg
new file mode 100644
index 0000000..3a4c7e7
--- /dev/null
+++ b/src/assets/SvgIcons/channelManagement.svg
@@ -0,0 +1,16 @@
+
diff --git a/src/assets/SvgIcons/金币管理.svg b/src/assets/SvgIcons/goldManagement.svg
similarity index 100%
rename from src/assets/SvgIcons/金币管理.svg
rename to src/assets/SvgIcons/goldManagement.svg
diff --git a/src/assets/SvgIcons/permissionManagement.svg b/src/assets/SvgIcons/permissionManagement.svg
new file mode 100644
index 0000000..053a5ce
--- /dev/null
+++ b/src/assets/SvgIcons/permissionManagement.svg
@@ -0,0 +1,12 @@
+
diff --git a/src/assets/SvgIcons/工作台.svg b/src/assets/SvgIcons/workbench.svg
similarity index 100%
rename from src/assets/SvgIcons/工作台.svg
rename to src/assets/SvgIcons/workbench.svg
diff --git a/src/assets/avator.png b/src/assets/avator.png
deleted file mode 100644
index 88526ec..0000000
Binary files a/src/assets/avator.png and /dev/null differ
diff --git a/src/assets/动漫美女.png b/src/assets/动漫美女.png
deleted file mode 100644
index 39ef830..0000000
Binary files a/src/assets/动漫美女.png and /dev/null differ
diff --git a/src/assets/金币管理系统logo.png b/src/assets/金币管理系统logo.png
deleted file mode 100644
index e6ef08a..0000000
Binary files a/src/assets/金币管理系统logo.png and /dev/null differ
diff --git a/src/assets/韩信.png b/src/assets/韩信.png
deleted file mode 100644
index 956b57a..0000000
Binary files a/src/assets/韩信.png and /dev/null differ
diff --git a/src/views/consume/gold/coinConsumeDetail.vue b/src/views/consume/gold/coinConsumeDetail.vue
index da5c58d..90be922 100644
--- a/src/views/consume/gold/coinConsumeDetail.vue
+++ b/src/views/consume/gold/coinConsumeDetail.vue
@@ -183,7 +183,7 @@ const getAdminData = async function () {
const ConsumeSelectBy = async function (val) {
- if (!hasrechargeWaitShow) {
+ if (!selectPermission) {
ElMessage.error('暂无权限')
return
}
@@ -437,6 +437,7 @@ const handleCurrentChange = function (val) {
// 计算总金币数
const sumGold = computed(() => permanentGolds.value + freeGolds.value + taskGolds.value)
onMounted(async function () {
+ await initPermissions()
await getAdminData()
await ConsumeSelectBy()
// getActivity();
diff --git a/src/views/home.vue b/src/views/home.vue
index 5910196..68928c7 100644
--- a/src/views/home.vue
+++ b/src/views/home.vue
@@ -13,14 +13,31 @@ import SettingsIcon from '@/assets/blue.png';
// 使用import.meta.glob导入所有SVG图标(修复版本)
const icons = import.meta.glob('@/assets/SvgIcons/*.svg', { eager: true })
+// import from '@/assets/SvgIcons/workbench.svg'
+// import from '@/assets/SvgIcons/activity.png'
+// import from '@/assets/SvgIcons/activity.png'
+// import from '@/assets/SvgIcons/activity.png'
+// import from '@/assets/SvgIcons/activity.png'
+
+
+const menuNameMap = {
+ '工作台': 'workbench',
+ '金币管理': 'goldManagement',
+ '现金管理': 'cashManagement',
+ '活动管理': 'activityManagement',
+ '频道管理': 'channelManagement',
+ '权限管理': 'permissionManagement',
+}
+
// 创建获取图标路径的函数(修复版本)
const getIconPath = (menuName) => {
-
+ const englishName = menuNameMap[menuName] || menuName;
+
// 构建可能的key格式
const possibleKeys = [
- `@/assets/SvgIcons/${menuName}.svg`,
- `./SvgIcons/${menuName}.svg`,
- `/src/assets/SvgIcons/${menuName}.svg`
+ `@/assets/SvgIcons/${englishName}.svg`,
+ `./SvgIcons/${englishName}.svg`,
+ `/src/assets/SvgIcons/${englishName}.svg`
]
// 在icons对象中查找对应的图标
@@ -68,11 +85,6 @@ const refreshData = async () => {
// ---------------------------------------
-
-
-
-
-
// 存储接口返回的菜单数据
const menuList = ref([])
@@ -110,9 +122,6 @@ function findBestMatch(menuList, path) {
return bestMatch || path // fallback 到当前路径
}
-
-
-
// 响应式高亮菜单
const activeMenu = computed(() => {
return findBestMatch(menuList.value, route.path)