mirror of
https://gitee.com/beijing_hongye_huicheng/lilishop-ui.git
synced 2026-11-11 03:18:56 +08:00
fix(seller): 裁剪userInfoSeller存储字段,避免Cookie超限导致登录卡死
This commit is contained in:
@@ -30,6 +30,27 @@ const STATIC_ROUTE_NAMES = new Set([
|
||||
|
||||
util.dynamicRouteNames = [];
|
||||
|
||||
/**
|
||||
* 提取商家端会话必需的基础展示字段,避免超长经营范围或入驻详情导致 Cookie 超限
|
||||
*
|
||||
* @param {Object} raw 商家信息对象
|
||||
* @returns {Object} 核心会话档案对象
|
||||
*/
|
||||
util.pickSellerProfile = function (raw) {
|
||||
if (!raw) return {};
|
||||
return {
|
||||
id: raw.id,
|
||||
storeId: raw.storeId || raw.id,
|
||||
storeName: raw.storeName,
|
||||
storeLogo: raw.storeLogo,
|
||||
nickName: raw.nickName,
|
||||
storeDisable: raw.storeDisable,
|
||||
serviceScore: raw.serviceScore,
|
||||
deliveryScore: raw.deliveryScore,
|
||||
descriptionScore: raw.descriptionScore,
|
||||
};
|
||||
};
|
||||
|
||||
util.clearDynamicRoutes = function () {
|
||||
util.dynamicRouteNames.forEach((name) => {
|
||||
if (STATIC_ROUTE_NAMES.has(name)) {
|
||||
|
||||
Reference in New Issue
Block a user