uniapp 消息格式问题

uniappDemo 2023-4-3 342

{
    "conversation": {
        "type": 1,
        "conversationType": 1,
        "target": "7j4qmws2k",
        "line": 0
    },
    "from": "w13qmws2k",
    "content": {
        "content": "{\"duration\":1}",
        "extra": "",
        "localMediaPath": "",
        "mediaType": 2,
        "mentionedType": 0,
        "remoteMediaUrl": "https://media.wfcoss.cn/media/dzEzcW13czJr-2-1678692986-9TC1YClI4gG7.mp3",
        "searchableContent": "[语音]",
        "type": 2
    },
    "messageContent": {
        "type": 2,
        "mentionedType": 0,
        "extra": "",
        "remotePath": "https://media.wfcoss.cn/media/dzEzcW13czJr-2-1678692986-9TC1YClI4gG7.mp3",
        "localPath": "",
        "mediaType": 2,
        "duration": 1
    },
    "messageId": 31,
    "direction": 0,
    "status": 1,
    "messageUid": {
        "low": -2076180351,
        "high": 80057122,
        "unsigned": false
    },
    "timestamp": 0,
    "to": "",
    "localExtra": "",
    "sender": "w13qmws2k",
    "serverTime": 1678692986914,
    "_from": {
        "uid": "w13qmws2k",
        "name": "5D5P8L2K",
        "displayName": "用户4813",
        "groupAlias": "",
        "friendAlias": "",
        "gender": 0,
        "portrait": "",
        "mobile": "18282775731",
        "email": "",
        "address": "",
        "social": "",
        "extra": "",
        "type": 0,
        "deleted": 0,
        "updateDt": 1675692723558,
        "company": "",
        "_displayName": "用户4813"
    },
    "_timeStr": ""
}

这是一段代码片段 我想问一下 content和messageContent有什么分别

最新回复 (3)
  • x86 2023-4-3
    引用 2

    messageContent 是从 content 解析得来的,后续可能会将 content 字段删除

  • uniappDemo 2023-4-3
    引用 3
    x86 messageContent 是从 content 解析得来的,后续可能会将 content 字段删除
    就是我用messageContent字段就行了 对吧
  • x86 2023-4-3
    引用 4
    是的
返回