From 40aa088ad24aa90e59dd15280a9b96e48265a09d Mon Sep 17 00:00:00 2001
From: liu <2021943741@qq.com>
Date: 星期三, 30 九月 2026 15:57:28 +0800
Subject: [PATCH] fix(wxcp): 修复活动封面编辑后丢失

---
 src/views/_core/profile/modules/user-social.vue |   12 +++++++-----
 1 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/src/views/_core/profile/modules/user-social.vue b/src/views/_core/profile/modules/user-social.vue
index 486ccf8..4c96f99 100644
--- a/src/views/_core/profile/modules/user-social.vue
+++ b/src/views/_core/profile/modules/user-social.vue
@@ -5,10 +5,10 @@
 import { computed, onMounted, ref } from 'vue';
 import { useRoute } from 'vue-router';
 
-import { confirm } from '..\..\..\..\packages\effects\common-ui\src';
-import { DICT_TYPE, SystemUserSocialTypeEnum } from '..\..\..\..\packages\constants\src';
-import { getDictLabel } from '..\..\..\..\packages\effects\hooks\src';
-import { getUrlValue } from '..\..\..\..\packages\utils\src';
+import { confirm } from '@vben/common-ui';
+import { DICT_TYPE, SystemUserSocialTypeEnum } from '@vben/constants';
+import { getDictLabel } from '@vben/hooks';
+import { getUrlValue } from '@vben/utils';
 
 import { Button, Card, Image, message } from 'ant-design-vue';
 
@@ -122,7 +122,9 @@
   try {
     // 璁$畻 redirectUri
     // tricky: type 闇�瑕佸厛 encode 涓�娆★紝鍚﹀垯閽夐拤鍥炶皟浼氫涪澶便�傞厤鍚� getUrlValue() 浣跨敤
-    const redirectUri = `${location.origin}/profile?${encodeURIComponent(`type=${type}`)}`;
+    // hash 璺敱锛堢敓浜ф瀯寤猴級涓嬪繀椤诲甫 # 鍓嶇紑锛屽惁鍒欏洖璺冲悗 vue-router 瑙f瀽鍒� /锛岃繘涓嶄簡缁戝畾娴佺▼
+    const hashPrefix = import.meta.env.VITE_ROUTER_HISTORY === 'hash' ? '/#' : '';
+    const redirectUri = `${location.origin}${hashPrefix}/profile?${encodeURIComponent(`type=${type}`)}`;
 
     // 杩涜璺宠浆
     window.location.href = await socialAuthRedirect(type, redirectUri);

--
Gitblit v1.9.3