提交 9788cf0b 编写于 作者: DCloud_JSON's avatar DCloud_JSON

修复 移动端,代码类型消息显示问题

上级 ebab8c6c
...@@ -153,7 +153,7 @@ ...@@ -153,7 +153,7 @@
}, },
toCodePage() { toCodePage() {
uni.navigateTo({ uni.navigateTo({
url: '/uni_modules/uni-im/pages/common/view-code-page/view-code-page?code='+ encodeURIComponent(JSON.stringify(this.code)) url: '/uni_modules/uni-im/pages/common/view-code-page/view-code-page?msgId=' + this.msg._id + '&conversationId=' + this.msg.conversation_id
}) })
}, },
trOnclick(e) { trOnclick(e) {
...@@ -244,6 +244,7 @@ ...@@ -244,6 +244,7 @@
} }
.show-full-text { .show-full-text {
margin:0 auto;
font-size: 12px; font-size: 12px;
color: #888; color: #888;
} }
......
...@@ -406,6 +406,7 @@ ...@@ -406,6 +406,7 @@
width: 0; width: 0;
flex-grow: 1; flex-grow: 1;
.msg-content-box { .msg-content-box {
width: 100%;
flex-direction: row; flex-direction: row;
align-items: center; align-items: center;
justify-content: flex-start; justify-content: flex-start;
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
<script> <script>
import uniImCodeView from '@/uni_modules/uni-im/components/uni-im-msg/types/code.vue' import uniImCodeView from '@/uni_modules/uni-im/components/uni-im-msg/types/code.vue'
import uniIm from '@/uni_modules/uni-im/sdk/index.js';
export default { export default {
components: { components: {
uniImCodeView uniImCodeView
...@@ -20,11 +21,11 @@ ...@@ -20,11 +21,11 @@
} }
}, },
onLoad({ onLoad({
code msgId,conversationId
}) { }) {
console.log(code) this.msg = uniIm.conversation.dataList
.find(item => item.id === conversationId)
this.msg.body = JSON.parse(decodeURIComponent(code)); .msgList.find(item => item._id === msgId)
}, },
methods: {} methods: {}
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册