陈剑华

feat: 17492 功能缺陷-【uat】进入精选评论卡,点击点赞,未变成已点赞

@@ -14,7 +14,8 @@ function persistentStorage(id: string | number, type: 'add' | 'remove' | undefin @@ -14,7 +14,8 @@ function persistentStorage(id: string | number, type: 'add' | 'remove' | undefin
14 } 14 }
15 15
16 function hasClicked(id: string | number) { 16 function hasClicked(id: string | number) {
17 - let clickedIds = AppStorage.get<string>('clickedIds')?.split(',') || []; 17 + let _clickedIds = AppStorage.get<string[]>('clickedIds');
  18 + let clickedIds = _clickedIds?.toString()?.split(',') || [];
18 let index = clickedIds.indexOf(id.toString()) 19 let index = clickedIds.indexOf(id.toString())
19 if (index >= 0) return true; 20 if (index >= 0) return true;
20 return false; 21 return false;