fix(payment): consume first recharge offer after payment
This commit is contained in:
@@ -41,6 +41,14 @@ export class PaymentRepository implements IPaymentRepository {
|
||||
});
|
||||
}
|
||||
|
||||
/** 清除本地缓存套餐列表。 */
|
||||
async clearCachedPlans(): Promise<Result<void>> {
|
||||
return Result.wrap(async () => {
|
||||
const result = await PaymentPlansStorage.clearPlans();
|
||||
if (Result.isErr(result)) throw result.error;
|
||||
});
|
||||
}
|
||||
|
||||
/** 获取会员套餐列表。 */
|
||||
async getVipPlans(): Promise<Result<PaymentPlan[]>> {
|
||||
return Result.wrap(async () => {
|
||||
|
||||
Reference in New Issue
Block a user