Browse Source

面包屑多语言和输入ip跳转错误

david 2 years ago
parent
commit
1ade72a7d6
7 changed files with 84 additions and 30 deletions
  1. 1 1
      .env.development
  2. 25 0
      src/lang/en.js
  3. 25 0
      src/lang/zh.js
  4. 1 1
      src/permission.js
  5. 28 24
      src/router/index.js
  6. 3 3
      src/router/modules/member.js
  7. 1 1
      vue.config.js

+ 1 - 1
.env.development

@@ -6,7 +6,7 @@ VUE_APP_BASE_API=''
 # 文件下载地址
 VUE_APP_BASE_DO_API='http://local.ng.backend.api.com'
 # CDN文件地址
-VUE_APP_CDN_API='http://172.19.124.45:9970'
+VUE_APP_CDN_API='http://172.19.234.110:9970'
 # 页面地址
 VUE_APP_BASE_WEBSITE='http://local.ng.backend.ele.com'
 # 会员端地址

+ 25 - 0
src/lang/en.js

@@ -89,6 +89,31 @@ export default {
     shopFlowRemainPv:'Remain BV Flow',
     shopRemainPv:'Remain BV',
     shopOrderlList:'Order list',
+    moveNetworkManagement:'Move Network Management',
+    memberLevelAdjustmentList:'Member Level Adjustment List',
+    modifyStockistLevel:'Modify Stockist Level',
+    metaPeriod:'Closure',
+    metaBalanceList:'Member bonus balance',
+    metaOtherPeriodBonus:'Member bonus',
+    metaFlowBonus:'Bonus flow',
+    metaUserPerf:'Member performance',
+    metaPerfOrder:'Sales Record',
+    metaPerfPeriodList:'Period performance',
+    metaPerfMonth:'Monthly performance',
+    metaPerfAdjustment:'Adjust Performance',
+    metaArticleIndex:'Article Management',
+    metaArticleEdit:'Edit category',
+    metaArticleAdd:'New category',
+    metaAdLocation:'Ad',
+    metaAdList:'Ad List',
+    metaAdEdit:'Ad Edit',
+    metaAdAdd:'Ad Add',
+    metaFileExport:'Export file',
+    metaAdminLogin:'管理员登录日志',
+    metaUserLogin:'Member login log',
+    metaAdminHandle:'管理员操作日志',
+    metaUserHandle:'Member operation log',
+    metaSystemLog:'系统日志',
   },
   navbar: {
     dashboard: 'Dashboard',

+ 25 - 0
src/lang/zh.js

@@ -89,6 +89,31 @@ export default {
     shopFlowRemainPv:'剩余BV流水',
     shopRemainPv:'剩余BV',
     shopOrderlList:'订单列表',
+    moveNetworkManagement:'移网管理',
+    memberLevelAdjustmentList:'会员级别调整列表',
+    modifyStockistLevel:'修改报单中心级别',
+    metaPeriod:'封期管理',
+    metaBalanceList:'会员账户余额',
+    metaOtherPeriodBonus:'往期奖金',
+    metaFlowBonus:'奖金流水',
+    metaUserPerf:'用户业绩',
+    metaPerfOrder:'业绩单',
+    metaPerfPeriodList:'期业绩',
+    metaPerfMonth:'月业绩',
+    metaPerfAdjustment:'调整业绩',
+    metaArticleIndex:'文章管理',
+    metaArticleEdit:'编辑',
+    metaArticleAdd:'添加',
+    metaAdLocation:'广告管理',
+    metaAdList:'广告列表',
+    metaAdEdit:'编辑广告',
+    metaAdAdd:'添加广告',
+    metaFileExport:'导出文件',
+    metaAdminLogin:'管理员登录日志',
+    metaUserLogin:'会员登录日志',
+    metaAdminHandle:'管理员操作日志',
+    metaUserHandle:'会员操作日志',
+    metaSystemLog:'系统日志',
   },
   navbar: {
     dashboard: '首页',

+ 1 - 1
src/permission.js

@@ -21,7 +21,7 @@ router.beforeEach(async(to, from, next) => {
   if (hasToken) {
     if (to.path === '/login') {
       // if is logged in, redirect to the home page
-      next({ path: '/' })
+      next({ path: '/dashboard/index' })
       NProgress.done() // hack: https://github.com/PanJiaChen/vue-element-admin/pull/2939
     } else {
       // determine whether the user has obtained his permission roles through getInfo

+ 28 - 24
src/router/index.js

@@ -37,6 +37,10 @@ import configRouter from '@/router/modules/config'
  * all roles can be accessed
  */
 export const constantRoutes = [
+  {
+    path: '/', 
+    redirect: '/login'
+  },
   {
     path: '/redirect',
     component: Layout,
@@ -239,9 +243,9 @@ export const constantRoutes = [
     hidden: true
   },
   {
-    path: '/',
+    path: '/dashboard',
     component: Layout,
-    redirect: '/dashboard',
+    redirect: '/dashboard/index',
     children: [
       {
         path: '/dashboard/index',
@@ -318,27 +322,27 @@ export const asyncRoutes = [
         path: 'location',
         component: () => import('@/views/ad/index'),
         name: 'ad-location',
-        meta: { title: 'adLocation', icon: 'user', noCache: true }
+        meta: { title: 'metaAdLocation', icon: 'user', noCache: true }
       },
       {
         path: 'list/:ID(\\w+)',
         component: () => import('@/views/ad/list'),
         name: 'ad-list',
-        meta: { title: 'adList', noCache: true, activeMenu: '/ad/location' },
+        meta: { title: 'metaAdList', noCache: true, activeMenu: '/ad/location' },
         hidden: true
       },
       {
         path: 'edit/:ID(\\w+)',
         component: () => import('@/views/ad/edit'),
         name: 'ad-edit',
-        meta: { title: 'adEdit', noCache: true, activeMenu: '/ad/location' },
+        meta: { title: 'metaAdEdit', noCache: true, activeMenu: '/ad/location' },
         hidden: true
       },
       {
         path: 'add',
         component: () => import('@/views/ad/edit'),
         name: 'ad-add',
-        meta: { title: 'adAdd', noCache: true, activeMenu: '/ad/location' },
+        meta: { title: 'metaAdAdd', noCache: true, activeMenu: '/ad/location' },
         hidden: true
       }
     ]
@@ -353,31 +357,31 @@ export const asyncRoutes = [
         path: 'admin-login',
         component: () => import('@/views/log/admin-login'),
         name: 'admin-login',
-        meta: { title: 'admin-login', icon: 'user', noCache: true }
+        meta: { title: 'metaAdminLogin', icon: 'user', noCache: true }
       },
       {
         path: 'user-login',
         component: () => import('@/views/log/user-login'),
         name: 'user-login',
-        meta: { title: 'user-login', icon: 'user', noCache: true }
+        meta: { title: 'metaUserLogin', icon: 'user', noCache: true }
       },
       {
         path: 'admin-handle',
         component: () => import('@/views/log/admin-handle'),
         name: 'admin-handle',
-        meta: { title: 'admin-handle', icon: 'user', noCache: true }
+        meta: { title: 'metaAdminHandle', icon: 'user', noCache: true }
       },
       {
         path: 'user-handle',
         component: () => import('@/views/log/user-handle'),
         name: 'user-handle',
-        meta: { title: 'user-handle', icon: 'user', noCache: true }
+        meta: { title: 'metaUserHandle', icon: 'user', noCache: true }
       },
       {
         path: 'system',
         component: () => import('@/views/log/system'),
         name: 'system',
-        meta: { title: 'system', icon: 'user', noCache: true }
+        meta: { title: 'metaSystemLog', icon: 'user', noCache: true }
       }
     ]
   },
@@ -397,20 +401,20 @@ export const asyncRoutes = [
         path: 'index',
         component: () => import('@/views/article/index'),
         name: 'index',
-        meta: { title: 'index', icon: 'user', noCache: true }
+        meta: { title: 'metaArticleIndex', icon: 'user', noCache: true }
       },
       {
         path: 'edit/:ID(\\w+)',
         component: () => import('@/views/article/edit'),
         name: 'edit',
-        meta: { title: 'edit', noCache: true },
+        meta: { title: 'metaArticleEdit', noCache: true },
         hidden: true
       },
       {
         path: 'add',
         component: () => import('@/views/article/edit'),
         name: 'add',
-        meta: { title: 'edit', noCache: true },
+        meta: { title: 'metaArticleAdd', noCache: true },
         hidden: true
       }
     ]
@@ -425,7 +429,7 @@ export const asyncRoutes = [
         path: 'export',
         component: () => import('@/views/file/export'),
         name: 'export',
-        meta: { title: 'export', noCache: true }
+        meta: { title: 'metaFileExport', noCache: true }
       }
     ]
   },
@@ -439,55 +443,55 @@ export const asyncRoutes = [
         path: 'period',
         component: () => import('@/views/bonus/period'),
         name: 'period',
-        meta: { title: 'period', noCache: true }
+        meta: { title: 'metaPeriod', noCache: true }
       },
       {
         path: 'balance-list',
         component: () => import('@/views/bonus/balance-list'),
         name: 'balance-list',
-        meta: { title: 'balance-list', noCache: true }
+        meta: { title: 'metaBalanceList', noCache: true }
       },
       {
         path: 'other-period-bonus',
         component: () => import('@/views/bonus/other-period-bonus'),
         name: 'other-period-bonus',
-        meta: { title: 'other-period-bonus', noCache: true }
+        meta: { title: 'metaOtherPeriodBonus', noCache: true }
       },
       {
         path: 'flow-bonus',
         component: () => import('@/views/bonus/flow-bonus'),
         name: 'flow-bonus',
-        meta: { title: 'flow-bonus', noCache: true }
+        meta: { title: 'metaFlowBonus', noCache: true }
       },
       {
         path: 'user-perf',
         component: () => import('@/views/bonus/user-perf'),
         name: 'user-perf',
-        meta: { title: 'user-perf', noCache: true }
+        meta: { title: 'metaUserPerf', noCache: true }
       },
       {
         path: 'perf-order',
         component: () => import('@/views/bonus/perf-order'),
         name: 'perf-order',
-        meta: { title: 'perf-order', noCache: true }
+        meta: { title: 'metaPerfOrder', noCache: true }
       },
       {
         path: 'perf-period-list',
         component: () => import('@/views/bonus/perf-period-list'),
         name: 'perf-period-list',
-        meta: { title: 'perf-period-list', noCache: true }
+        meta: { title: 'metaPerfPeriodList', noCache: true }
       },
       {
         path: 'perf-month',
         component: () => import('@/views/bonus/perf-month'),
         name: 'perf-month',
-        meta: { title: 'perf-month', noCache: true }
+        meta: { title: 'metaPerfMonth', noCache: true }
       },
       {
         path: 'perf-adjustment',
         component: () => import('@/views/bonus/perf-adjustment'),
         name: 'perf-adjustment',
-        meta: { title: 'perf-adjustment', noCache: true }
+        meta: { title: 'metaPerfAdjustment', noCache: true }
       }
     ]
   },

+ 3 - 3
src/router/modules/member.js

@@ -28,19 +28,19 @@ const memberRouter = {
       path: 'move', // 会员移网
       component: () => import('@/views/user/member-network-move'),
       name: 'memberNetworkMove',
-      meta: { title: 'Move Network Management', icon: 'el-icon-user-solid' }
+      meta: { title: 'moveNetworkManagement', icon: 'el-icon-user-solid' }
     },
     {
       path: 'dec-level-list', // 会员等级调整
       component: () => import('@/views/user/dec-level-list'),
       name: 'decLevelList',
-      meta: { title: 'Member Level Adjustment List', icon: 'el-icon-user-solid' }
+      meta: { title: 'memberLevelAdjustmentList', icon: 'el-icon-user-solid' }
     },
     {
       path: 'change-user-dec-role', // 修改报单中心级别
       component: () => import('@/views/user/modify-stockist-level'),
       name: 'modifyStockistLevel',
-      meta: { title: 'Modify Stockist Level', icon: 'el-icon-user-solid' }
+      meta: { title: 'modifyStockistLevel', icon: 'el-icon-user-solid' }
     },
   ]
 }

+ 1 - 1
vue.config.js

@@ -39,7 +39,7 @@ module.exports = {
     },
     proxy: {
       [process.env.VUE_APP_BASE_API]:{
-        target:"http://172.21.141.111:9970",
+        target:"http://172.19.234.110:9970",
         changeOrigin:true,
         pathRewrite:{
           ["^" + process.env.VUE_APP_BASE_API] : ""