小程序模板消息color属性
发布于 6 年前 作者 xiuying46 11664 次浏览 来自 问答
  • 当前 Bug 的表现(可附上截图)

通过data中设置的color属性未起作用,模板消息中的字体颜色仍然为黑色

  • 预期表现

应该为data中设置的颜色

  • 复现路径
  • 提供一个最简复现 Demo

var url = https://api.weixin.qq.com/cgi-bin/message/wxopen/template/send?access_token= + access_token

var jsondata = {

“touser”: openid,

“template_id”: “V__hBaKJtbbq8pJ6NpNNy6mI4VZzzNTOTPfS-WQ3RIw”,

“page”: “/pages/userinfo/userinfo”,

“form_id”: formid,

“data”: {

“keyword1”: {

“value”: app.globalData.personInfo.nickName,

“color”:“red”

},

“keyword2”: {

“value”: subscribeHd.subscribedate + " " + time,

“color”: “#173177”

},

“keyword3”: {

“value”: ServerType,

“color”: “#173177”

},

}

};

wx.request({

url: url,

data: jsondata,

method: ‘POST’,

success: function (res) {

console.log(“push msg”);

console.log(res);

},

fail: function (err) {

// fail

console.log(“push err”)

console.log(err);

}

});

回到顶部