"filter": "ud_id in(\"0601C02\")" 筛选条件这样固定时,可以修改地点云数据
下面这种方法不能修改地点云数据:
savelocal:function(){
var a= '"ud_id in(\\"'
var b= "0601C02"
var c= '\\")"'
wx.request({
method:'POST',
url:'https://apis.map.qq.com/place_cloud/data/update',
data:{
"key":"XXXX",
"table_id":"XXXX",
"data":
{
"location":{
"lat":23.122,
"lng":113.4
},
"x":{
"f2":'11123df11d', //名称
}
},
"filter":a+b+c
//"filter": "ud_id in(\"0601C02\")"
},
success: (res) => {
console.log(res)
console.log(a+b+c)
}
})
}
const a = 'ud_id in(\"'
const b = "0601C02"
const c = '\")'
今天我自己解决了,上面代码中把头尾的 " 去掉就好了。献给跟我一样的菜鸟借鉴