feat(product): 更新产品类型并添加旧产品记录

- 在 ProductBaseService 中添加新的产品类型:卡密类和 API 业务类- 在 Core 控制器中添加 old_product 字段,用于记录原始产品类型
This commit is contained in:
mzeros 2024-12-22 22:29:11 +08:00
parent b0fbd5c5a6
commit 4ab41a2a4e
2 changed files with 3 additions and 0 deletions

View File

@ -23,6 +23,8 @@ class ProductBaseService extends Service
1 => '加油卡', 1 => '加油卡',
2 => '话费', 2 => '话费',
3 => '权益卡', 3 => '权益卡',
4 => '卡密类',
5 => 'API业务类'
); );
public function getType() public function getType()

View File

@ -270,6 +270,7 @@ class Core extends Controller
$isp = Service::instance()->isp($this->input['mobile']); $isp = Service::instance()->isp($this->input['mobile']);
$this->input['old_product'] = $this->product;
if ($isp == 1) { if ($isp == 1) {
$this->product = 'ydcz'; $this->product = 'ydcz';
} elseif ($isp == 2) { } elseif ($isp == 2) {