From 5d36e1f987ef21e44ded2e8a1d06c28094ec1e76 Mon Sep 17 00:00:00 2001
From: baoshiwei <baoshiwei@shlanbao.cn>
Date: 星期六, 19 四月 2025 12:39:47 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 zhitan-vue/src/permission.js |   18 ++++++++++++++----
 1 files changed, 14 insertions(+), 4 deletions(-)

diff --git a/zhitan-vue/src/permission.js b/zhitan-vue/src/permission.js
index 7fc2c80..b83f732 100644
--- a/zhitan-vue/src/permission.js
+++ b/zhitan-vue/src/permission.js
@@ -12,7 +12,7 @@
 
 NProgress.configure({ showSpinner: false });
 
-const whiteList = ['/login', '/register', '/energy']
+const whiteList = ['/login', '/register', '/energy','/social-callback']
 
 /**
  * 鏌ユ壘鏈�娣卞眰鐨勫瓙鑿滃崟骞舵瀯寤哄畬鏁磋矾寰�
@@ -35,9 +35,16 @@
     
     // 璺宠繃ParentView绫诲瀷鐨勪腑闂磋妭鐐�
     if (firstChild.component === 'ParentView' || 
-        (typeof firstChild.component === 'object' && firstChild.component.name === 'ParentView')) {
+        (typeof firstChild.component === 'object' && 
+         firstChild.component.name === 'ParentView')) {
       currentNode = firstChild;
-      pathSegments.push(firstChild.path);
+      // 濡傛灉璺緞涓嶆槸浠�/寮�澶达紝鍒欐坊鍔犲埌璺緞鐗囨涓�
+      if (!firstChild.path.startsWith('/')) {
+        pathSegments.push(firstChild.path);
+      } else {
+        // 濡傛灉鏄粷瀵硅矾寰勶紝鍒欐浛鎹箣鍓嶆墍鏈夎矾寰�
+        pathSegments = [firstChild.path];
+      }
       continue;
     }
     
@@ -72,7 +79,10 @@
       } else if (index === 0) {
         return segment;
       } else {
-        return `${fullPath}/${segment}`;
+        // 纭繚璺緞涔嬮棿涓嶄細鍑虹幇閲嶅鐨勬枩鏉�
+        const base = fullPath.endsWith('/') ? fullPath.slice(0, -1) : fullPath;
+        const part = segment.startsWith('/') ? segment : '/' + segment;
+        return `${base}${part}`;
       }
     });
   }

--
Gitblit v1.9.3