diff --git a/src/renderer/utils/musicSdk/wy/comment.js b/src/renderer/utils/musicSdk/wy/comment.js index e86e7301..64082281 100644 --- a/src/renderer/utils/musicSdk/wy/comment.js +++ b/src/renderer/utils/musicSdk/wy/comment.js @@ -2,6 +2,74 @@ import { httpFetch } from '../../request' import { weapi } from './utils/crypto' import { dateFormat2 } from '../../index' +const emojis = [ + ['倧笑', 'πŸ˜ƒ'], + ['可爱', '😊'], + ['憨笑', '☺️'], + ['色', '😍'], + ['δΊ²δΊ²', 'πŸ˜™'], + ['ζƒŠζ', '😱'], + ['桁ζ³ͺ', '😭'], + ['δΊ²', '😚'], + ['呆', '😳'], + ['ε“€δΌ€', 'πŸ˜”'], + ['呲牙', '😁'], + ['吐舌', '😝'], + ['ζ’‡ε˜΄', 'πŸ˜’'], + ['ζ€’', '😑'], + ['ε₯Έη¬‘', '😏'], + ['ζ±—', 'πŸ˜“'], + ['痛苦', 'πŸ˜–'], + ['惢恐', '😰'], + ['η”Ÿη—…', '😨'], + ['口罩', '😷'], + ['ε€§ε“­', 'πŸ˜‚'], + ['ζ™•', '😡'], + ['发怒', 'πŸ‘Ώ'], + ['εΌ€εΏƒ', 'πŸ˜„'], + ['ι¬Όθ„Έ', '😜'], + ['ηš±ηœ‰', '😞'], + ['ζ΅ζ„Ÿ', '😒'], + ['ηˆ±εΏƒ', '❀️'], + ['εΏƒη’Ž', 'πŸ’”'], + ['ι’Ÿζƒ…', 'πŸ’˜'], + ['星星', '⭐️'], + ['η”Ÿζ°”', 'πŸ’’'], + ['δΎΏδΎΏ', 'πŸ’©'], + ['εΌΊ', 'πŸ‘'], + ['εΌ±', 'πŸ‘Ž'], + ['ζ‹œ', 'πŸ™'], + ['牡手', 'πŸ‘«'], + ['跳舞', 'πŸ‘―β€β™€οΈ'], + ['禁歒', 'πŸ™…β€β™€οΈ'], + ['θΏ™θΎΉ', 'πŸ’β€β™€οΈ'], + ['ηˆ±ζ„', 'πŸ’'], + ['瀺爱', 'πŸ‘©β€β€οΈβ€πŸ‘¨'], + ['ε˜΄ε”‡', 'πŸ‘„'], + ['η‹—', '🐢'], + ['猫', '🐱'], + ['ηŒͺ', '🐷'], + ['兔子', '🐰'], + ['小鸑', '🐀'], + ['ε…¬ιΈ‘', 'πŸ”'], + ['幽灡', 'πŸ‘»'], + ['圣诞', 'πŸŽ…'], + ['ε€–ζ˜Ÿ', 'πŸ‘½'], + ['ι’»ηŸ³', 'πŸ’Ž'], + ['瀼物', '🎁'], + ['η”·ε­©', 'πŸ‘¦'], + ['ε₯³ε­©', 'πŸ‘§'], + ['蛋糕', 'πŸŽ‚'], + ['18', 'πŸ”ž'], + ['圈', 'β­•'], + ['叉', '❌'], +] + +const applyEmoji = text => { + for (const e of emojis) text = text.replaceAll(`[${e[0]}]`, e[1]) + return text +} + let cursorTools = { cache: {}, getCursor(id, page, limit) { @@ -111,7 +179,7 @@ export default { return rawList.map(item => { let data = { id: item.commentId, - text: item.content ? item.content.split('\n') : '', + text: item.content ? applyEmoji(item.content).split('\n') : '', time: item.time ? item.time : '', timeStr: item.time ? dateFormat2(item.time) : '', userName: item.user.nickname, @@ -126,7 +194,7 @@ export default { ? { id: item.commentId, rootId: replyData.beRepliedCommentId, - text: replyData.content ? replyData.content.split('\n') : '', + text: replyData.content ? applyEmoji(replyData.content).split('\n') : '', time: item.time, timeStr: null, userName: replyData.user.nickname,