|
@@ -14,7 +14,13 @@
|
|
|
<img src="/src/assets/image/news.png" alt="">
|
|
|
</div>
|
|
|
<div class="flex-1">
|
|
|
- <div class="text-size-in text-[#000]">{{ item.msg }}</div>
|
|
|
+ <div class="text-size-in text-[#000]">
|
|
|
+ <!-- {{ item.msg }} -->
|
|
|
+ {{ item.msgTextList[0] || '' }}
|
|
|
+ <TranslationComponent :openId="item.msgTextList[1]" v-if="(item.msgTextList || []).length > 1">
|
|
|
+ </TranslationComponent>
|
|
|
+ {{ item.msgTextList[2] || '' }}
|
|
|
+ </div>
|
|
|
<div class="text-[#B9B9B9]">{{ item.timeStr }}</div>
|
|
|
</div>
|
|
|
<van-icon name="arrow" color="#D4D4D4" size="1.2rem" />
|
|
@@ -49,9 +55,12 @@ const messageList = ref([]);
|
|
|
function getMessageList() {
|
|
|
requests.post(GET_MESSAGE_LIST, {}).then(({ data = [] }) => {
|
|
|
messageList.value = (data || []).map(item => {
|
|
|
+ let str = item.msg || ''
|
|
|
+ let arr = str.split(/\$|=/).filter((item) => item && item !== 'username');
|
|
|
return {
|
|
|
...item,
|
|
|
- timeStr: dayjs(item.time).format('YYYY-MM-DD HH:mm')
|
|
|
+ timeStr: dayjs(item.time).format('YYYY-MM-DD HH:mm'),
|
|
|
+ msgTextList: arr || []
|
|
|
}
|
|
|
})
|
|
|
userInfo.updateState({
|