fix: 体验会员购买前端二次校验 can_buy_trial

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
XingQue
2026-07-08 00:07:57 +08:00
parent 96adf54c80
commit 81afbdd577

View File

@@ -455,6 +455,20 @@ onHide() {
return;
}
if (isTrial) {
const { currentHuiyuan, huiyuanList } = this.data;
const target = (currentHuiyuan && currentHuiyuan.id === huiyuanId)
? currentHuiyuan
: (huiyuanList || []).find(item => item.id === huiyuanId);
if (target && !target.can_buy_trial) {
wx.showToast({
title: '您已使用过该会员的体验资格',
icon: 'none'
});
return;
}
}
this.showLoading('发起会员支付中...');
try {