收藏
回答

小程序web-view怎么传数组给h5页面?

小程序web-view怎么传数组给h5页面?有大佬指点一下吗,很急

回答关注问题邀请回答
收藏

2 个回答

  • 胖丫么胖
    胖丫么胖
    04-03

    jsonstringify转下。

    04-03
    有用
    回复 6
    • Akuma
      Akuma
      04-03
      不行,报错了
      04-03
      回复
    • 胖丫么胖
      胖丫么胖
      04-03回复Akuma
      你贴下数组
      04-03
      回复
    • Akuma
      Akuma
      04-03回复胖丫么胖
      04-03
      回复
    • 胖丫么胖
      胖丫么胖
      04-03回复Akuma
      贴出来。。。你贴截图 我咋操作。。。
      04-03
      回复
    • Akuma
      Akuma
      04-03
      [{"onlinePrice":"35.0","buyCount":"1","cartId":"oJCcxpkUTfpSxfbF","storeId":"062fbece-a239-11e8-8305-5254000bcdd0","storeCode":32200,"storeName":"珠海市绿惠康医药有限公司","productId":"FZ88bWfPEQxsvGXC","memberId":"nbloCPdtOfPGxwv0","productPic":"/statics/images/b2cDirect/detialpop_img_qs.png"},{"onlinePrice":"35.0","buyCount":"20","cartId":"ZB5wGGnvHv5P3xIH","storeId":"062fbece-a239-11e8-8305-5254000bcdd0","storeCode":32200,"storeName":"珠海市绿惠康医药有限公司","productId":"FZ88bWfPEQxsvGXC","memberId":"nbloCPdtOfPGxwv0","productPic":"/statics/images/b2cDirect/detialpop_img_qs.png"}]
      04-03
      回复
    查看更多(1)
  • 默认²⁰²⁰
    默认²⁰²⁰
    04-03

    通过webview的路径后面传过去 1.先把数组转换成字符串 2.H5获得以后转回回来就行了

    04-03
    有用
    回复 5
    • Akuma
      Akuma
      04-03
      把数组转成字符串拼接到路径后面会报错
      04-03
      回复
    • 默认²⁰²⁰
      默认²⁰²⁰
      04-03回复Akuma
      你需要先转换成数组然后再转换成字符传过去
      04-03
      回复
    • Akuma
      Akuma
      04-03
      [{"onlinePrice":"35.0","buyCount":"1","cartId":"oJCcxpkUTfpSxfbF","storeId":"062fbece-a239-11e8-8305-5254000bcdd0","storeCode":32200,"storeName":"珠海市绿惠康医药有限公司","productId":"FZ88bWfPEQxsvGXC","memberId":"nbloCPdtOfPGxwv0","productPic":"/statics/images/b2cDirect/detialpop_img_qs.png"},{"onlinePrice":"35.0","buyCount":"20","cartId":"ZB5wGGnvHv5P3xIH","storeId":"062fbece-a239-11e8-8305-5254000bcdd0","storeCode":32200,"storeName":"珠海市绿惠康医药有限公司","productId":"FZ88bWfPEQxsvGXC","memberId":"nbloCPdtOfPGxwv0","productPic":"/statics/images/b2cDirect/detialpop_img_qs.png"}]
      04-03
      1
      回复
    • Akuma
      Akuma
      04-03回复默认²⁰²⁰
      04-03
      回复
    • 默认²⁰²⁰
      默认²⁰²⁰
      04-03回复Akuma
      H5获取页以后你怎么转换的数据使用的RequestBody?
      04-03
      回复
登录 后发表内容
问题标签