From 25f523addbf06883f35d1c16f42f0ed9ca0ccf82 Mon Sep 17 00:00:00 2001 From: DCloud_JSON Date: Tue, 30 Apr 2024 19:54:02 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20=E7=A7=BB=E5=8A=A8?= =?UTF-8?q?=E7=AB=AF=E4=B8=8D=E8=83=BD=E7=A7=81=E4=BF=A1=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sdk/ext/index.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/sdk/ext/index.js b/sdk/ext/index.js index e9e0c1b..2bcd676 100644 --- a/sdk/ext/index.js +++ b/sdk/ext/index.js @@ -4,9 +4,14 @@ export default { if ($state.isWidescreen) { uni.$emit('uni-im-toChat', param) } else { - let url = '/uni_modules/uni-im/pages/chat/chat?user_id=' + user_id - if (param.source) { - url += '&source=' + decodeURIComponent(JSON.stringify(param.source)) + console.log('uni-im-toChat', param) + let url = '/uni_modules/uni-im/pages/chat/chat?' + for (let key in param) { + let value = param[key] + if (typeof value === 'object') { + value = decodeURIComponent(JSON.stringify(value)) + } + url += key + '=' + param[key] + '&' } uni.navigateTo({url,animationDuration: 300}) } -- GitLab