收藏
回答

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

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

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

2 个回答

  • 九歌^
    九歌^
    2020-04-03

    jsonstringify转下。

    2020-04-03
    有用
    回复 6
    • 2020-04-03
      不行,报错了
      2020-04-03
      回复
    • 九歌^
      九歌^
      2020-04-03回复
      你贴下数组
      2020-04-03
      回复
    • 2020-04-03回复九歌^
      2020-04-03
      回复
    • 九歌^
      九歌^
      2020-04-03回复
      贴出来。。。你贴截图 我咋操作。。。
      2020-04-03
      回复
    • 2020-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"}]
      2020-04-03
      回复
    查看更多(1)
  • 默
    2020-04-03

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

    2020-04-03
    有用
    回复 5
    • 2020-04-03
      把数组转成字符串拼接到路径后面会报错
      2020-04-03
      回复
    • 默
      2020-04-03回复
      你需要先转换成数组然后再转换成字符传过去
      2020-04-03
      回复
    • 2020-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"}]
      2020-04-03
      1
      回复
    • 2020-04-03回复
      2020-04-03
      回复
    • 默
      2020-04-03回复
      H5获取页以后你怎么转换的数据使用的RequestBody?
      2020-04-03
      回复
登录 后发表内容
问题标签