From a2b0942d88d39df6df52560b9a0154fa8786d0ff Mon Sep 17 00:00:00 2001 From: puhui999 Date: Thu, 25 Jul 2024 17:40:29 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E4=BC=98=E5=8C=96=E3=80=91=E6=A0=B9?= =?UTF-8?q?=E6=8D=AE=E4=BB=A3=E7=A0=81=E8=AF=84=E5=AE=A1=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E5=B0=8F=E7=A8=8B=E5=BA=8F=E7=9A=84=E8=AE=A2=E9=98=85=E6=B6=88?= =?UTF-8?q?=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sheep/api/migration/third.js | 4 ++-- sheep/platform/provider/wechat/miniProgram.js | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/sheep/api/migration/third.js b/sheep/api/migration/third.js index 0f32c39..e3babc6 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 0ce7dc3..2947378 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); } }); }