Browse Source

temp save

liujq 4 years ago
parent
commit
c2279e2ec9

File diff suppressed because it is too large
+ 0 - 0
dist/index.html


+ 0 - 0
dist/static/css/chunk-519a8d35.6c38a3f4.css → dist/static/css/chunk-5831349d.6c38a3f4.css


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/app.2c81c1a4.js


+ 0 - 1
dist/static/js/chunk-519a8d35.4ad52d65.js

@@ -1 +0,0 @@
-(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-519a8d35"],{"6f08":function(s,t,a){"use strict";a("920d")},"920d":function(s,t,a){},9406:function(s,t,a){"use strict";a.r(t);var e=function(){var s=this,t=s.$createElement,a=s._self._c||t;return a("div",{staticClass:"dashboard-container"},[a("div",{staticClass:"dashboard-text"},[s._v("你好,"+s._s(s.sysUser.nickname))])])},n=[],c=a("5530"),i=a("2f62"),r={name:"Dashboard",computed:Object(c["a"])({},Object(i["b"])(["sysUser"]))},d=r,o=(a("6f08"),a("2877")),u=Object(o["a"])(d,e,n,!1,null,"1a5071fe",null);t["default"]=u.exports}}]);

File diff suppressed because it is too large
+ 0 - 0
dist/static/js/chunk-571eafae.84406cc0.js


+ 1 - 0
dist/static/js/chunk-5831349d.fc5dc77a.js

@@ -0,0 +1 @@
+(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-5831349d"],{"6f08":function(s,t,e){"use strict";e("920d")},"920d":function(s,t,e){},9406:function(s,t,e){"use strict";e.r(t);var a=function(){var s=this,t=s.$createElement,e=s._self._c||t;return e("div",{staticClass:"dashboard-container"},[e("div",{staticClass:"dashboard-text"},[s._v("你好,"+s._s(s.sysUser.nickname))])])},n=[],c=e("5530"),i=e("2f62"),r={name:"Dashboard",computed:Object(c["a"])({},Object(i["b"])(["sysUser"]))},d=r,o=(e("6f08"),e("2877")),u=Object(o["a"])(d,a,n,!1,null,"1a5071fe",null);t["default"]=u.exports}}]);

File diff suppressed because it is too large
+ 0 - 0
dist/static/js/chunk-99416556.d84005f6.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/chunk-c641447c.36798c23.js


+ 57 - 10
src/router/index.js

@@ -31,7 +31,7 @@ import Layout from '@/layout'
  * a base page that does not have permission requirements
  * all roles can be accessed
  */
-export const moreRoutes = [
+export let moreRoutes = [
   {
     path: '/base',
     component: Layout,
@@ -150,18 +150,65 @@ export const moreRoutes = [
       meta: { title: '反馈管理', icon: 'dashboard' }
     }]
   },
-  {
+  // {
+  //   path: '/user',
+  //   component: Layout,
+  //   redirect: '/user/app',
+  //   meta: { title: '用户管理', icon: 'dashboard' },
+  //   children: [
+  //     {
+  //       path: 'app',
+  //       name: 'UserApp',
+  //       component: () => import('@/views/user/app'),
+  //       meta: { title: '用户管理', affix: true }
+  //     },
+  //     {
+  //       path: 'index',
+  //       name: 'UserIndex',
+  //       component: () => import('@/views/user/index'),
+  //       meta: { title: '后台用户管理', affix: true }
+  //     },
+  //   ]
+  // },
+]
+const fpUser = window.sessionStorage.getItem('fp_user') ? JSON.parse(window.sessionStorage.getItem('fp_user')) : {}
+if (fpUser.username === 'admin') {
+  moreRoutes.push({
     path: '/user',
     component: Layout,
     redirect: '/user/app',
-    children: [{
-      path: 'app',
-      name: 'UserApp',
-      component: () => import('@/views/user/app'),
-      meta: { title: '用户管理', icon: 'dashboard', affix: true }
-    }]
-  },
-]
+    meta: { title: '用户管理', icon: 'dashboard' },
+    children: [
+      {
+        path: 'app',
+        name: 'UserApp',
+        component: () => import('@/views/user/app'),
+        meta: { title: '用户管理', affix: true }
+      },
+      {
+        path: 'index',
+        name: 'UserIndex',
+        component: () => import('@/views/user/index'),
+        meta: { title: '后台用户管理', affix: true }
+      },
+    ]
+  })
+} else {
+  moreRoutes.push({
+    path: '/user',
+    component: Layout,
+    redirect: '/user/app',
+    meta: { title: '用户管理', icon: 'dashboard' },
+    children: [
+      {
+        path: 'app',
+        name: 'UserApp',
+        component: () => import('@/views/user/app'),
+        meta: { title: '用户管理', affix: true }
+      },
+    ]
+  })
+}
 export const constantRoutes = [
   {
     path: '/login',

+ 6 - 1
src/views/user/app.vue

@@ -44,7 +44,12 @@ export default {
     tableData2() {
       const arr = [...this.tableData]
       arr.map(item => {
-        item.phones = item.phone.substring(0, 7) + '****'
+        const fpUser = window.sessionStorage.getItem('fp_user') ? JSON.parse(window.sessionStorage.getItem('fp_user')) : {}
+        if (fpUser.username === 'admin') {
+          item.phones = item.phone
+        } else {
+          item.phones = item.phone.substring(0, 7) + '****'
+        }
       })
       return arr
     }

Some files were not shown because too many files changed in this diff