【bug】uniapp 微信小程序跳转携带参数路径不完整
·
`/pages/petservices/service?goods=${JSON.stringify(goods)}`
页面跳转携带参数goods,数据格式如下
{
id: 商品id,
title: 商品标题,
image: 商品图片,
price: 商品价格
}
图片路径如下:
https://服务器地址?url=https://服务器地址完整图片路径
导致传参错误
解决方法
`/pages/petservices/service?goods=${encodeURIComponent(JSON.stringify(goods))}`
更多推荐


所有评论(0)