diff --git a/sdk/ext/index.js b/sdk/ext/index.js index e9e0c1bebe4a3023cff774ffb5efc01690d19d06..2bcd6768c862416f35cea13c3d65a8bc35f85705 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}) }