!63 【新增】订阅消息:订单发货、充值退款消息订阅

Merge pull request !63 from puhui999/master
This commit is contained in:
芋道源码
2024-07-30 15:14:12 +00:00
committed by Gitee
5 changed files with 216 additions and 208 deletions
+2 -2
View File
@@ -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,
@@ -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);
}
});
}
+3 -1
View File
@@ -59,7 +59,9 @@ export const TimeStatusEnum = {
// TODO 订阅模版枚举
export const SubscribeTemplate = {
ORDER_AFTERSALE_CHANGE: "售后进度通知",
MONEY_CHANGE: "充值成功通知"
WALLET_RECHARGER_PAID: "充值成功通知",
WALLET_RECHARGE_REFUNDED: "退款申请通知",
DELIVERY_ORDER: "订单发货通知",
}