def show_buy_info(user_buy_info: BuyInfo, cfg: Config): logger.info(color("bold_cyan") + user_buy_info.description()) monthly_pay_info = "按月付费未激活" if user_buy_info.total_buy_month != 0: if user_buy_info.is_active(): rt = user_buy_info.remaining_time() monthly_pay_info = f"按月付费剩余时长为 {rt.days}天{rt.seconds//3600}小时" else: monthly_pay_info = "按月付费已过期" change_title(monthly_pay_info=monthly_pay_info, multiprocessing_pool_size=cfg.get_pool_size()) expired = not user_buy_info.is_active() will_expired_soon = user_buy_info.will_expire_in_days(cfg.common.notify_pay_expired_in_days) if (expired or will_expired_soon) and is_weekly_first_run("show_buy_info"): ctx = "" if expired: ctx = "按月付费已过期" elif will_expired_soon: ctx = "按月付费即将过期" threading.Thread(target=show_buy_info_sync, args=(ctx,), daemon=True).start() wait_seconds = 15 logger.info(color("bold_green") + f"等待{wait_seconds}秒,确保看完这段话~") time.sleep(wait_seconds) has_use_card_secret = False for record in user_buy_info.buy_records: if "卡密" in record.reason: has_use_card_secret = True break if is_first_run("卡密付费方案提示v2") or (not use_by_myself() and user_buy_info.total_buy_month > 0 and not has_use_card_secret and is_weekly_first_run("每周提示一次已付费用户续费可使用卡密自助操作")): msg = "现已添加基于卡密的付费方案,可在一分钟内自助完成付费和激活对应功能(自动更新或按月付费)。\n如果想要付费或者续费可以选择这个方案~ 详情请看 【付费指引.docx】" title = "新增卡密付费" async_message_box(msg, title, icon=win32con.MB_ICONINFORMATION)
def show_buy_info(user_buy_info: BuyInfo): logger.info(color("bold_cyan") + user_buy_info.description()) if not user_buy_info.is_active() and is_weekly_first_run("show_buy_info"): threading.Thread(target=show_buy_info_sync, args=(user_buy_info,), daemon=True).start() wait_seconds = 15 logger.info(color("bold_green") + f"等待{wait_seconds}秒,确保看完这段话~") time.sleep(wait_seconds)
def show_buy_info(user_buy_info: BuyInfo): logger.info(color("bold_cyan") + user_buy_info.description()) if not user_buy_info.is_active() and is_weekly_first_run("show_buy_info"): threading.Thread(target=show_buy_info_sync, args=(user_buy_info,), daemon=True).start() wait_seconds = 15 logger.info(color("bold_green") + f"等待{wait_seconds}秒,确保看完这段话~") time.sleep(wait_seconds) if is_first_run("卡密付费方案提示v2"): msg = "现已添加基于卡密的付费方案,可在一分钟内自助完成付费和激活对应功能(自动更新或按月付费)。\n如果想要付费或者续费可以选择这个方案~ 详情请看 【付费指引.docx】" title = "新增卡密付费" async_message_box(msg, title, icon=win32con.MB_ICONINFORMATION)
def show_buy_info(user_buy_info: BuyInfo): msg = f"{user_buy_info.qq} 付费内容过期时间为{user_buy_info.expire_at},累计购买{user_buy_info.total_buy_month}个月。" if len(user_buy_info.buy_records) != 0: msg += "购买详情如下:\n" + '\n'.join( '\t' + f'{record.buy_at} 购买{record.buy_month}月' for record in user_buy_info.buy_records) logger.info(color("bold_yellow") + msg) if not user_buy_info.is_active() and is_weekly_first_run("show_buy_info"): threading.Thread(target=show_buy_info_sync, args=(user_buy_info, ), daemon=True).start() wait_seconds = 15 logger.info(color("bold_green") + f"等待{wait_seconds}秒,确保看完这段话~") time.sleep(wait_seconds)
def show_buy_info(user_buy_info: BuyInfo): logger.info(color("bold_cyan") + user_buy_info.description()) if not user_buy_info.is_active() and is_weekly_first_run("show_buy_info"): threading.Thread(target=show_buy_info_sync, args=(user_buy_info, ), daemon=True).start() wait_seconds = 15 logger.info(color("bold_green") + f"等待{wait_seconds}秒,确保看完这段话~") time.sleep(wait_seconds) has_use_card_secret = False for record in user_buy_info.buy_records: if "卡密" in record.reason: has_use_card_secret = True break if is_first_run("卡密付费方案提示v2") or ( not use_by_myself() and user_buy_info.total_buy_month > 0 and not has_use_card_secret and is_weekly_first_run("每周提示一次已付费用户续费可使用卡密自助操作")): msg = "现已添加基于卡密的付费方案,可在一分钟内自助完成付费和激活对应功能(自动更新或按月付费)。\n如果想要付费或者续费可以选择这个方案~ 详情请看 【付费指引.docx】" title = "新增卡密付费" async_message_box(msg, title, icon=win32con.MB_ICONINFORMATION)