调整开通身份

This commit is contained in:
2023-03-13 11:13:52 +08:00
parent 2bf6a397b1
commit 1fcedae027
13 changed files with 658 additions and 60 deletions

View File

@@ -140,11 +140,11 @@ class Identity extends Model
public function getNotRules()
{
$rules = $this->rules;
if ($this->job == Identity::JOB_JK) {
if (in_array($this->job, [Identity::JOB_YK, Identity::JOB_JK, Identity::JOB_NK])) {
return [
'give_crystal' => [
'cover' => $this->getRuleIcon('give_crystal'),
'value' => $this->getRule('give_crystal'),
'cover' => $this->getRuleIcon('give_crystal', ''),
'value' => $this->getRule('give_crystal', 0),
'text' => '赠送水滴'
],
'stock' => [
@@ -158,19 +158,6 @@ class Identity extends Model
];
}
if ($this->job == Identity::JOB_NK) {
return [
'stock' => [
'value' => $this->stock,
'text' => "赠送{$this->stock}箱水"
],
'year' => [
'value' => $this->years,
'text' => $this->years."个月有效期"
],
];
}
return $rules;
}