feat(mini): 下单/提现/报名前补订阅消息授权(提升微信服务通知到达率)
- 新增 common/subscribe.js:页面预加载模板ID + 点击动作中同步请求授权(避免 await 丢失手势上下文) - 下单支付前请求订单状态/核销码模板;提现前请求到账模板;组局报名确认后请求报名模板 - 自动过滤 tmpl_ 占位模板;授权失败不阻塞业务 - 新增回归护栏 subscribe-authorization.spec.ts(80 套件/615 用例全绿)
这个提交包含在:
@@ -184,6 +184,7 @@ import { onShow } from '@dcloudio/uni-app';
|
||||
import { ICONS } from '@/common/icons.js';
|
||||
import { getCurrentThemeKey, applyThemeToNativeUI } from '@/common/theme.js';
|
||||
import { getNavBarInfo } from '@/common/nav.js';
|
||||
import { preloadSubscribeTemplates, requestSubscribeFor } from '@/common/subscribe.js';
|
||||
import {
|
||||
getUserProfile,
|
||||
withdrawCommission,
|
||||
@@ -342,6 +343,8 @@ const handleSubmitWithdraw = async () => {
|
||||
|
||||
isSubmitting.value = true;
|
||||
uni.showLoading({ title: '正在提交申请...' });
|
||||
// 提现前请求一次性订阅授权(提现到账通知)
|
||||
requestSubscribeFor('withdraw');
|
||||
|
||||
try {
|
||||
const payload = {
|
||||
@@ -389,6 +392,7 @@ onMounted(() => {
|
||||
currentThemeKey.value = getCurrentThemeKey();
|
||||
applyThemeToNativeUI(currentThemeKey.value);
|
||||
loadPageData();
|
||||
preloadSubscribeTemplates();
|
||||
});
|
||||
|
||||
onShow(() => {
|
||||
|
||||
在新工单中引用
屏蔽一个用户