Commit 25236481 authored by shajiaiming's avatar shajiaiming

fix

parent 34cd4a43
...@@ -18,13 +18,21 @@ class AirDropController extends BaseController ...@@ -18,13 +18,21 @@ class AirDropController extends BaseController
$data = Yii::$app->request->get(); $data = Yii::$app->request->get();
$identifier = $data['identifier'] ?? null; $identifier = $data['identifier'] ?? null;
if (false == $identifier) { $miner_address = $data['miner_address'] ?? null;
if (false == $identifier || false == $miner_address) {
$this->code = -1; $this->code = -1;
$this->msg = '设备号错误,请重新输入.'; $this->msg = '设备号错误,请重新输入.';
goto doEnd; goto doEnd;
} }
$exist = AirDropRulePool::find()->where(['identifier' => $identifier])->one(); // $exist = AirDropRulePool::find()->where(['identifier' => $identifier])->one();
// if (false == $exist || false == $exist->rule) {
// $this->code = -1;
// $this->msg = '设备号错误,请重新输入.';
// goto doEnd;
// }
$exist = AirDrop::find()->where(['identifier' => $identifier, 'miner_address' => $miner_address])->one();
if (false == $exist || false == $exist->rule) { if (false == $exist || false == $exist->rule) {
$this->code = -1; $this->code = -1;
$this->msg = '设备号错误,请重新输入.'; $this->msg = '设备号错误,请重新输入.';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment