小程序订阅信息的发送报错47001?

发布于 8 年前作者 fren13017 次浏览最后编辑 8 年前来自 issues

小程序订阅一次性消息,发送报错47001,报错如下:

“data”:{“result”:“{\“errcode\”:47001,\“errmsg\”:\“data format error hint: [nldUWa08713951]\”}”}}

请求参数:

		 $touser = $shop\_member\[<span class="hljs-string">'xwxopenid'</span>\];

		 $template\_id = <span class="hljs-string">'wx4cHI3eQdxEEE1ddvROjP9cHAvYBcoEivcaJkjc7To'</span>
            $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'" 
                      },
                  }
                }'
4 回复
fhu
fhu1 楼6 年前

data format error

数据格式错误,把发送的数据格式发出来看看

linming
linming2 楼6 年前

这变量名字起得。厉害!

xiulanguo
xiulanguo3 楼6 年前

有没有大神看得出来到底问题出在哪吗?心好累

yzhao
yzhao4 楼6 年前

这样写试试,不要拼接json