diff --git a/sheep/api/migration/third.js b/sheep/api/migration/third.js index 0f32c394..e3babc68 100644 --- a/sheep/api/migration/third.js +++ b/sheep/api/migration/third.js @@ -4,9 +4,9 @@ export default { // 微信相关 wechat: { // 小程序订阅消息 - subscribeTemplate: () => + getSubscribeTemplateList: () => request({ - url: '/member/social-user/get-subscribe-template', + url: '/member/social-user/get-subscribe-template-list', method: 'GET', custom: { showError: false, diff --git a/sheep/platform/provider/wechat/miniProgram.js b/sheep/platform/provider/wechat/miniProgram.js index 0ce7dc39..29473786 100644 --- a/sheep/platform/provider/wechat/miniProgram.js +++ b/sheep/platform/provider/wechat/miniProgram.js @@ -164,7 +164,7 @@ const checkUpdate = async (silence = true) => { // 获取订阅消息模板 async function getSubscribeTemplate() { - const { code, data } = await third.wechat.subscribeTemplate(); + const { code, data } = await third.wechat.getSubscribeTemplateList(); if (code === 0) { subscribeEventList = data; } @@ -176,14 +176,14 @@ function subscribeMessage(event) { if (typeof event === 'string') { const temp = subscribeEventList.find(item => item.title.includes(event)); if (temp) { - tmplIds.push(temp.priTmplId); + tmplIds.push(temp.id); } } if (typeof event === 'object') { event.forEach((e) => { const temp = subscribeEventList.find(item => item.title.includes(e)); if (temp) { - tmplIds.push(temp.priTmplId); + tmplIds.push(temp.id); } }); }