feiyu02
2025-10-20 dd2ff26f240bcb79de082f1de4eaf6d2c973b28e
1
2
3
4
5
6
7
8
9
10
11
12
13
const START_STR = '##';
const SPLIT_STR = '&&';
const END_STR = '%%';
 
export default {
  parseMsg(data) {
    const [type, content] = data
      .substring(START_STR.length, data.length - END_STR.length)
      .split(SPLIT_STR);
 
    return { type, content };
  }
};