master
liaojinling 4 years ago
parent b391774df9
commit ee4517adf2

@ -175,10 +175,6 @@ class HomeController extends Controller
public function landingPage() public function landingPage()
{ {
if (time() > strtotime('2021-05-09 12:00:00')) {
return $this->error('该链接已失效');
}
$testKey = I('test_key', ''); $testKey = I('test_key', '');
$code = I('code', ''); $code = I('code', '');
$force = I('force', ''); $force = I('force', '');
@ -207,11 +203,15 @@ class HomeController extends Controller
$promoteId = $data['promote_id']; $promoteId = $data['promote_id'];
} }
$promote = M('promote', 'tab_')->field(['id', 'parent_id', 'chain', 'level'])->where(['id' => $promoteId])->find(); $promote = M('promote', 'tab_')->field(['id', 'parent_id', 'account', 'chain', 'level'])->where(['id' => $promoteId])->find();
if (!$promote) { if (!$promote) {
$this->error('该链接已失效'); $this->error('该链接已失效');
} }
if ($promote['account'] != 'yunyingbu' && time() > strtotime('2021-05-09 12:00:00')) {
return $this->error('该链接已失效');
}
$promoteService = new PromoteService(); $promoteService = new PromoteService();
if (!$promoteService->checkPromoteLimitRule($promote)) { if (!$promoteService->checkPromoteLimitRule($promote)) {
$this->error('链接已失效'); $this->error('链接已失效');

@ -28,9 +28,7 @@ class PackageController extends Controller
public function download() public function download()
{ {
if (time() > strtotime('2021-05-09 12:00:00')) {
return $this->error('该链接已失效');
}
$code = I('code', ''); $code = I('code', '');
$force = I('force', ''); $force = I('force', '');
$gameId = I('game_id', 0); $gameId = I('game_id', 0);
@ -58,11 +56,15 @@ class PackageController extends Controller
$promoteId = $data['promote_id']; $promoteId = $data['promote_id'];
} }
$promote = M('promote', 'tab_')->field(['id', 'parent_id', 'chain', 'level'])->where(['id' => $promoteId])->find(); $promote = M('promote', 'tab_')->field(['id', 'account', 'parent_id', 'chain', 'level'])->where(['id' => $promoteId])->find();
if (!$promote) { if (!$promote) {
$this->error('该链接已失效'); $this->error('该链接已失效');
} }
if ($promote['account'] != 'yunyingbu' && time() > strtotime('2021-05-09 12:00:00')) {
return $this->error('该链接已失效');
}
$promoteService = new PromoteService(); $promoteService = new PromoteService();
if (!$promoteService->checkPromoteLimitRule($promote)) { if (!$promoteService->checkPromoteLimitRule($promote)) {
$this->error('链接已失效'); $this->error('链接已失效');

Loading…
Cancel
Save