第三段完善 代理商绑定 激活等 正式上线的版本

This commit is contained in:
huangzhenpc
2025-02-13 15:25:19 +08:00
parent abfa783907
commit d1b0a26dd2
31 changed files with 2729 additions and 641 deletions

View File

@@ -23,6 +23,28 @@ class AgentCode extends Model
'updated_at' => 'datetime',
];
// 定义卡类型配置
public static $cardTypes = [
1 => ['days' => 1, 'name' => '1天卡'],
5 => ['days' => 5, 'name' => '5天卡'],
30 => ['days' => 30, 'name' => '30天卡'],
90 => ['days' => 90, 'name' => '三个月卡'],
180 => ['days' => 180, 'name' => '六个月卡'],
365 => ['days' => 365, 'name' => '一年卡'],
];
// 获取所有卡类型
public static function getCardTypes()
{
return self::$cardTypes;
}
// 获取卡类型名称
public static function getCardTypeName($days)
{
return isset(self::$cardTypes[$days]) ? self::$cardTypes[$days]['name'] : "{$days}天卡";
}
// 获取所属代理商
public function agent()
{