获取access token后,【疑惑】本地包很小,为什么上传测试,就显示包巨大,导致云测试失败? ...。缓存在本地,自己更新
https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=APPID&secret=APPSECRET表单提交时替换accesstoken
https://api.weixin.qq.com/cgi-bin/message/wxopen/template/send?access_token=ACCESS_TOKEN
表单
js代码
orderSign: function (e) {
var fId = e.detail.formId;
console.log(fId);
var fObj = e.detail.value;
var l = 'https://api.weixin.qq.com/cgi-bin/message/wxopen/template/send?access_token=' + '';
var d = {
touser: '',
template_id: '',
form_id: fId,
page: "index",
data: {
"keyword1": {
"value": fObj.product,
"color": "#4a4a4a"
},
"keyword2": {
"value": fObj.detail,
"color": "#9b9b9b"
},
"keyword3": {
"value": new Date().getDate(),
"color": "#9b9b9b"
},
"keyword4": {
"value": "201612130909",
"color": "#9b9b9b"
},
"keyword5": {
"value": "$300",
"color": "#9b9b9b"
},
"keyword6": {
"value": "$300",
"color": "#9b9b9b"
},
"keyword7": {
"value": "$300",
"color": "#9b9b9b"
},
"keyword8": {
"value": "$300",
"color": "#9b9b9b"
}
},
color: '#ccc',
emphasis_keyword: 'keyword1.DATA'
}
console.log(d)
wx.request({
url: l,
data: d,
method: 'POST',
success: function (res) {
console.log("push msg");
console.log(res);
},
fail: function (err) {
// fail
console.log("push err")
console.log(err);
}
});
}
后台发送模板消息是48001错误,网上找了个demo试验还是错误,求助
本文网址:http://www.91bianli.com/kaifazhinan/73405.html