From b8d63989635bc9fb58357f76333796e21409985b Mon Sep 17 00:00:00 2001
From: yangys <y_ys79@sina.com>
Date: 星期六, 13 一月 2024 22:29:17 +0800
Subject: [PATCH] 设备类型管理1

---
 src/permission.js |   46 +---------------------------------------------
 1 files changed, 1 insertions(+), 45 deletions(-)

diff --git a/src/permission.js b/src/permission.js
index 3ca4ac3..0fb9f70 100644
--- a/src/permission.js
+++ b/src/permission.js
@@ -24,51 +24,7 @@
   initApplicationCfg().then(res => {
     console.log(to.path)
     if (getToken().value) {
-      if (store.getters.workshopList.length === 0) {
-        // store.dispatch('GetInfo').then(res => { // 鎷夊彇鐢ㄦ埛淇℃伅
-        //   if (to.path === '/') {
-        //     next('/home')
-        //   }
-        //   // if (to.path !== '/' && res.code === 0) {
-        //   if (res.code === 0) {
-        //     Message({
-        //       message: res.msg,
-        //       type: 'error',
-        //       duration: 3 * 1000
-        //     })
-        //   }
-        //   // if (to.path === '/' && store.getters.workshopList.length > 0) {
-        //   //   next({ path: `/workshop/${store.getters.workshopList[0].workshopId}` })
-        //   // } else
-        //   if (to.path.indexOf('workshop') > -1) {
-        //     // 杞﹂棿
-        //     const workshopIds = store.getters.workshopList.map((item) => item.status.id)
-        //     if (to.params.pid === 'undefined') {
-        //       next('/')
-        //     } else if (workshopIds.indexOf(to.params.pid) > -1) {
-        //       next({ path: `/workshop/${to.params.pid}` })
-        //     } else {
-        //       next({ path: `/workshop/${workshopIds[0]}` })
-        //     }
-        //   } else if (to.path.indexOf('device') > -1) {
-        //     // 璁惧
-        //     const cateIds = store.getters.deviceCategories.map((item) => item.type)
-        //     // console.log(to.params.did)
-        //     if (to.params.did === 'undefined') {
-        //       next('/')
-        //     } else if (cateIds.indexOf(to.params.did) > -1) {
-        //       next({ path: `/device/${to.params.did}` })
-        //     } else {
-        //       next({ path: `/device/${cateIds[0]}` })
-        //     }
-        //   } else {
-        //     next()
-        //   }
-        // })
-        next()
-      } else {
-        next()
-      }
+      next()
     } else {
       if (whiteList.indexOf(to.path) !== -1) {
         next()

--
Gitblit v1.9.3