diff --git a/pages/order/confirm.vue b/pages/order/confirm.vue
index bdcf469d..5d976b4d 100644
--- a/pages/order/confirm.vue
+++ b/pages/order/confirm.vue
@@ -166,6 +166,7 @@
import OrderApi from '@/sheep/api/trade/order';
import CouponApi from '@/sheep/api/promotion/coupon';
import { fen2yuan } from '@/sheep/hooks/useGoods';
+ import { SubscribeTemplate } from '@/sheep/util/const';
const state = reactive({
orderPayload: {},
@@ -231,6 +232,11 @@
if (state.orderPayload.items[0].cartId > 0) {
sheep.$store('cart').getList();
}
+
+ // #ifdef MP
+ sheep.$platform.useProvider('wechat').subscribeMessage(SubscribeTemplate.DELIVERY_ORDER);
+ // #endif
+
// 跳转到支付页面
sheep.$router.redirect('/pages/pay/index', {
id: data.payOrderId,
diff --git a/pages/pay/recharge.vue b/pages/pay/recharge.vue
index 430db1a8..a54061ae 100644
--- a/pages/pay/recharge.vue
+++ b/pages/pay/recharge.vue
@@ -1,260 +1,260 @@
-
-
+
-
- 当前余额(元)
- {{ fen2yuan(userWallet.balance) }}
-
-
-
-
- 充值金额
-
- ¥
-
+
+
+ 充值金额
+
+ ¥
+
-
-
-
- {{ fen2yuan(item.payPrice) }}
-
- 送 {{ fen2yuan(item.bonusPrice) }} 元
+
+
+
+ {{ fen2yuan(item.payPrice) }}
+
+ 送 {{ fen2yuan(item.bonusPrice) }} 元
-
-
-
- 确认充值
-
-
-
-
+
+
+
+ 确认充值
+
+
+
+
diff --git a/sheep/api/migration/third.js b/sheep/api/migration/third.js
index fb0d8b05..d6e6f306 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);
}
});
}
diff --git a/sheep/util/const.js b/sheep/util/const.js
index f2768870..fd6f6493 100644
--- a/sheep/util/const.js
+++ b/sheep/util/const.js
@@ -59,7 +59,9 @@ export const TimeStatusEnum = {
// TODO 订阅模版枚举
export const SubscribeTemplate = {
ORDER_AFTERSALE_CHANGE: "售后进度通知",
- MONEY_CHANGE: "充值成功通知"
+ WALLET_RECHARGER_PAID: "充值成功通知",
+ WALLET_RECHARGE_REFUNDED: "退款申请通知",
+ DELIVERY_ORDER: "订单发货通知",
}