Commit 654a1b864eec0f7044f47baa29f8f5eed48dc9ba

Authored by xu
1 parent 907c39d8
Exists in master

app-ht

1. F  处理授权失败的设备,时间改为null
app-api/config/url-rules.php
... ... @@ -5,12 +5,13 @@ return [
5 5  
6 6  
7 7 'POST authDevice' => 'auth-device/index',
8   - //'POST authDeviceT' => 'auth-device/indext',
  8 + 'POST authDeviceN' => 'auth-device/index-no-encode',
9 9 'POST checkOtaVersion' => 'upgrade/check-version',
10 10 'POST reportOtaUpgradeEvent' => 'upgrade/report-upgrade-event',
11 11 'POST checkAppVersion' => 'upgrade/check-app-version',
12 12 'POST reportAppUpgradeEvent' => 'upgrade/report-app-upgrade-event',
13 13 'POST reportDeviceVersion' => 'upgrade/report-device-version',
  14 + 'POST PTest' => 'upgrade/p-test',
14 15 //'POST CryptTxt' => 'auth-device/crypt-txt',
15 16 'GET errorPage' => 'site/error-page-info',
16 17 'GET minaQuery' => 'site/mina-query',
... ...
app-ht/modules/device/controllers/DeviceController.php
... ... @@ -780,11 +780,11 @@ class DeviceController extends BaseController
780 780 if ($needGen) {
781 781 $trans = Yii::$app->getDb()->beginTransaction();
782 782 try {
783   - Device::createWithMacSerialNo($batchId, $batchNo, $deviceId, $tt, 1, DeviceStatus::NO_AUTH);
  783 + $rNewDevice = Device::createWithMacSerialNo($batchId, $batchNo, $deviceId, $tt, 1, DeviceStatus::NO_AUTH);
784 784 $deviceFailModel->is_delete = 1;
785 785 $deviceFailModel->save();
786 786 $trans->commit();
787   - $e->message = '处理成功';
  787 + $e->message = '处理成功,序列号为:'. (isset($rNewDevice->serial_no)? $rNewDevice->serial_no:'');
788 788 $e->success = true;
789 789 } catch(Exception $exception) {
790 790 $trans->rollBack();
... ... @@ -811,7 +811,7 @@ class DeviceController extends BaseController
811 811 $deviceFailModel->is_delete = 1;
812 812 $deviceFailModel->save();
813 813 $trans->commit();
814   - $e->message = '处理成功';
  814 + $e->message = '处理成功, 序列号为'.$newDeviceModel->serial_no;
815 815 $e->success = true;
816 816 } catch (Exception $exception) {
817 817 $trans->rollBack();
... ...
app-ht/modules/device/views/device/auth-fail-index.php
... ... @@ -145,6 +145,8 @@ $this->params['breadcrumbs'][] = $this->title;
145 145 if (!res.success) {
146 146 alert(res.message);
147 147 return false;
  148 + } else {
  149 + alert(res.message);
148 150 }
149 151 window.location.reload();
150 152 }, 'json')
... ...