First declare an array
let goodsIdlist=[]
Then we need to traverse the js page through jQuery and add it
shoplist.map(element=>{
goodsIdlist.push(element.goodsId)
})
this.setData({
goodsIdlist:goodsIdlist
})
Then split by join
console.log(goodsIdlist.join(","))
Then you can get the product id of the string