weex跳weex传参,以及weex的h5页面之间传参?

看demo里注释说是通过

render(String template, Map<String, Object> options, String jsonInitData, WXRenderStrategy flag) 

   * @param options  os   iphone/android/ipad
   * @param jsonInitData Initial data for rendering

问题1:opteions传Map,可以通过weex.config取得。但jsonInitData是要传怎样的String才能正确地在data里读取?

问题2:opteions和jsonInitData在H5跳转H5过程中怎么传过去?


凤凰求蛊
浏览 1389回答 2
2回答

慕桂英3389331

web端用vue-router做SPA,传参自然很方便。native端你则需要weex-vue-router,使用navigator跳转,能像vue-router一样的跳转、传参、取参。

江户川乱折腾

web页面直接传参,post或者get吧,目前navigator是不支持web页面直接直接传参的。native你可以自己处理一下,当然jsonInitData,我也不是很了解他的作用,期待其他大神前来讲解。
打开App,查看更多内容
随时随地看视频慕课网APP