小程序订阅一次性消息,发送报错47001,报错如下:
"data":{"result":"{\"errcode\":47001,\"errmsg\":\"data format error hint: [nldUWa08713951]\"}"}}
请求参数:
$touser = $shop_member['xwxopenid'];
$template_id = 'wx4cHI3eQdxEEE1ddvROjP9cHAvYBcoEivcaJkjc7To'
$one '恭喜您获得一笔新的奖励佣金'
$two = $order['pay_money'];
$three = $order['goodsname'];
$four = '请查看详细信息'
$url = 'https://api.weixin.qq.com/cgi-bin/message/subscribe/send?access_token='$access_token;
$data = '{
"touser":"'$touser'",
"template_id":"'$template_id'",
"page": "pages/index/index",
"data": {
"thing1": {
"value":"'$one'"
},
"amount2": {
"value":"'$two'"
},
"thing3": {
"value":"'$three'"
} ,
"thing4": {
"value":"'$four'"
},
}
}'
有没有大神看得出来到底问题出在哪吗?心好累
这变量名字起得。厉害!
这样写试试,不要拼接json
data format error
数据格式错误,把发送的数据格式发出来看看
奖励内容
{{thing1.DATA}}
奖励金额
{{amount2.DATA}}
提现说明
{{thing3.DATA}}
温馨提示
{{thing4.DATA}}