fix: 体验会员购买前端二次校验 can_buy_trial
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user