Skip to content

Commit 5fd18ab

Browse files
xiaoxuJacksonTian
authored andcommitted
修复小程序 template URL (#81)
1 parent 13c7564 commit 5fd18ab

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/api_template.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ exports.sendTemplate = async function (openid, templateId, url, topColor, data,
7777

7878
/**
7979
* 发送模板消息支持小程序
80+
* 文档:https://developers.weixin.qq.com/miniprogram/dev/api/notice.html
8081
* Examples:
8182
* ```
8283
* var templateId = '模板id';
@@ -103,7 +104,7 @@ exports.sendTemplate = async function (openid, templateId, url, topColor, data,
103104
*/
104105
exports.sendMiniProgramTemplate = async function (openid, templateId, url, appid, pagepath, data, color) {
105106
const { accessToken } = await this.ensureAccessToken();
106-
var apiUrl = this.prefix + 'message/template/send?access_token=' + accessToken;
107+
var apiUrl = this.prefix + 'message/wxopen/template/send?access_token=' + accessToken;
107108
var template = {
108109
touser: openid,
109110
template_id: templateId,

0 commit comments

Comments
 (0)